Browse Source

optimized bat icon

Toby Chui 11 months ago
parent
commit
75f0dd6529
2 changed files with 3 additions and 7 deletions
  1. 3 3
      InkyDash/battery.ino
  2. 0 4
      README.md

+ 3 - 3
InkyDash/battery.ino

@@ -9,7 +9,7 @@
 
 //Update the battery reading from ADC pin
 void updateBatteryReading(){
-  batRemain = 80;
+  batRemain = 19;
 }
 
 //Draw the battery icon at the bottom right hand corner
@@ -26,9 +26,9 @@ void drawBatteryIcon() {
   display.drawRoundRect(iconBaseX, iconBaseY, 40, 20, 3, GxEPD_BLACK);
   display.fillRoundRect(iconBaseX + 40, iconBaseY + 5, 4, 10, 3, GxEPD_BLACK);
   //Internal bar
-  int maxBarWidth = 36;
+  int maxBarWidth = 34;
   int barWidth = int(float(batRemain)/100.0 * maxBarWidth);
-  display.fillRoundRect(iconBaseX + 2, iconBaseY + 2, barWidth, 16, 3, barColor);
+  display.fillRoundRect(iconBaseX + 3, iconBaseY + 3, barWidth, 14, 3, barColor);
 
   //Draw percentage
   int16_t tbx, tby; uint16_t tbw, tbh;

+ 0 - 4
README.md

@@ -99,14 +99,10 @@ Basically you can try this with any 7.5 inch eink display with 3 colors.
 
 ### Interface
 
-![photo_2024-03-27_23-52-48.jpg](C:\Users\Toby\Pictures\photo_2024-03-27_23-52-48.jpg)
-
 The interface can be changed in the draw `drawHomeFrame()` function.
 
 
 
-
-
 ## License
 
 CopyRight tobychui (C) All Right Reserved