From 22556a7bbf8cad71fe2d4afaa9cd0ca14eaf6952 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 1 Feb 2020 15:18:01 -0600 Subject: [PATCH] More 8-extruder fixups --- Marlin/src/HAL/HAL_ESP32/HAL.cpp | 6 +++ Marlin/src/MarlinCore.cpp | 3 ++ Marlin/src/gcode/config/M200-M205.cpp | 5 ++- .../screens/temperature_screen.cpp | 20 +++++----- Marlin/src/module/temperature.cpp | 39 ++++++++++--------- 5 files changed, 42 insertions(+), 31 deletions(-) diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.cpp b/Marlin/src/HAL/HAL_ESP32/HAL.cpp index 7bc007f3c4..3a011e00e1 100644 --- a/Marlin/src/HAL/HAL_ESP32/HAL.cpp +++ b/Marlin/src/HAL/HAL_ESP32/HAL.cpp @@ -172,6 +172,12 @@ void HAL_adc_init() { #if HAS_TEMP_ADC_5 adc1_set_attenuation(get_channel(TEMP_5_PIN), ADC_ATTEN_11db); #endif + #if HAS_TEMP_ADC_6 + adc2_set_attenuation(get_channel(TEMP_6_PIN), ADC_ATTEN_11db); + #endif + #if HAS_TEMP_ADC_7 + adc3_set_attenuation(get_channel(TEMP_7_PIN), ADC_ATTEN_11db); + #endif #if HAS_HEATED_BED adc1_set_attenuation(get_channel(TEMP_BED_PIN), ADC_ATTEN_11db); #endif diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 141494f20c..f571480ff6 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -547,6 +547,9 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) { case 2: case 3: oldstatus = E1_ENABLE_READ(); ENABLE_AXIS_E1(); break; #if E_STEPPERS > 2 case 4: case 5: oldstatus = E2_ENABLE_READ(); ENABLE_AXIS_E2(); break; + #if E_STEPPERS > 3 + case 6: case 7: oldstatus = E3_ENABLE_READ(); ENABLE_AXIS_E3(); break; + #endif // E_STEPPERS > 3 #endif // E_STEPPERS > 2 #endif // E_STEPPERS > 1 } diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp index 594813e038..14ddb1efc2 100644 --- a/Marlin/src/gcode/config/M200-M205.cpp +++ b/Marlin/src/gcode/config/M200-M205.cpp @@ -41,8 +41,9 @@ // setting any extruder filament size disables volumetric on the assumption that // slicers either generate in extruder values as cubic mm or as as filament feeds // for all extruders - if ( (parser.volumetric_enabled = (parser.value_linear_units() != 0)) ) - planner.set_filament_size(target_extruder, parser.value_linear_units()); + const float dval = parser.value_linear_units(); + if ( (parser.volumetric_enabled = (dval != 0)) ) + planner.set_filament_size(target_extruder, dval); } planner.calculate_volumetric_multipliers(); } diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp index f969f47979..81cde5a341 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp @@ -75,24 +75,24 @@ bool TemperatureScreen::onTouchHeld(uint8_t tag) { case 22: UI_DECREMENT(TargetTemp_celsius, CHAMBER); break; case 23: UI_INCREMENT(TargetTemp_celsius, CHAMBER); break; #ifndef NO_TOOLHEAD_HEATER_GCODE - case 2: UI_DECREMENT(TargetTemp_celsius, E0); break; - case 3: UI_INCREMENT(TargetTemp_celsius, E0); break; + case 2: UI_DECREMENT(TargetTemp_celsius, E0); break; + case 3: UI_INCREMENT(TargetTemp_celsius, E0); break; #endif #if HOTENDS > 1 - case 4: UI_DECREMENT(TargetTemp_celsius, E1); break; - case 5: UI_INCREMENT(TargetTemp_celsius, E1); break; + case 4: UI_DECREMENT(TargetTemp_celsius, E1); break; + case 5: UI_INCREMENT(TargetTemp_celsius, E1); break; #endif #if HOTENDS > 2 - case 6: UI_DECREMENT(TargetTemp_celsius, E2); break; - case 7: UI_INCREMENT(TargetTemp_celsius, E2); break; + case 6: UI_DECREMENT(TargetTemp_celsius, E2); break; + case 7: UI_INCREMENT(TargetTemp_celsius, E2); break; #endif #if HOTENDS > 3 - case 8: UI_DECREMENT(TargetTemp_celsius, E3); break; - case 9: UI_INCREMENT(TargetTemp_celsius, E3); break; + case 8: UI_DECREMENT(TargetTemp_celsius, E3); break; + case 9: UI_INCREMENT(TargetTemp_celsius, E3); break; #endif #if FAN_COUNT > 0 - case 10: UI_DECREMENT(TargetFan_percent, FAN0); break; - case 11: UI_INCREMENT(TargetFan_percent, FAN0); break; + case 10: UI_DECREMENT(TargetFan_percent, FAN0); break; + case 11: UI_INCREMENT(TargetFan_percent, FAN0); break; #endif case 30: #define _HOTEND_OFF(N) setTargetTemp_celsius(0,E##N); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 24cd138c5d..4b00b095c2 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2331,25 +2331,26 @@ void Temperature::update_raw_temperatures() { #elif DISABLED(HEATER_1_USES_MAX6675) temp_hotend[1].update(); #endif - #if HAS_TEMP_ADC_2 - temp_hotend[2].update(); - #if HAS_TEMP_ADC_3 - temp_hotend[3].update(); - #if HAS_TEMP_ADC_4 - temp_hotend[4].update(); - #if HAS_TEMP_ADC_5 - temp_hotend[5].update(); - #if HAS_TEMP_ADC_6 - temp_hotend[6].update(); - #if HAS_TEMP_ADC_7 - temp_hotend[7].update(); - #endif // HAS_TEMP_ADC_7 - #endif // HAS_TEMP_ADC_6 - #endif // HAS_TEMP_ADC_5 - #endif // HAS_TEMP_ADC_4 - #endif // HAS_TEMP_ADC_3 - #endif // HAS_TEMP_ADC_2 - #endif // HAS_TEMP_ADC_1 + #endif + + #if HAS_TEMP_ADC_2 + temp_hotend[2].update(); + #endif + #if HAS_TEMP_ADC_3 + temp_hotend[3].update(); + #endif + #if HAS_TEMP_ADC_4 + temp_hotend[4].update(); + #endif + #if HAS_TEMP_ADC_5 + temp_hotend[5].update(); + #endif + #if HAS_TEMP_ADC_6 + temp_hotend[6].update(); + #endif + #if HAS_TEMP_ADC_7 + temp_hotend[7].update(); + #endif #if HAS_HEATED_BED temp_bed.update();