Merge pull request #1039 from NeroBurner/datetime_const_and_analog_const_ref

Datetime const and analog const ref
This commit is contained in:
JF 2022-03-14 21:13:56 +01:00 committed by GitHub
commit 76b7436dfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -108,11 +108,11 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
} }
} }
const char* DateTime::MonthShortToString() { const char* DateTime::MonthShortToString() const {
return MonthsString[static_cast<uint8_t>(month)]; return MonthsString[static_cast<uint8_t>(month)];
} }
const char* DateTime::DayOfWeekShortToString() { const char* DateTime::DayOfWeekShortToString() const {
return DaysStringShort[static_cast<uint8_t>(dayOfWeek)]; return DaysStringShort[static_cast<uint8_t>(dayOfWeek)];
} }

View File

@ -61,8 +61,8 @@ namespace Pinetime {
return second; return second;
} }
const char* MonthShortToString(); const char* MonthShortToString() const;
const char* DayOfWeekShortToString(); const char* DayOfWeekShortToString() const;
static const char* MonthShortToStringLow(Months month); static const char* MonthShortToStringLow(Months month);
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const { std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> CurrentDateTime() const {

View File

@ -74,7 +74,7 @@ namespace Pinetime {
lv_obj_t* batteryIcon; lv_obj_t* batteryIcon;
lv_obj_t* notificationIcon; lv_obj_t* notificationIcon;
Controllers::DateTime& dateTimeController; const Controllers::DateTime& dateTimeController;
Controllers::Battery& batteryController; Controllers::Battery& batteryController;
Controllers::Ble& bleController; Controllers::Ble& bleController;
Controllers::NotificationManager& notificationManager; Controllers::NotificationManager& notificationManager;