DateTimeController: Remove SetTime tick parameter
The systick doesn't need to be updated when setting time. Also removed unused nrf_rtc.h includes.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "displayapp/screens/settings/SettingSetDate.h"
|
||||
#include "displayapp/screens/settings/SettingSetDateTime.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <hal/nrf_rtc.h>
|
||||
#include <nrf_log.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
@@ -96,13 +95,8 @@ void SettingSetDate::HandleButtonPress() {
|
||||
const uint8_t monthValue = monthCounter.GetValue();
|
||||
const uint8_t dayValue = dayCounter.GetValue();
|
||||
NRF_LOG_INFO("Setting date (manually) to %04d-%02d-%02d", yearValue, monthValue, dayValue);
|
||||
dateTimeController.SetTime(yearValue,
|
||||
monthValue,
|
||||
dayValue,
|
||||
dateTimeController.Hours(),
|
||||
dateTimeController.Minutes(),
|
||||
dateTimeController.Seconds(),
|
||||
nrf_rtc_counter_get(portNRF_RTC_REG));
|
||||
dateTimeController
|
||||
.SetTime(yearValue, monthValue, dayValue, dateTimeController.Hours(), dateTimeController.Minutes(), dateTimeController.Seconds());
|
||||
settingSetDateTime.Advance();
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
#include "displayapp/screens/settings/SettingSetTime.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <hal/nrf_rtc.h>
|
||||
#include <nrf_log.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
@@ -100,7 +99,6 @@ void SettingSetTime::SetTime() {
|
||||
dateTimeController.Day(),
|
||||
static_cast<uint8_t>(hoursValue),
|
||||
static_cast<uint8_t>(minutesValue),
|
||||
0,
|
||||
nrf_rtc_counter_get(portNRF_RTC_REG));
|
||||
0);
|
||||
settingSetDateTime.Quit();
|
||||
}
|
||||
|
Reference in New Issue
Block a user