diff options
| author | JF002 <JF002@users.noreply.github.com> | 2021-06-12 09:02:06 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-12 09:02:06 (GMT) |
| commit | 0ce98c7ac7ba66acaf504be9bb042796e12f2733 (patch) | |
| tree | 3f9c7f96f0fab64f581035c72480596a4cc4db43 /src/components/datetime/DateTimeController.h | |
| parent | 79f0fcb07aa80eb70385223272e29f2ba5657bc8 (diff) | |
| parent | 6d524ebea2c97e309633d5e01c3a1e37c182f27d (diff) | |
Merge pull request #415 from JF002/move-heap-to-static
Move dynamically allocated variables to static variables.
Diffstat (limited to 'src/components/datetime/DateTimeController.h')
| -rw-r--r-- | src/components/datetime/DateTimeController.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h index d0ae727..265d6e9 100644 --- a/src/components/datetime/DateTimeController.h +++ b/src/components/datetime/DateTimeController.h @@ -27,8 +27,6 @@ namespace Pinetime { December }; - DateTime(System::SystemTask& systemTask); - void SetTime(uint16_t year, uint8_t month, uint8_t day, @@ -75,8 +73,9 @@ namespace Pinetime { return uptime; } + void Register(System::SystemTask* systemTask); + private: - System::SystemTask& systemTask; uint16_t year = 0; Months month = Months::Unknown; uint8_t day = 0; @@ -90,6 +89,7 @@ namespace Pinetime { std::chrono::seconds uptime {0}; bool isMidnightAlreadyNotified = false; + System::SystemTask* systemTask = nullptr; static char const* DaysString[]; static char const* DaysStringShort[]; |
