diff --git a/src/apps/tools/OswAppDistStats.cpp b/src/apps/tools/OswAppDistStats.cpp index b3bd169a3..ab4a58981 100644 --- a/src/apps/tools/OswAppDistStats.cpp +++ b/src/apps/tools/OswAppDistStats.cpp @@ -16,7 +16,7 @@ void OswAppDistStats::drawChart() { uint16_t goalValue = OswConfigAllKeys::distPerDay.get(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); uint32_t weekDay = oswDate.day; uint32_t dayOfMonth = oswDate.weekDay; @@ -53,7 +53,7 @@ void OswAppDistStats::showStickChart() { void OswAppDistStats::setup() { OswHal* hal = OswHal::getInstance(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); cursorPos = oswDate.weekDay; } void OswAppDistStats::loop() { diff --git a/src/apps/tools/OswAppKcalStats.cpp b/src/apps/tools/OswAppKcalStats.cpp index 89c894951..f4fb02ab0 100644 --- a/src/apps/tools/OswAppKcalStats.cpp +++ b/src/apps/tools/OswAppKcalStats.cpp @@ -15,7 +15,7 @@ uint32_t findCursorWeekDay(uint8_t Index) { // Show the day of the week that cursor (Dynamic weekDay--info) OswHal* hal = OswHal::getInstance(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); int cursorWeekDay = oswDate.weekDay - (6 - Index); int findWeekDay = (cursorWeekDay >= 0) ? cursorWeekDay : (cursorWeekDay + 7); uint32_t fWD = findWeekDay; diff --git a/src/apps/tools/OswAppStepStats.cpp b/src/apps/tools/OswAppStepStats.cpp index 602c7c307..69925a7f2 100644 --- a/src/apps/tools/OswAppStepStats.cpp +++ b/src/apps/tools/OswAppStepStats.cpp @@ -15,7 +15,7 @@ void OswAppStepStats::drawChart() { uint16_t goalValue = OswConfigAllKeys::stepsPerDay.get(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); uint32_t weekDay = oswDate.weekDay; uint32_t dayOfMonth = oswDate.day; @@ -45,7 +45,7 @@ void OswAppStepStats::drawInfoPanel(OswUI* ui, uint32_t pos, uint32_t lastWeekDa hal->gfx()->setTextBottomAligned(); hal->gfx()->setTextCursor(DISP_W / 2, 170); OswDate oswDate = { }; - hal->getLocalDate(&oswDate, &pos); + hal->getLocalDate(oswDate, &pos); const char* weekday = oswDate.weekDayName; hal->gfx()->print(weekday); hal->gfx()->setTextCursor(DISP_W / 2, 190); @@ -74,7 +74,7 @@ void OswAppStepStats::showStickChart() { void OswAppStepStats::setup() { OswHal* hal = OswHal::getInstance(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); cursorPos = oswDate.weekDay; } void OswAppStepStats::loop() { diff --git a/src/apps/tools/OswAppTimeConfig.cpp b/src/apps/tools/OswAppTimeConfig.cpp index b2f492bb1..cf7a89c5b 100644 --- a/src/apps/tools/OswAppTimeConfig.cpp +++ b/src/apps/tools/OswAppTimeConfig.cpp @@ -17,8 +17,8 @@ void OswAppTimeConfig::setup() {} void OswAppTimeConfig::enterManualMode() { OswTime oswTime = { }; OswDate oswDate = { }; - OswHal::getInstance()->getLocalTime(&oswTime); - OswHal::getInstance()->getLocalDate(&oswDate); + OswHal::getInstance()->getLocalTime(oswTime); + OswHal::getInstance()->getLocalDate(oswDate); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; @@ -199,7 +199,7 @@ void OswAppTimeConfig::loop() { hal->gfx()->setTextLeftAligned(); hal->gfx()->setTextCursor(120 - hal->gfx()->getTextOfsetColumns(4), 120); OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); hal->gfx()->printDecimal(oswTime.hour, 2); hal->gfx()->print(":"); hal->gfx()->printDecimal(oswTime.minute, 2); diff --git a/src/apps/watchfaces/OswAppWatchface.cpp b/src/apps/watchfaces/OswAppWatchface.cpp index 634634e8a..3cdf708a7 100644 --- a/src/apps/watchfaces/OswAppWatchface.cpp +++ b/src/apps/watchfaces/OswAppWatchface.cpp @@ -30,7 +30,7 @@ void OswAppWatchface::drawStepHistory(OswUI* ui, uint8_t x, uint8_t y, uint8_t w OswUI::getInstance()->resetTextColors(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); uint32_t weekDay = oswDate.weekDay; for (uint8_t i = 0; i < 7; i++) { @@ -95,14 +95,14 @@ void OswAppWatchface::drawWatch() { // hal->gfx()->drawArc(120, 120, 0, bat, 180, 57, 6, COLOR_BLUE); OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; if(OswConfigAllKeys::settingDisplayDualHourTick.get()) { OswTime oswTime = { }; - hal->getDualTime(&oswTime); + hal->getDualTime(oswTime); uint32_t dualSecond = oswTime.second; uint32_t dualMinute = oswTime.minute; uint32_t dualHour = oswTime.hour; diff --git a/src/apps/watchfaces/OswAppWatchfaceBinary.cpp b/src/apps/watchfaces/OswAppWatchfaceBinary.cpp index 7d5d715ea..cd3a1f09c 100644 --- a/src/apps/watchfaces/OswAppWatchfaceBinary.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceBinary.cpp @@ -17,7 +17,7 @@ void OswAppWatchfaceBinary::drawWatch() { OswHal* hal = OswHal::getInstance(); OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; diff --git a/src/apps/watchfaces/OswAppWatchfaceDigital.cpp b/src/apps/watchfaces/OswAppWatchfaceDigital.cpp index 0e8f5cd5a..d8dba5c3c 100644 --- a/src/apps/watchfaces/OswAppWatchfaceDigital.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceDigital.cpp @@ -68,7 +68,7 @@ static void drawDate(time_t timeZone, uint8_t fontSize, uint8_t CoordY) { OswDate oswDate = { }; OswHal* hal = OswHal::getInstance(); - hal->getDate(timeZone, &oswDate); + hal->getDate(timeZone, oswDate); dayInt = oswDate.day; monthInt = oswDate.month; @@ -116,7 +116,7 @@ static void drawTime(time_t timeZone,uint8_t CoordY) { hal->gfx()->setTextLeftAligned(); hal->gfx()->setTextCursor(120 - hal->gfx()->getTextOfsetColumns(OswConfigAllKeys::timeFormat.get() ? 4 : 5.5),CoordY ); - hal->getTime(timeZone, &oswTime); + hal->getTime(timeZone, oswTime); OswAppWatchfaceDigital::timeOutput(oswTime.hour, oswTime.minute, oswTime.second); if (!OswConfigAllKeys::timeFormat.get()) { hal->gfx()->print(" "); diff --git a/src/apps/watchfaces/OswAppWatchfaceDual.cpp b/src/apps/watchfaces/OswAppWatchfaceDual.cpp index 5f169aeac..d665c73bf 100644 --- a/src/apps/watchfaces/OswAppWatchfaceDual.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceDual.cpp @@ -33,7 +33,7 @@ void OswAppWatchfaceDual::drawAnimSec() { OswHal* hal = OswHal::getInstance(); uint8_t barWidth = 140; OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t onlySecond = oswTime.second; uint16_t barValue = ((float)onlySecond / 60) * barWidth; barValue = barValue < 2 ? 0 : barValue; diff --git a/src/apps/watchfaces/OswAppWatchfaceFitness.cpp b/src/apps/watchfaces/OswAppWatchfaceFitness.cpp index dbcf2f9e9..2e0864d0c 100644 --- a/src/apps/watchfaces/OswAppWatchfaceFitness.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceFitness.cpp @@ -28,7 +28,7 @@ void dateDisplay() { OswHal* hal = OswHal::getInstance(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); uint32_t dayInt = oswDate.day; uint32_t monthInt = oswDate.month; uint32_t yearInt = oswDate.year; @@ -72,7 +72,7 @@ void digitalWatchDisplay() { hal->gfx()->setTextLeftAligned(); hal->gfx()->setTextCursor(DISP_W / 2 - 30, DISP_W / 2); OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; diff --git a/src/apps/watchfaces/OswAppWatchfaceFitnessAnalog.cpp b/src/apps/watchfaces/OswAppWatchfaceFitnessAnalog.cpp index 534ff1238..937eef818 100644 --- a/src/apps/watchfaces/OswAppWatchfaceFitnessAnalog.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceFitnessAnalog.cpp @@ -112,7 +112,7 @@ void OswAppWatchfaceFitnessAnalog::drawWatchFace(OswHal* hal, uint32_t hour, uin void OswAppWatchfaceFitnessAnalog::drawDateFace(OswHal* hal, uint32_t hour, uint32_t minute, uint32_t second, bool afterNoon) { OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); const char* weekday = oswDate.weekDayName; hal->gfx()->setTextSize(2); diff --git a/src/apps/watchfaces/OswAppWatchfaceMix.cpp b/src/apps/watchfaces/OswAppWatchfaceMix.cpp index 652c6d699..0442ced02 100644 --- a/src/apps/watchfaces/OswAppWatchfaceMix.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceMix.cpp @@ -24,7 +24,7 @@ const char* OswAppWatchfaceMix::getAppName() { void OswAppWatchfaceMix::analogWatchDisplay() { OswHal* hal = OswHal::getInstance(); OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; @@ -53,7 +53,7 @@ void OswAppWatchfaceMix::dateDisplay() { OswHal* hal = OswHal::getInstance(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); uint32_t dayInt = oswDate.day; uint32_t monthInt = oswDate.month; uint32_t yearInt = oswDate.year; @@ -88,7 +88,7 @@ void OswAppWatchfaceMix::digitalWatchDisplay() { hal->gfx()->setTextCursor(DISP_W / 2 - OFF_SET_DATE_DIGITAL_WATCH_X_COORD, DISP_H / 2); OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; diff --git a/src/apps/watchfaces/OswAppWatchfaceMonotimer.cpp b/src/apps/watchfaces/OswAppWatchfaceMonotimer.cpp index ce74c1735..a2ba41f1f 100644 --- a/src/apps/watchfaces/OswAppWatchfaceMonotimer.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceMonotimer.cpp @@ -105,14 +105,14 @@ void OswAppWatchfaceMonotimer::drawWatch() { // ticks OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; if (OswConfigAllKeys::settingDisplayDualHourTick.get()) { OswTime oswTime = { }; - hal->getDualTime(&oswTime); + hal->getDualTime(oswTime); uint32_t dualSecond = oswTime.second; uint32_t dualMinute = oswTime.minute; uint32_t dualHour = oswTime.hour; diff --git a/src/apps/watchfaces/OswAppWatchfaceNumerals.cpp b/src/apps/watchfaces/OswAppWatchfaceNumerals.cpp index 661d7eae3..14679ff5a 100644 --- a/src/apps/watchfaces/OswAppWatchfaceNumerals.cpp +++ b/src/apps/watchfaces/OswAppWatchfaceNumerals.cpp @@ -34,7 +34,7 @@ void OswAppWatchfaceNumerals::drawWatch() { OswAppWatchfaceMonotimer::drawHour(); OswDate oswDate = { }; - hal->getLocalDate(&oswDate); + hal->getLocalDate(oswDate); uint32_t dayInt = oswDate.day; uint32_t monthInt = oswDate.month; uint32_t yearInt = oswDate.year; @@ -64,13 +64,13 @@ void OswAppWatchfaceNumerals::drawWatch() { // ticks OswTime oswTime = { }; - hal->getLocalTime(&oswTime); + hal->getLocalTime(oswTime); uint32_t second = oswTime.second; uint32_t minute = oswTime.minute; uint32_t hour = oswTime.hour; if(OswConfigAllKeys::settingDisplayDualHourTick.get()) { OswTime oswTime = { }; - hal->getDualTime(&oswTime); + hal->getDualTime(oswTime); uint32_t dualSecond = oswTime.second; uint32_t dualMinute = oswTime.minute; uint32_t dualHour = oswTime.hour; diff --git a/src/hal/environment.cpp b/src/hal/environment.cpp index 77a0a4bb0..97d22ec61 100644 --- a/src/hal/environment.cpp +++ b/src/hal/environment.cpp @@ -133,7 +133,7 @@ void OswHal::Environment::setupStepStatistics() { */ void OswHal::Environment::commitStepStatistics(const bool& alwaysPrintStepStatistics) { OswDate oswDate = { }; - OswHal::getInstance()->getLocalDate(&oswDate); + OswHal::getInstance()->getLocalDate(oswDate); uint32_t currDoW = oswDate.weekDay; bool changedDoW = currDoW != this->_stepsLastDoW; if(changedDoW) { @@ -197,7 +197,7 @@ void OswHal::Environment::commitStepStatistics(const bool& alwaysPrintStepStatis uint32_t OswHal::Environment::getStepsOnDay(uint8_t dayOfWeek, bool lastWeek) { this->commitStepStatistics(); OswDate oswDate = { }; - OswHal::getInstance()->getLocalDate(&oswDate); + OswHal::getInstance()->getLocalDate(oswDate); uint32_t weekday = oswDate.weekDay; if (!lastWeek and dayOfWeek == weekday) return this->getStepsToday(); @@ -225,7 +225,7 @@ uint32_t OswHal::Environment::getStepsTotalWeek() { this->commitStepStatistics(); uint32_t sum = 0; OswDate oswDate = { }; - OswHal::getInstance()->getLocalDate(&oswDate); + OswHal::getInstance()->getLocalDate(oswDate); uint32_t currDoW = oswDate.weekDay; for (uint8_t i = 0; i < 7; i++) { if (i == currDoW) {