aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ble/SimpleWeatherService.h
diff options
context:
space:
mode:
authorFintasticMan <finlay.neon.kid@gmail.com>2023-06-29 01:30:44 +0200
committerJF <JF002@users.noreply.github.com>2023-12-23 21:42:16 +0100
commitc04813b6d303f4b341e5c7df885809913e83060a (patch)
tree611c844e44bb9bf3670208bd23ebb23078b6b9c1 /src/components/ble/SimpleWeatherService.h
parentfc5424cb72e477c5f1bbfaeddb5c50b851a965ae (diff)
weather: Add function for temperature in Fahrenheit
Diffstat (limited to 'src/components/ble/SimpleWeatherService.h')
-rw-r--r--src/components/ble/SimpleWeatherService.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/ble/SimpleWeatherService.h b/src/components/ble/SimpleWeatherService.h
index 9b3a0e9c..cec2bb8b 100644
--- a/src/components/ble/SimpleWeatherService.h
+++ b/src/components/ble/SimpleWeatherService.h
@@ -104,6 +104,10 @@ namespace Pinetime {
std::optional<CurrentWeather> Current() const;
std::optional<Forecast> GetForecast() const;
+ static int16_t CelsiusToFahrenheit(int16_t celsius) {
+ return celsius * 9 / 5 + 3200;
+ }
+
private:
// 00050000-78fc-48fe-8e23-433b3a1942d0
static constexpr ble_uuid128_t BaseUuid() {