Skip to content

Commit

Permalink
WIP : Dual hour tick
Browse files Browse the repository at this point in the history
  • Loading branch information
RuffaloLavoisier committed Apr 27, 2022
1 parent b6c02a3 commit 9f5024c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/apps/watchfaces/watchface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,18 @@ void OswAppWatchface::drawWatch() {
uint32_t minute = 0;
uint32_t hour = 0;
hal->getLocalTime(&hour, &minute, &second);

//Dual-time part
uint32_t dualSecond = 0;
uint32_t dualMinute = 0;
uint32_t dualHour = 0;
bool afterNoon = false;

hal->getLocalTime(&dualHour, &dualMinute, &dualSecond, &afterNoon);
if (OswConfigAllKeys::settingDisplayDualHourTick.get()) { // Overlays dualtime hour tick
// Dual-hours
hal->gfx()->drawThickTick(120, 120, 0, 16, 360.0 / 12.0 * (1.0 * dualHour + minute / 60.0), 2, afterNoon ? ui->getBackgroundDimmedColor():ui->getForegroundDimmedColor());
hal->gfx()->drawThickTick(120, 120, 16, 60, 360.0 / 12.0 * (1.0 * dualHour + minute / 60.0), 5, afterNoon ? ui->getBackgroundDimmedColor():ui->getForegroundDimmedColor());
}
// hours
hal->gfx()->drawThickTick(120, 120, 0, 16, 360.0 / 12.0 * (1.0 * hour + minute / 60.0), 1, ui->getForegroundColor());
hal->gfx()->drawThickTick(120, 120, 16, 60, 360.0 / 12.0 * (1.0 * hour + minute / 60.0), 4, ui->getForegroundColor());
Expand Down

0 comments on commit 9f5024c

Please sign in to comment.