Closed 5iver closed 9 months ago
This is correct, there's no imperial support yet, I believe it should be fairly easy to implement so I'll leave some notes here in case anyone gets to it before me.
This is how it's implemented for the Pebble. It checks if GB is set to use imperial units and if so, recalculates the temperature sent to the watch. The watch deliberately doesn't include units after the degrees symbol so it should display fahrenheit just fine, at least below 99 degrees, after that there probably isn't space to show 3 digits. So don't go anywhere too hot.
This is the relevant section for Pinetime.
All this is wrong, I tried and it doesn't work. A toggle on the watch for metric/imperial is looking like the way to go.
@kieranc and I talked a bit on discord and I want to summarize our conversation here:
I'm still familiarizing myself with the WeatherService and how it is used, but it should be easy enough to change WeatherService::GetCurrentTemperature
to just convert to fahrenheit within that function (when set). The watchfaces wouldn't have to do anything special to support this (aside from being prepared to render 3 digits).
Currently, though, I'm looking into simulating the weather controller service from within InfiniSim, to make development for this easier.
I would personally prefer the conversion to be done on the watch, rather than on the companion app. I would say we should then add a GetFahrenheit()
function to the WeatherData::Temperature
class (a reference to which is returned by the GetCurrentTemperature()
function).
That seems like a pretty elegant solution. I'm mostly working on trying to see how feasible it will be to add weather integration to InfiniSim.
Verification
What happened?
Weather only reports in Celsius
What should happen instead?
When specified, weather should report in Fahrenheit
Reproduction steps
I am using Gadgetbridge (0.74.0) with the QuickWeather (2.3.2) app on Android. GadgetBridge is configured for Imperial and QuickWeather is configured for Fahrenheit. My family all have PineTimes running InfiniTime 1.13.0 and they are displaying the temperature in Celsius.
More details?
I do not see any relevant issues reported for either of their apps. A quick look through their repositories did not lead me to believe the issue was elsewhere, especially because PineTime recently implemented weather functionality. Though, I could absolutely be incorrect and apologize in advance if that is the case.
Has anyone seen Fahrenheit temperatures using the new weather feature?
Version
1.13.0
Companion app
Gadgetbridge 0.74.0