Allow TEMP_STAT_LEDS with only one LED defined

2.0.x
Scott Lahteine 8 years ago
parent 4b056d8184
commit ada935de87

@ -9244,8 +9244,14 @@ void prepare_move_to_destination() {
bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led;
if (new_led != red_led) {
red_led = new_led;
#if PIN_EXISTS(STAT_LED_RED)
WRITE(STAT_LED_RED_PIN, new_led ? HIGH : LOW);
#if PIN_EXISTS(STAT_LED_BLUE)
WRITE(STAT_LED_BLUE_PIN, new_led ? LOW : HIGH);
#endif
#else
WRITE(STAT_LED_BLUE_PIN, new_led ? HIGH : LOW);
#endif
}
}
}

@ -770,8 +770,8 @@
/**
* Temperature status LEDs
*/
#if ENABLED(TEMP_STAT_LEDS) && !(PIN_EXISTS(STAT_LED_RED) && PIN_EXISTS(STAT_LED_BLUE))
#error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN and STAT_LED_BLUE_PIN."
#if ENABLED(TEMP_STAT_LEDS) && !PIN_EXISTS(STAT_LED_RED) && !PIN_EXISTS(STAT_LED_BLUE)
#error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
#endif
/**
@ -942,7 +942,7 @@
#else
#define COUNT_LCD_13 COUNT_LCD_12
#endif
#if ENABLED(REPRAPWORLD_KEYPAD)
#if ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI)
#define COUNT_LCD_14 INCREMENT(COUNT_LCD_13)
#else
#define COUNT_LCD_14 COUNT_LCD_13

Loading…
Cancel
Save