Skip to content

Commit

Permalink
Change date format to YY-MM-DD
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiearzu committed Oct 27, 2023
1 parent 214fd38 commit d48e972
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions radio/src/gui/colorlcd/draw_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,23 +302,25 @@ void drawDate(BitmapBuffer * dc, coord_t x, coord_t y, TelemetryItem & telemetry
doTwoLines = true;
}

x = dc->drawNumber(x, y, telemetryItem.datetime.day, att|LEADING0|LEFT, 2);
x = dc->drawText(x - 1, y, "-", att);
x = dc->drawNumber(x, y, telemetryItem.datetime.month, att|LEFT, 2);
x = dc->drawText(x - 1, y, "-", att);
x = dc->drawNumber(x, y, telemetryItem.datetime.year-2000, att|LEFT);
LcdFlags fl = att|LEADING0|LEFT;

x = dc->drawNumber(x, y, telemetryItem.datetime.year-2000, fl,2);
x = dc->drawText(x, y, "-", att);
x = dc->drawNumber(x, y, telemetryItem.datetime.month, fl, 2);
x = dc->drawText(x, y, "-", att);
x = dc->drawNumber(x, y, telemetryItem.datetime.day, fl, 2);

if (doTwoLines) {
y += FH; x = ox;
} else {
x += 11;
}

x = dc->drawNumber(x, y, telemetryItem.datetime.hour, att|LEADING0|LEFT, 2);
x = dc->drawNumber(x, y, telemetryItem.datetime.hour, fl, 2);
x = dc->drawText(x, y, ":", att);
x = dc->drawNumber(x, y, telemetryItem.datetime.min, att|LEADING0|LEFT, 2);
x = dc->drawNumber(x, y, telemetryItem.datetime.min, fl, 2);
x = dc->drawText(x, y, ":", att);
dc->drawNumber(x, y, telemetryItem.datetime.sec, att|LEADING0|LEFT, 2);
dc->drawNumber(x, y, telemetryItem.datetime.sec, fl, 2);
}

coord_t drawGPSCoord(BitmapBuffer * dc, coord_t x, coord_t y, int32_t value, const char * direction, LcdFlags flags, bool seconds=true)
Expand Down

0 comments on commit d48e972

Please sign in to comment.