aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ble/SimpleWeatherService.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2023-12-23 17:18:41 +0100
committerJF <JF002@users.noreply.github.com>2023-12-23 21:12:25 +0100
commite5b73212f6addcfdb5e306df63d7135e543c4f8d (patch)
treef0f996877a93a818ee4fd198ee7ab0711e3181ca /src/components/ble/SimpleWeatherService.h
parentad090ab1884ec71a7a5168af9fb9d5149fb11d7b (diff)
Simple Weather Service
Store temperatures as int16_t (instead of uint8_t previously). The temperature is expressed in °C * 100.
Diffstat (limited to 'src/components/ble/SimpleWeatherService.h')
-rw-r--r--src/components/ble/SimpleWeatherService.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/components/ble/SimpleWeatherService.h b/src/components/ble/SimpleWeatherService.h
index 561917eb..02a4c1e4 100644
--- a/src/components/ble/SimpleWeatherService.h
+++ b/src/components/ble/SimpleWeatherService.h
@@ -64,9 +64,9 @@ namespace Pinetime {
using Location = std::array<char, 33>; // 32 char + \0 (end of string)
struct CurrentWeather {
CurrentWeather(uint64_t timestamp,
- uint8_t temperature,
- uint8_t minTemperature,
- uint8_t maxTemperature,
+ int16_t temperature,
+ int16_t minTemperature,
+ int16_t maxTemperature,
Icons iconId,
Location&& location)
: timestamp {timestamp},
@@ -78,9 +78,9 @@ namespace Pinetime {
}
uint64_t timestamp;
- uint8_t temperature;
- uint8_t minTemperature;
- uint8_t maxTemperature;
+ int16_t temperature;
+ int16_t minTemperature;
+ int16_t maxTemperature;
Icons iconId;
Location location;
@@ -92,8 +92,8 @@ namespace Pinetime {
uint8_t nbDays;
struct Day {
- uint8_t minTemperature;
- uint8_t maxTemperature;
+ int16_t minTemperature;
+ int16_t maxTemperature;
Icons iconId;
};