Skip to content

Commit dbd4794

Browse files
authored
Merge branch 'InfiniTimeOrg:main' into main
2 parents 94b0495 + dbe8820 commit dbd4794

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/components/alarm/AlarmController.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ uint32_t AlarmController::SecondsToAlarm() const {
111111

112112
void AlarmController::DisableAlarm() {
113113
xTimerStop(alarmTimer, 0);
114-
isAlerting = false;
115114
if (alarm.isEnabled) {
116115
alarm.isEnabled = false;
117116
alarmChanged = true;

src/displayapp/screens/Alarm.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Alarm::Alarm(Controllers::AlarmController& alarmController,
7777
btnStop = lv_btn_create(lv_scr_act(), nullptr);
7878
btnStop->user_data = this;
7979
lv_obj_set_event_cb(btnStop, btnEventHandler);
80-
lv_obj_set_size(btnStop, 115, 50);
80+
lv_obj_set_size(btnStop, 240, 70);
8181
lv_obj_align(btnStop, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
8282
lv_obj_set_style_local_bg_color(btnStop, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED);
8383
txtStop = lv_label_create(btnStop, nullptr);
@@ -203,6 +203,10 @@ void Alarm::UpdateAlarmTime() {
203203

204204
void Alarm::SetAlerting() {
205205
lv_obj_set_hidden(enableSwitch, true);
206+
lv_obj_set_hidden(btnRecur, true);
207+
lv_obj_set_hidden(btnInfo, true);
208+
hourCounter.HideControls();
209+
minuteCounter.HideControls();
206210
lv_obj_set_hidden(btnStop, false);
207211
taskStopAlarm = lv_task_create(StopAlarmTaskCallback, pdMS_TO_TICKS(60 * 1000), LV_TASK_PRIO_MID, this);
208212
motorController.StartRinging();
@@ -218,8 +222,12 @@ void Alarm::StopAlerting() {
218222
taskStopAlarm = nullptr;
219223
}
220224
wakeLock.Release();
221-
lv_obj_set_hidden(enableSwitch, false);
222225
lv_obj_set_hidden(btnStop, true);
226+
hourCounter.ShowControls();
227+
minuteCounter.ShowControls();
228+
lv_obj_set_hidden(btnInfo, false);
229+
lv_obj_set_hidden(btnRecur, false);
230+
lv_obj_set_hidden(enableSwitch, false);
223231
}
224232

225233
void Alarm::SetSwitchState(lv_anim_enable_t anim) {

0 commit comments

Comments
 (0)