diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/resistor.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/plugins/resistor.c b/apps/plugins/resistor.c index d2645a792e..006a2c94d1 100644 --- a/apps/plugins/resistor.c +++ b/apps/plugins/resistor.c | |||
@@ -39,12 +39,12 @@ TODO: | |||
39 | #else /* Small screens */ | 39 | #else /* Small screens */ |
40 | #define RESISTOR_BMP_Y 0 | 40 | #define RESISTOR_BMP_Y 0 |
41 | 41 | ||
42 | #endif /* HAVE_LCD_COLOR */ | 42 | #endif |
43 | 43 | ||
44 | #else | 44 | #else /* HAVE_LCD_COLOR */ |
45 | 45 | ||
46 | #define USE_TEXT_ONLY | 46 | #define USE_TEXT_ONLY |
47 | #endif | 47 | #endif /* HAVE_LCD_COLOR */ |
48 | 48 | ||
49 | #define total_resistance_str_x 1 | 49 | #define total_resistance_str_x 1 |
50 | #define tolerance_str_x 1 | 50 | #define tolerance_str_x 1 |
@@ -242,10 +242,14 @@ void draw_resistor(enum color firstband_color, | |||
242 | enum color thirdband_color, | 242 | enum color thirdband_color, |
243 | enum color fourthband_color) | 243 | enum color fourthband_color) |
244 | { | 244 | { |
245 | unsigned int fg; | ||
246 | |||
245 | rb->lcd_clear_display(); | 247 | rb->lcd_clear_display(); |
246 | display->set_viewport(&bitmap_vp); | 248 | display->set_viewport(&bitmap_vp); |
247 | rb->lcd_bitmap_transparent(resistor, RESISTOR_BMP_X, 0, | 249 | rb->lcd_bitmap_transparent(resistor, RESISTOR_BMP_X, 0, |
248 | BMPWIDTH_resistor, BMPHEIGHT_resistor); | 250 | BMPWIDTH_resistor, BMPHEIGHT_resistor); |
251 | |||
252 | fg = rb->lcd_get_foreground(); | ||
249 | 253 | ||
250 | if(firstband_color != RES_NONE) { | 254 | if(firstband_color != RES_NONE) { |
251 | rb->lcd_set_foreground(band_data[firstband_color].color_value); | 255 | rb->lcd_set_foreground(band_data[firstband_color].color_value); |
@@ -279,7 +283,7 @@ void draw_resistor(enum color firstband_color, | |||
279 | rb->lcd_drawrect(fourth_band_x, universal_y, band_width, band_height); | 283 | rb->lcd_drawrect(fourth_band_x, universal_y, band_width, band_height); |
280 | } | 284 | } |
281 | 285 | ||
282 | rb->lcd_set_foreground(LCD_WHITE); | 286 | rb->lcd_set_foreground(fg); |
283 | 287 | ||
284 | rb->lcd_update(); | 288 | rb->lcd_update(); |
285 | return; | 289 | return; |