summaryrefslogtreecommitdiff
path: root/apps/recorder/icons.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/icons.c')
-rw-r--r--apps/recorder/icons.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 2b37be5e62..3467d2bb3d 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -158,17 +158,19 @@ void statusbar_icon_battery(int percent, bool charging)
158 fill = 100; 158 fill = 100;
159 159
160#ifdef SIMULATOR 160#ifdef SIMULATOR
161 if (global_settings.battery_type) { 161 if (global_settings.battery_type && (percent > -1)) {
162#else 162#else
163#ifdef HAVE_CHARGE_CTRL /* Recorder */ 163#ifdef HAVE_CHARGE_CTRL /* Recorder */
164 /* show graphical animation when charging instead of numbers */ 164 /* show graphical animation when charging instead of numbers */
165 if ((global_settings.battery_type) && (charge_state != 1)) { 165 if ((global_settings.battery_type) &&
166 (charge_state != 1) &&
167 (percent > -1)) {
166#else /* FM */ 168#else /* FM */
167 if (global_settings.battery_type) { 169 if (global_settings.battery_type && (percent > -1)) {
168#endif /* HAVE_CHARGE_CTRL */ 170#endif /* HAVE_CHARGE_CTRL */
169#endif 171#endif
170 /* Numeric display */ 172 /* Numeric display */
171 snprintf(buffer, sizeof(buffer), "%3d", percent); 173 snprintf(buffer, sizeof(buffer), "%3d", fill);
172 lcd_setfont(FONT_SYSFIXED); 174 lcd_setfont(FONT_SYSFIXED);
173 lcd_getstringsize(buffer, &width, &height); 175 lcd_getstringsize(buffer, &width, &height);
174 if (height <= STATUSBAR_HEIGHT) 176 if (height <= STATUSBAR_HEIGHT)
@@ -188,6 +190,13 @@ void statusbar_icon_battery(int percent, bool charging)
188 lcd_fillrect(ICON_BATTERY_X_POS + 1, STATUSBAR_Y_POS + 1, fill, 5); 190 lcd_fillrect(ICON_BATTERY_X_POS + 1, STATUSBAR_Y_POS + 1, fill, 5);
189 } 191 }
190 192
193 if (percent == -1) {
194 lcd_setfont(FONT_SYSFIXED);
195 lcd_putsxy(ICON_BATTERY_X_POS + ICON_BATTERY_WIDTH / 2 - 4,
196 STATUSBAR_Y_POS, "?");
197 lcd_setfont(FONT_UI);
198 }
199
191 /* draw power plug if charging */ 200 /* draw power plug if charging */
192 if (charging) 201 if (charging)
193 lcd_bitmap(bitmap_icons_7x8[Icon_Plug], ICON_PLUG_X_POS, 202 lcd_bitmap(bitmap_icons_7x8[Icon_Plug], ICON_PLUG_X_POS,