mirror of
https://github.com/clockworkpi/PicoCalc.git
synced 2026-03-26 14:02:38 +01:00
Update multi booter
This commit is contained in:
@@ -344,6 +344,22 @@ void draw_rect_spi(int x1, int y1, int x2, int y2, int c) {
|
||||
lcd_spi_raise_cs();
|
||||
}
|
||||
|
||||
//16x6
|
||||
void draw_battery_icon(int x0, int y0, int level) {
|
||||
draw_rect_spi(x0, y0, x0+14, y0+6, WHITE);
|
||||
draw_rect_spi(x0 + 1, y0 + 1, x0+12, y0+5, BLACK);
|
||||
|
||||
// (2x2)
|
||||
draw_rect_spi(x0 + 14, y0 + 2, x0+14+2, y0+2+2, WHITE);
|
||||
|
||||
for (int i = 0; i <= 13; i++) {
|
||||
if (i < level) {
|
||||
draw_rect_spi(x0 + 1 + i * 1, y0 + 1, x0 + 1 + i*1+1, y0+1+4, WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
Print a char on the LCD display
|
||||
Any characters not in the font will print as a space.
|
||||
|
||||
Reference in New Issue
Block a user