From ca7d8a668d37d3377aeb38d122a9eccafdd6822d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Milants?= Date: Sat, 23 Dec 2023 20:47:53 +0100 Subject: [PATCH] Simple Weather Service Fix ToUInt64() in SimpleWeatherService.cpp. Fix typo in SimpleWeatherService.md. --- doc/SimpleWeatherService.md | 3 ++- src/components/ble/SimpleWeatherService.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/SimpleWeatherService.md b/doc/SimpleWeatherService.md index db8a6f65..81836379 100644 --- a/doc/SimpleWeatherService.md +++ b/doc/SimpleWeatherService.md @@ -2,7 +2,8 @@ ## Introduction -The Simple Weather Service provide a simple and straightforward API to specify the current weather and the forecast for the next 5 days. It effectively replaces the original Weather Service (from InfiniTime 1.8) since InfiniTime 1.14 +The Simple Weather Service provides a simple and straightforward API to specify the current weather and the forecast for the next 5 days. +It effectively replaces the original Weather Service (from InfiniTime 1.8) since InfiniTime 1.14. ## Service diff --git a/src/components/ble/SimpleWeatherService.cpp b/src/components/ble/SimpleWeatherService.cpp index 8317aeab..886bf659 100644 --- a/src/components/ble/SimpleWeatherService.cpp +++ b/src/components/ble/SimpleWeatherService.cpp @@ -30,7 +30,7 @@ namespace { uint64_t ToUInt64(const uint8_t* data) { return data[0] + (data[1] << 8) + (data[2] << 16) + (data[3] << 24) + (static_cast(data[4]) << 32) + - (static_cast(data[5]) << 48) + (static_cast(data[6]) << 48) + (static_cast(data[7]) << 56); + (static_cast(data[5]) << 40) + (static_cast(data[6]) << 48) + (static_cast(data[7]) << 56); } int16_t ToInt16(const uint8_t* data) {