aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/datetime/DateTimeController.cpp
Commit message (Collapse)AuthorAgeFilesLines
* DateTimeController: Make DayOfWeekShortToStringLow staticVictor Kareh2024-02-181-2/+2
| | | | | This allows it to be used outside of the current datetime context and makes it consistent with the MonthShortToStringLow function.
* Fix potential buffer overflows when calling sprintfMingjie Shen2023-12-011-2/+2
| | | | | | | | | | 1. Replace sprintf with snprintf, which is safer 2. An unsigned int or unsigned long int requires 11 bytes to print (including the null terminator) 3. Use PRIu16 macro to print uint16_t 4. Format string "#%2d %2d:%02d:%02d.%02d\n" in StopWatch::stopLapBtnEventHandler() requires at least 17 bytes. The 16-byte buffer would clearly be overrun if sprintf were used.
* DateTimeController: Use std::tm for storing dateRiku Isokoski2023-02-251-17/+9
|
* DateTimeController: Remove SetTime tick parameterRiku Isokoski2023-02-251-4/+3
| | | | | | The systick doesn't need to be updated when setting time. Also removed unused nrf_rtc.h includes.
* src: Enable unused parameter warningRiku Isokoski2023-01-241-8/+1
| | | | | | Fix warnings. Some clang-formatting was necessary. DebugPins is unused and was removed.
* Update clang-{format,tidy} to 14Finlay Davidson2023-01-041-0/+1
| | | | | Also add configuration options only available in 13 and 14. Fixes warning about -fstack-usage in clang-tidy check.
* BLE CTS: fixed signedness of timezoneuli2022-11-251-1/+1
|
* add CTS local time characteristic and use it to provide UTC in ↵uli2022-11-111-0/+6
| | | | DateTimeController
* Make function DayOfWeekShortToStringLow constDiego Miguel2022-06-111-1/+1
|
* Add lowercase days of the weekDiego Miguel2022-06-111-0/+5
|
* Apply clang-format to all C++ filesFinlay Davidson2022-06-051-12/+18
|
* DateTimeController: make possible functions constReinhold Gschweicher2022-03-141-2/+2
| | | | | MonthShortToString and DayOfWeekShortToString don't change the underlying object. Those are just getters and can be declared `const`.
* Merge branch 'statusBarTimeFormat' of https://github.com/mruss77/InfiniTime ↵Jean-François Milants2022-02-131-0/+24
|\ | | | | | | | | | | | | into mruss77-statusBarTimeFormat # Conflicts: # src/components/datetime/DateTimeController.cpp
| * Status bar displays time in 12 or 24 hour format based on settingsMark Russell2021-11-101-0/+23
| |
* | Fix alarm on time changeRiku Isokoski2022-01-221-0/+2
| |
* | resolves conflictsSteveAmor2022-01-021-1/+1
|\ \
| * | Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-1/+1
| |/ | | | | | | | | | | | | Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
* | format changesSteveAmor2021-11-071-5/+7
| |
* | applied clang-formatSteveAmor2021-11-071-5/+4
| |
* | Chimes optionSteveAmor2021-11-071-0/+16
|/
* DateTimeController : remove unused methods and variables.Jean-François Milants2021-10-101-61/+9
|
* Merge with develop and fix conflicts from timaios:set-datetime-manually.Jean-François Milants2021-10-101-1/+29
|\
| * Exposed Month and DayOfWeek texts in DateTimeControllerTim Taenny2021-07-091-8/+36
| | | | | | | | | | Added static methods to return the text of a given month or dayOfWeek.
* | Fix the display of the date after a reset : when the date/time was restored ↵Jean-François Milants2021-09-191-0/+1
| | | | | | | | | | | | from the noinit area, the date was displayed as "--" instead of the actual date. This issue was caused by DateTime::SetCurrentTime() that would not update the internal state of the class : dayOfWeek, Month, Year were not properly updated according to the current time.
* | Move Backup to the system task.Tim Keller2021-08-191-1/+0
| |
* | Add clearing of noinit segment on bad wordTim Keller2021-08-191-1/+1
| | | | | | | | Code readability cleanup
* | Make Clock Persistant.Tim Keller2021-08-171-1/+6
| |
* | Code cleaning in Clock, WatchFaceAnalog, WatchFaceDigital and PineTimeStyle, ↵Jean-François Milants2021-08-101-10/+10
|/ | | | inspired by PR #232 by nscooling.
* Initialize SystemTask, DisplayApp and HeartRateTask as global static ↵Jean-François Milants2021-06-061-4/+6
| | | | variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier.
* Reformatted all the files according to clang-format styleAvamander2021-04-241-122/+43
|
* Reset the step count every day at midnight.Jean-François Milants2021-04-041-0/+13
|
* Multi face support, analog clock, 12/24 configJoaquim2021-02-241-0/+120
|
* Fixed all the includes that were broken due to the renamesAvamander2020-10-021-0/+66