Tweaks to heater / lcd conditions

This commit is contained in:
Scott Lahteine 2018-05-13 02:54:23 -05:00
parent ea353c3df6
commit 03e8f6c1d9
4 changed files with 32 additions and 29 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

@ -1101,7 +1101,9 @@ void Temperature::updateTemperaturesFromRawValues() {
*/
void Temperature::init() {
#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);

View File

@ -1675,7 +1675,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();
@ -1687,7 +1687,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);
@ -1739,7 +1739,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);
@ -1781,7 +1781,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
END_MENU();
}
#endif // TEMP_SENSOR_0 && (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

@ -723,7 +723,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.setCursor(8, 0);
#if HOTENDS > 1
@ -734,7 +734,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
@ -746,7 +746,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.setCursor(10, 0);
#if HOTENDS > 1
_draw_heater_status(1, LCD_STR_THERMOMETER[0], blink);
@ -759,7 +759,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
@ -788,7 +788,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);
@ -802,7 +802,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);
@ -810,14 +810,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.setCursor(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.write(planner.leveling_active || blink ? '_' : ' ');
#endif