Tweaks to heater / lcd conditions

This commit is contained in:
Scott Lahteine 2018-05-13 03:08:55 -05:00
parent 9d98a62699
commit 083ec9963e
4 changed files with 33 additions and 30 deletions

View file

@ -71,7 +71,7 @@ FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, cons
);
}
if (PAGE_CONTAINS(21, 28))
if (PAGE_CONTAINS(21, 28)) {
_draw_centered_temp(0.5 + (
#if HAS_HEATED_BED
isBed ? thermalManager.degBed() :
@ -80,21 +80,22 @@ FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, cons
), x, 28
);
if (PAGE_CONTAINS(17, 20)) {
const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X,
y = isBed ? 18 : 17;
if (
#if HAS_HEATED_BED
isBed ? thermalManager.isHeatingBed() :
#endif
thermalManager.isHeatingHotend(heater)
) {
u8g.setColorIndex(0); // white on black
u8g.drawBox(x + h, y, 2, 2);
u8g.setColorIndex(1); // black on white
if (PAGE_CONTAINS(17, 20)) {
const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X,
y = isBed ? 18 : 17;
if (
#if HAS_HEATED_BED
isBed ? thermalManager.isHeatingBed() :
#endif
thermalManager.isHeatingHotend(heater)
) {
u8g.setColorIndex(0); // white on black
u8g.drawBox(x + h, y, 2, 2);
u8g.setColorIndex(1); // black on white
}
else
u8g.drawBox(x + h, y, 2, 2);
}
else
u8g.drawBox(x + h, y, 2, 2);
}
}
@ -225,7 +226,7 @@ static void lcd_implementation_status_screen() {
#endif
#if HAS_FAN0
if (PAGE_CONTAINS(20, 27)) {
if (PAGE_CONTAINS(STATUS_SCREEN_FAN_TEXT_Y - 7, STATUS_SCREEN_FAN_TEXT_Y)) {
// Fan
const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
if (per) {

View file

@ -864,8 +864,8 @@ void lcd_quick_feedback(const bool clear_buttons) {
bool abort_sd_printing; // =false
void lcd_sdcard_stop() {
abort_sd_printing = true;
wait_for_heatup = wait_for_user = false;
abort_sd_printing = true;
lcd_setstatusPGM(PSTR(MSG_PRINT_ABORTED), -1);
lcd_return_to_status();
@ -1684,7 +1684,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
void lcd_preheat_m2_bedonly() { _lcd_preheat(0, 0, lcd_preheat_bed_temp[1], lcd_preheat_fan_speed[1]); }
#endif
#if HAS_TEMP_HOTEND && (TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || HAS_HEATED_BED)
#if HAS_TEMP_HOTEND || HAS_HEATED_BED
void lcd_preheat_m1_menu() {
START_MENU();
@ -1696,7 +1696,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
#else
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
#endif
#else
#elif HOTENDS > 1
#if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0);
MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E1, lcd_preheat_m1_e0_only);
@ -1748,7 +1748,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
#else
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
#endif
#else
#elif HOTENDS > 1
#if HAS_HEATED_BED
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0);
MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E1, lcd_preheat_m2_e0_only);
@ -1790,7 +1790,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
END_MENU();
}
#endif // HAS_TEMP_HOTEND && (TEMP_SENSOR_1 || TEMP_SENSOR_2 || TEMP_SENSOR_3 || TEMP_SENSOR_4 || TEMP_SENSOR_BED)
#endif // HAS_TEMP_HOTEND || HAS_HEATED_BED
void lcd_cooldown() {
#if FAN_COUNT > 0

View file

@ -584,7 +584,7 @@ static void lcd_implementation_status_screen() {
//
// Hotend 1 or Bed Temperature
//
#if HOTENDS > 1 || TEMP_SENSOR_BED
#if HOTENDS > 1 || HAS_HEATED_BED
lcd_moveto(8, 0);
#if HOTENDS > 1
@ -595,7 +595,7 @@ static void lcd_implementation_status_screen() {
_draw_heater_status(-1, -1, blink);
#endif
#endif // HOTENDS > 1 || TEMP_SENSOR_BED
#endif // HOTENDS > 1 || HAS_HEATED_BED
#else // LCD_WIDTH >= 20
@ -607,7 +607,7 @@ static void lcd_implementation_status_screen() {
//
// Hotend 1 or Bed Temperature
//
#if HOTENDS > 1 || TEMP_SENSOR_BED
#if HOTENDS > 1 || HAS_HEATED_BED
lcd_moveto(10, 0);
#if HOTENDS > 1
_draw_heater_status(1, LCD_STR_THERMOMETER[0], blink);
@ -620,7 +620,7 @@ static void lcd_implementation_status_screen() {
), blink);
#endif
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
#endif // HOTENDS > 1 || HAS_HEATED_BED
#endif // LCD_WIDTH >= 20
@ -649,7 +649,7 @@ static void lcd_implementation_status_screen() {
// If the first line has two extruder temps,
// show more temperatures on the next line
#if HOTENDS > 2 || (HOTENDS > 1 && TEMP_SENSOR_BED)
#if HOTENDS > 2 || (HOTENDS > 1 && HAS_HEATED_BED)
#if HOTENDS > 2
_draw_heater_status(2, LCD_STR_THERMOMETER[0], blink);
@ -663,7 +663,7 @@ static void lcd_implementation_status_screen() {
LCD_BEDTEMP_CHAR
), blink);
#else // HOTENDS <= 2 && (HOTENDS <= 1 || !TEMP_SENSOR_BED)
#else // HOTENDS <= 2 && (HOTENDS <= 1 || !HAS_HEATED_BED)
_draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])), blink);
@ -671,14 +671,14 @@ static void lcd_implementation_status_screen() {
_draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])), blink);
#endif // HOTENDS <= 2 && (HOTENDS <= 1 || !TEMP_SENSOR_BED)
#endif // HOTENDS <= 2 && (HOTENDS <= 1 || !HAS_HEATED_BED)
#endif // LCD_WIDTH >= 20
lcd_moveto(LCD_WIDTH - 8, 1);
_draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position[Z_AXIS])), blink);
#if HAS_LEVELING && !TEMP_SENSOR_BED
#if HAS_LEVELING && !HAS_HEATED_BED
lcd_put_wchar(planner.leveling_active || blink ? '_' : ' ');
#endif

View file

@ -1126,7 +1126,9 @@ void Temperature::init() {
inited = true;
#endif
#if MB(RUMBA) && (TEMP_SENSOR_0 == -1 || TEMP_SENSOR_1 == -1 || TEMP_SENSOR_2 == -1 || TEMP_SENSOR_BED == -1 || TEMP_SENSOR_CHAMBER == -1)
#if MB(RUMBA) && ( \
ENABLED(HEATER_0_USES_AD595) || ENABLED(HEATER_1_USES_AD595) || ENABLED(HEATER_2_USES_AD595) || ENABLED(HEATER_3_USES_AD595) || ENABLED(HEATER_4_USES_AD595) || ENABLED(HEATER_BED_USES_AD595) || ENABLED(HEATER_CHAMBER_USES_AD595) \
|| ENABLED(HEATER_0_USES_AD8495) || ENABLED(HEATER_1_USES_AD8495) || ENABLED(HEATER_2_USES_AD8495) || ENABLED(HEATER_3_USES_AD8495) || ENABLED(HEATER_4_USES_AD8495) || ENABLED(HEATER_BED_USES_AD8495) || ENABLED(HEATER_CHAMBER_USES_AD8495))
// Disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
MCUCR = _BV(JTD);
MCUCR = _BV(JTD);