format changes
This commit is contained in:
parent
37de10f47d
commit
822b6ae6a0
|
@ -75,19 +75,21 @@ void DateTime::UpdateTime(uint32_t systickCounter) {
|
||||||
minute = time.minutes().count();
|
minute = time.minutes().count();
|
||||||
second = time.seconds().count();
|
second = time.seconds().count();
|
||||||
|
|
||||||
if (minute == 0 and not isHourAlreadyNotified) {
|
if (minute == 0 && !isHourAlreadyNotified) {
|
||||||
isHourAlreadyNotified = true;
|
isHourAlreadyNotified = true;
|
||||||
if (systemTask != nullptr)
|
if (systemTask != nullptr) {
|
||||||
systemTask->PushMessage(System::Messages::OnNewHour);
|
systemTask->PushMessage(System::Messages::OnNewHour);
|
||||||
|
}
|
||||||
} else if (minute != 0) {
|
} else if (minute != 0) {
|
||||||
isHourAlreadyNotified = false;
|
isHourAlreadyNotified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((minute == 0 or minute == 30) and not isHalfHourAlreadyNotified) {
|
if ((minute == 0 || minute == 30) && !isHalfHourAlreadyNotified) {
|
||||||
isHalfHourAlreadyNotified = true;
|
isHalfHourAlreadyNotified = true;
|
||||||
if (systemTask != nullptr)
|
if (systemTask != nullptr) {
|
||||||
systemTask->PushMessage(System::Messages::OnNewHalfHour);
|
systemTask->PushMessage(System::Messages::OnNewHalfHour);
|
||||||
} else if (minute != 0 and minute != 30) {
|
}
|
||||||
|
} else if (minute != 0 && minute != 30) {
|
||||||
isHalfHourAlreadyNotified = false;
|
isHalfHourAlreadyNotified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,7 @@ void SystemTask::Work() {
|
||||||
break;
|
break;
|
||||||
case Messages::OnNewHour:
|
case Messages::OnNewHour:
|
||||||
using Pinetime::Controllers::AlarmController;
|
using Pinetime::Controllers::AlarmController;
|
||||||
if (settingsController.GetChimesState() == 1 and alarmController.State() != AlarmController::AlarmState::Alerting) {
|
if (settingsController.GetChimesState() == 1 && alarmController.State() != AlarmController::AlarmState::Alerting) {
|
||||||
if (isSleeping && !isWakingUp) {
|
if (isSleeping && !isWakingUp) {
|
||||||
GoToRunning();
|
GoToRunning();
|
||||||
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);
|
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);
|
||||||
|
@ -364,7 +364,7 @@ void SystemTask::Work() {
|
||||||
break;
|
break;
|
||||||
case Messages::OnNewHalfHour:
|
case Messages::OnNewHalfHour:
|
||||||
using Pinetime::Controllers::AlarmController;
|
using Pinetime::Controllers::AlarmController;
|
||||||
if (settingsController.GetChimesState() == 2 and alarmController.State() != AlarmController::AlarmState::Alerting) {
|
if (settingsController.GetChimesState() == 2 && alarmController.State() != AlarmController::AlarmState::Alerting) {
|
||||||
if (isSleeping && !isWakingUp) {
|
if (isSleeping && !isWakingUp) {
|
||||||
GoToRunning();
|
GoToRunning();
|
||||||
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);
|
displayApp.PushMessage(Pinetime::Applications::Display::Messages::Clock);
|
||||||
|
|
Loading…
Reference in New Issue