From 3bf2552b6cda0efcbbda8ea5db063bc5d1e0793c Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Mon, 28 May 2018 13:41:36 +0200 Subject: [PATCH] fixed #761 from hzapper (#elif instead of #else if) --- Firmware/sm4.c | 8 ++++---- Firmware/ultralcd.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Firmware/sm4.c b/Firmware/sm4.c index 15c92846..f50591c3 100644 --- a/Firmware/sm4.c +++ b/Firmware/sm4.c @@ -53,7 +53,7 @@ uint8_t sm4_get_dir(uint8_t axis) case 1: return (PORTL & 1)?0:1; case 2: return (PORTL & 4)?0:1; case 3: return (PORTL & 64)?1:0; -#else if ((MOTHERBOARD == BOARD_EINSY_1_0a)) +#elif ((MOTHERBOARD == BOARD_EINSY_1_0a)) case 0: return (PORTL & 1)?1:0; case 1: return (PORTL & 2)?0:1; case 2: return (PORTL & 4)?1:0; @@ -72,7 +72,7 @@ void sm4_set_dir(uint8_t axis, uint8_t dir) case 1: if (!dir) PORTL |= 1; else PORTL &= ~1; break; case 2: if (!dir) PORTL |= 4; else PORTL &= ~4; break; case 3: if (dir) PORTL |= 64; else PORTL &= ~64; break; -#else if ((MOTHERBOARD == BOARD_EINSY_1_0a)) +#elif ((MOTHERBOARD == BOARD_EINSY_1_0a)) case 0: if (dir) PORTL |= 1; else PORTL &= ~1; break; case 1: if (!dir) PORTL |= 2; else PORTL &= ~2; break; case 2: if (dir) PORTL |= 4; else PORTL &= ~4; break; @@ -93,7 +93,7 @@ uint8_t sm4_get_dir_bits(void) if (portL & 4) dir_bits |= 4; if (portL & 64) dir_bits |= 8; dir_bits ^= 0x07; //invert XYZ, do not invert E -#else if ((MOTHERBOARD == BOARD_EINSY_1_0a)) +#elif ((MOTHERBOARD == BOARD_EINSY_1_0a)) if (portL & 1) dir_bits |= 1; if (portL & 2) dir_bits |= 2; if (portL & 4) dir_bits |= 4; @@ -114,7 +114,7 @@ void sm4_set_dir_bits(uint8_t dir_bits) if (dir_bits & 2) portL |= 1; //set Y direction bit if (dir_bits & 4) portL |= 4; //set Z direction bit if (dir_bits & 8) portL |= 64; //set E direction bit -#else if ((MOTHERBOARD == BOARD_EINSY_1_0a)) +#elif ((MOTHERBOARD == BOARD_EINSY_1_0a)) dir_bits ^= 0x0a; //invert YE, do not invert XZ if (dir_bits & 1) portL |= 1; //set X direction bit if (dir_bits & 2) portL |= 2; //set Y direction bit diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 596c06b4..ae5ef9c2 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -1649,7 +1649,7 @@ static void lcd_menu_fails_stats() MENU_ITEM(submenu, PSTR("Total"), lcd_menu_fails_stats_total); END_MENU(); } -#else if defined(PAT9125) +#elif defined(PAT9125) /** * @brief Print last print and total filament run outs *