Updated docs and renamed functions for consistency
This commit is contained in:
parent
f1f2bc119a
commit
3eebe66d65
3 changed files with 20 additions and 13 deletions
18
doc/ble.md
18
doc/ble.md
|
@ -2,7 +2,7 @@
|
||||||
## Introduction
|
## Introduction
|
||||||
This page describes the BLE implementation and API built in this firmware.
|
This page describes the BLE implementation and API built in this firmware.
|
||||||
|
|
||||||
**Note** : I'm a beginner in BLE related technologies and the information in this document reflects my current knowledge and understanding of the BLE stack. This information might be erroneous or incomplete. Feel free to submit a PR if you think you can improve it.
|
**Note**: I'm a beginner in BLE related technologies and the information in this document reflects my current knowledge and understanding of the BLE stack. This information might be erroneous or incomplete. Feel free to submit a PR if you think you can improve it.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -72,12 +72,16 @@ The following custom services are implemented in InfiniTime:
|
||||||
* [Navigation Service](NavigationService.md) : 00010000-78fc-48fe-8e23-433b3a1942d0
|
* [Navigation Service](NavigationService.md) : 00010000-78fc-48fe-8e23-433b3a1942d0
|
||||||
|
|
||||||
|
|
||||||
- Since InfiniTime 0.13
|
- Since InfiniTime 0.13
|
||||||
* Call characteristic (extension to the Alert Notification Service): 00020001-78fc-48fe-8e23-433b3a1942d0
|
* Call characteristic (extension to the Alert Notification Service): 00020001-78fc-48fe-8e23-433b3a1942d0
|
||||||
|
|
||||||
|
|
||||||
- Since InfiniTime 1.7:
|
- Since InfiniTime 1.7:
|
||||||
* [Motion Service](MotionService.md) : 00030000-78fc-48fe-8e23-433b3a1942d0
|
* [Motion Service](MotionService.md): 00030000-78fc-48fe-8e23-433b3a1942d0
|
||||||
|
|
||||||
|
|
||||||
|
- Since InfiniTime 1.8:
|
||||||
|
* [Weather Service](/src/components/ble/weather/WeatherService.h): 00040000-78fc-48fe-8e23-433b3a1942d0
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -550,7 +550,7 @@ namespace Pinetime {
|
||||||
return std::chrono::duration_cast<std::chrono::seconds>(dateTimeController.CurrentDateTime().time_since_epoch()).count();
|
return std::chrono::duration_cast<std::chrono::seconds>(dateTimeController.CurrentDateTime().time_since_epoch()).count();
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t WeatherService::getTodayMinTemp() const {
|
int16_t WeatherService::GetTodayMinTemp() const {
|
||||||
uint64_t currentTimestamp = GetCurrentUnixTimestamp();
|
uint64_t currentTimestamp = GetCurrentUnixTimestamp();
|
||||||
uint64_t currentDayEnd = currentTimestamp - ((24 - dateTimeController.Hours()) * 60 * 60) -
|
uint64_t currentDayEnd = currentTimestamp - ((24 - dateTimeController.Hours()) * 60 * 60) -
|
||||||
((60 - dateTimeController.Minutes()) * 60) - (60 - dateTimeController.Seconds());
|
((60 - dateTimeController.Minutes()) * 60) - (60 - dateTimeController.Seconds());
|
||||||
|
@ -573,7 +573,7 @@ namespace Pinetime {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t WeatherService::getTodayMaxTemp() const {
|
int16_t WeatherService::GetTodayMaxTemp() const {
|
||||||
uint64_t currentTimestamp = GetCurrentUnixTimestamp();
|
uint64_t currentTimestamp = GetCurrentUnixTimestamp();
|
||||||
uint64_t currentDayEnd = currentTimestamp - ((24 - dateTimeController.Hours()) * 60 * 60) -
|
uint64_t currentDayEnd = currentTimestamp - ((24 - dateTimeController.Hours()) * 60 * 60) -
|
||||||
((60 - dateTimeController.Minutes()) * 60) - (60 - dateTimeController.Seconds());
|
((60 - dateTimeController.Minutes()) * 60) - (60 - dateTimeController.Seconds());
|
||||||
|
|
|
@ -64,14 +64,14 @@ namespace Pinetime {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches for the current day's maximum temperature
|
* Searches for the current day's maximum temperature
|
||||||
* @return -32768 if there's no data, degrees celcius times 100 otherwise
|
* @return -32768 if there's no data, degrees Celsius times 100 otherwise
|
||||||
*/
|
*/
|
||||||
int16_t getTodayMaxTemp() const;
|
int16_t GetTodayMaxTemp() const;
|
||||||
/**
|
/**
|
||||||
* Searches for the current day's minimum temperature
|
* Searches for the current day's minimum temperature
|
||||||
* @return -32768 if there's no data, degrees celcius times 100 otherwise
|
* @return -32768 if there's no data, degrees Celsius times 100 otherwise
|
||||||
*/
|
*/
|
||||||
int16_t getTodayMinTemp() const;
|
int16_t GetTodayMinTemp() const;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Management functions
|
* Management functions
|
||||||
|
@ -163,6 +163,9 @@ namespace Pinetime {
|
||||||
*/
|
*/
|
||||||
static bool IsEventStillValid(const std::unique_ptr<WeatherData::TimelineHeader>& uniquePtr, const uint64_t timestamp);
|
static bool IsEventStillValid(const std::unique_ptr<WeatherData::TimelineHeader>& uniquePtr, const uint64_t timestamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a helper function that closes a QCBOR map and decoding context cleanly
|
||||||
|
*/
|
||||||
void CleanUpQcbor(QCBORDecodeContext* decodeContext);
|
void CleanUpQcbor(QCBORDecodeContext* decodeContext);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue