1
0
Fork 0

Simple Weather Service

Fix ToUInt64() in SimpleWeatherService.cpp.
Fix typo in SimpleWeatherService.md.
This commit is contained in:
Jean-François Milants 2023-12-23 20:47:53 +01:00 committed by JF
parent d56df38aeb
commit ca7d8a668d
2 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,8 @@
## Introduction ## 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 ## Service

View file

@ -30,7 +30,7 @@ namespace {
uint64_t ToUInt64(const uint8_t* data) { uint64_t ToUInt64(const uint8_t* data) {
return data[0] + (data[1] << 8) + (data[2] << 16) + (data[3] << 24) + (static_cast<uint64_t>(data[4]) << 32) + return data[0] + (data[1] << 8) + (data[2] << 16) + (data[3] << 24) + (static_cast<uint64_t>(data[4]) << 32) +
(static_cast<uint64_t>(data[5]) << 48) + (static_cast<uint64_t>(data[6]) << 48) + (static_cast<uint64_t>(data[7]) << 56); (static_cast<uint64_t>(data[5]) << 40) + (static_cast<uint64_t>(data[6]) << 48) + (static_cast<uint64_t>(data[7]) << 56);
} }
int16_t ToInt16(const uint8_t* data) { int16_t ToInt16(const uint8_t* data) {