mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Working rough indicator of power
This commit is contained in:
@@ -473,7 +473,11 @@ void DrawUI() {
|
||||
//Optionally draw the arrows, or draw the power instead
|
||||
if (systemSettings.powerDisplay) {
|
||||
//We want to draw in a neat little bar graph of power being pushed to the tip
|
||||
|
||||
//ofset 11
|
||||
uint16_t count = getIronTimer() / (40000 / 28);
|
||||
if (count > 28)
|
||||
count = 28;
|
||||
OLED_DrawWideChar((count), 6);
|
||||
} else {
|
||||
//Draw in the arrows if the user has the power display turned off
|
||||
OLED_BlankSlot(6 * 12 + 16, 24 - 16);//blank out the tail after the arrows
|
||||
|
||||
@@ -221,6 +221,14 @@ void OLED_DrawExtendedChar(uint8_t id, uint8_t x) {
|
||||
|
||||
Oled_DrawArea(x, 0, FONT_WIDTH, 16, (u8*) ptr);
|
||||
}
|
||||
|
||||
void OLED_DrawWideChar(uint8_t id, uint8_t x) {
|
||||
u8* ptr = (u8*) DoubleWidthChars;
|
||||
ptr += (id) * (FONT_WIDTH * 4);
|
||||
x *= FONT_WIDTH; //convert to a x coordinate
|
||||
|
||||
Oled_DrawArea(x, 0, FONT_WIDTH * 2, 16, (u8*) ptr);
|
||||
}
|
||||
void OLED_BlankSlot(uint8_t xStart, uint8_t width) {
|
||||
u8* ptr = (u8*) FONT;
|
||||
ptr += (36) * (FONT_WIDTH * 2);
|
||||
|
||||
Reference in New Issue
Block a user