File tree 1 file changed +6
-10
lines changed
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 192
192
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
193
193
194
194
FORCE_INLINE void _draw_centered_temp (const celsius_t temp, const uint8_t tx, const uint8_t ty) {
195
- const char *str;
196
- uint8_t len;
197
195
if (temp > 0 ) {
198
- str = i16tostr3rj (temp);
199
- len = str[0 ] != ' ' ? 3 : str[1 ] != ' ' ? 2 : 1 ;
196
+ const char *str = i16tostr3left (temp);
197
+ uint8_t len = strlen (str);
198
+ lcd_put_u8str (tx - len * (INFO_FONT_WIDTH) / 2 + 1 , ty, str);
199
+ lcd_put_lchar (LCD_STR_DEGREE[0 ]);
200
200
}
201
- else {
202
- str = " err" ;
203
- len = 3 ;
204
- }
205
- lcd_put_u8str (tx - len * (INFO_FONT_WIDTH) / 2 + 1 , ty, &str[3 -len]);
206
- if (temp > 0 ) lcd_put_lchar (LCD_STR_DEGREE[0 ]);
201
+ else
202
+ lcd_put_u8str (tx - len * (INFO_FONT_WIDTH) / 2 + 1 , ty, F (" err" ));
207
203
}
208
204
209
205
#if DO_DRAW_FLOWMETER
You can’t perform that action at this time.
0 commit comments