Use uint8_t for all fan speeds (#12032)

This commit is contained in:
Scott Lahteine
2018-10-07 15:34:41 -05:00
committed by GitHub
parent cb7844c8d4
commit d6b0fbd771
25 changed files with 88 additions and 91 deletions

View File

@@ -207,7 +207,7 @@ static void lcd_implementation_status_screen() {
static uint8_t fan_frame;
if (old_blink != blink) {
old_blink = blink;
if (!fanSpeeds[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0;
if (!fan_speed[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0;
}
#endif
@@ -245,7 +245,7 @@ static void lcd_implementation_status_screen() {
fan_frame == 3 ? status_screen3_bmp :
#endif
#else
blink && fanSpeeds[0] ? status_screen1_bmp :
blink && fan_speed[0] ? status_screen1_bmp :
#endif
#endif
status_screen0_bmp
@@ -269,7 +269,7 @@ static void lcd_implementation_status_screen() {
#if HAS_FAN0
if (PAGE_CONTAINS(STATUS_SCREEN_FAN_TEXT_Y - 7, STATUS_SCREEN_FAN_TEXT_Y)) {
// Fan
const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
const uint16_t per = (((uint16_t)fan_speed[0] + 1) * 100) / 256;
if (per) {
lcd_moveto(STATUS_SCREEN_FAN_TEXT_X, STATUS_SCREEN_FAN_TEXT_Y);
lcd_put_u8str(itostr3(per));