Skip to content

Commit 822b6ae

Browse files
committed
format changes
1 parent 37de10f commit 822b6ae

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/components/datetime/DateTimeController.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,21 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
7575
minute = time.minutes().count();
7676
second = time.seconds().count();
7777

78-
if (minute == 0 and not isHourAlreadyNotified) {
78+
if (minute == 0 && !isHourAlreadyNotified) {
7979
isHourAlreadyNotified = true;
80-
if (systemTask != nullptr)
80+
if (systemTask != nullptr) {
8181
systemTask->PushMessage(System::Messages::OnNewHour);
82+
}
8283
} else if (minute != 0) {
8384
isHourAlreadyNotified = false;
8485
}
8586

86-
if ((minute == 0 or minute == 30) and not isHalfHourAlreadyNotified) {
87+
if ((minute == 0 || minute == 30) && !isHalfHourAlreadyNotified) {
8788
isHalfHourAlreadyNotified = true;
88-
if (systemTask != nullptr)
89+
if (systemTask != nullptr) {
8990
systemTask->PushMessage(System::Messages::OnNewHalfHour);
90-
} else if (minute != 0 and minute != 30) {
91+
}
92+
} else if (minute != 0 && minute != 30) {
9193
isHalfHourAlreadyNotified = false;
9294
}
9395

src/systemtask/SystemTask.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void SystemTask::Work() {
354354
break;
355355
case Messages::OnNewHour:
356356
using Pinetime::Controllers::AlarmController;
357-
if (settingsController.GetChimesState() == 1 and alarmController.State() != AlarmController::AlarmState::Alerting) {
357+
if (settingsController.GetChimesState() == 1 && alarmController.State() != AlarmController::AlarmState::Alerting) {
358358
if (isSleeping && !isWakingUp) {
359359
GoToRunning();
360360
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);
@@ -364,7 +364,7 @@ void SystemTask::Work() {
364364
break;
365365
case Messages::OnNewHalfHour:
366366
using Pinetime::Controllers::AlarmController;
367-
if (settingsController.GetChimesState() == 2 and alarmController.State() != AlarmController::AlarmState::Alerting) {
367+
if (settingsController.GetChimesState() == 2 && alarmController.State() != AlarmController::AlarmState::Alerting) {
368368
if (isSleeping && !isWakingUp) {
369369
GoToRunning();
370370
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);

0 commit comments

Comments
 (0)