summaryrefslogtreecommitdiff
path: root/uisimulator/battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/battery.c')
-rw-r--r--uisimulator/battery.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/uisimulator/battery.c b/uisimulator/battery.c
index d8580b42d1..acb0835e9f 100644
--- a/uisimulator/battery.c
+++ b/uisimulator/battery.c
@@ -62,18 +62,16 @@ void draw_battery(int xbase, int ybase, int len, int wid, int percent)
62 } 62 }
63 63
64 /* top batt. edge */ 64 /* top batt. edge */
65 lcd_drawline(xbase, ybase, xbase+len-2, ybase); 65 lcd_hline(xbase, xbase+len-2, ybase);
66 66
67 /* bot batt. edge */ 67 /* bot batt. edge */
68 lcd_drawline(xbase, ybase+wid, 68 lcd_hine(xbase, xbase+len-2, ybase+wid);
69 xbase+len-2, ybase+wid);
70 69
71 /* left batt. edge */ 70 /* left batt. edge */
72 lcd_drawline(xbase, ybase, xbase, ybase+wid); 71 lcd_vline(xbase, ybase, ybase+wid);
73 72
74 /* right batt. edge */ 73 /* right batt. edge */
75 lcd_drawline(xbase+len, ybase+1, 74 lcd_vline(xbase+len, ybase+1, ybase+wid-1);
76 xbase+len, ybase+wid-1);
77 75
78 /* 2 dots that account for the nub on the right side of the battery */ 76 /* 2 dots that account for the nub on the right side of the battery */
79 lcd_drawpixel(xbase+len-1, ybase+1); 77 lcd_drawpixel(xbase+len-1, ybase+1);
@@ -85,8 +83,8 @@ void draw_battery(int xbase, int ybase, int len, int wid, int percent)
85 bar_len = capacity; 83 bar_len = capacity;
86 84
87 for(i = 0; i < bar_wid+1; i++) { 85 for(i = 0; i < bar_wid+1; i++) {
88 lcd_drawline(xbase+bar_xoffset, ybase+bar_yoffset+i, 86 lcd_hline(xbase+bar_xoffset,
89 xbase+bar_xoffset+bar_len, ybase+bar_yoffset+i); 87 xbase+bar_xoffset+bar_len, ybase+bar_yoffset+i);
90 } 88 }
91 } 89 }
92 lcd_update(); 90 lcd_update();