Further support for 6 extruders
This commit is contained in:
parent
8d95019442
commit
44571775bd
6 changed files with 53 additions and 7 deletions
|
@ -104,6 +104,12 @@ uint8_t adc_pins[] = {
|
|||
#if HAS_TEMP_ADC_0
|
||||
TEMP_0_PIN,
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
TEMP_BED_PIN,
|
||||
#endif
|
||||
#if HAS_HEATED_CHAMBER
|
||||
TEMP_CHAMBER_PIN,
|
||||
#endif
|
||||
#if HAS_TEMP_ADC_1
|
||||
TEMP_1_PIN,
|
||||
#endif
|
||||
|
@ -116,8 +122,8 @@ uint8_t adc_pins[] = {
|
|||
#if HAS_TEMP_ADC_4
|
||||
TEMP_4_PIN,
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
TEMP_BED_PIN,
|
||||
#if HAS_TEMP_ADC_5
|
||||
TEMP_5_PIN,
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
FILWIDTH_PIN,
|
||||
|
@ -128,6 +134,12 @@ enum TEMP_PINS : char {
|
|||
#if HAS_TEMP_ADC_0
|
||||
TEMP_0,
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
TEMP_BED,
|
||||
#endif
|
||||
#if HAS_HEATED_CHAMBER
|
||||
TEMP_CHAMBER,
|
||||
#endif
|
||||
#if HAS_TEMP_ADC_1
|
||||
TEMP_1,
|
||||
#endif
|
||||
|
@ -140,8 +152,8 @@ enum TEMP_PINS : char {
|
|||
#if HAS_TEMP_ADC_4
|
||||
TEMP_4,
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
TEMP_BED,
|
||||
#if HAS_TEMP_ADC_5
|
||||
TEMP_5,
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
FILWIDTH,
|
||||
|
@ -268,6 +280,12 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
|
|||
#if HAS_TEMP_ADC_0
|
||||
case TEMP_0_PIN: pin_index = TEMP_0; break;
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
case TEMP_BED_PIN: pin_index = TEMP_BED; break;
|
||||
#endif
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case TEMP_CHAMBER_PIN: pin_index = TEMP_CHAMBER; break;
|
||||
#endif
|
||||
#if HAS_TEMP_ADC_1
|
||||
case TEMP_1_PIN: pin_index = TEMP_1; break;
|
||||
#endif
|
||||
|
@ -280,8 +298,8 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
|
|||
#if HAS_TEMP_ADC_4
|
||||
case TEMP_4_PIN: pin_index = TEMP_4; break;
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
case TEMP_BED_PIN: pin_index = TEMP_BED; break;
|
||||
#if HAS_TEMP_ADC_5
|
||||
case TEMP_5_PIN: pin_index = TEMP_5; break;
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
|
||||
|
|
|
@ -914,6 +914,7 @@
|
|||
#define HAS_TEMP_ADC_2 HAS_ADC_TEST(2)
|
||||
#define HAS_TEMP_ADC_3 HAS_ADC_TEST(3)
|
||||
#define HAS_TEMP_ADC_4 HAS_ADC_TEST(4)
|
||||
#define HAS_TEMP_ADC_5 HAS_ADC_TEST(5)
|
||||
#define HAS_TEMP_ADC_BED HAS_ADC_TEST(BED)
|
||||
#define HAS_TEMP_ADC_CHAMBER HAS_ADC_TEST(CHAMBER)
|
||||
|
||||
|
@ -927,6 +928,7 @@
|
|||
#define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
|
||||
#define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
|
||||
#define HAS_HEATER_4 (PIN_EXISTS(HEATER_4))
|
||||
#define HAS_HEATER_5 (PIN_EXISTS(HEATER_5))
|
||||
#define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
|
||||
|
||||
// Shorthand for common combinations
|
||||
|
@ -1106,6 +1108,10 @@
|
|||
#define HEATER_4_INVERTING false
|
||||
#endif
|
||||
|
||||
#if HAS_HEATER_5 && !defined(HEATER_5_INVERTING)
|
||||
#define HEATER_5_INVERTING false
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Helper Macros for heaters and extruder fan
|
||||
*/
|
||||
|
|
|
@ -143,6 +143,15 @@ void menu_info_thermistors() {
|
|||
STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_4_MAXTEMP), false);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_5 != 0
|
||||
#undef THERMISTOR_ID
|
||||
#define THERMISTOR_ID TEMP_SENSOR_5
|
||||
#include "../thermistornames.h"
|
||||
STATIC_ITEM("T5: " THERMISTOR_NAME, false, true);
|
||||
STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_5_MINTEMP), false);
|
||||
STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_5_MAXTEMP), false);
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
#undef THERMISTOR_ID
|
||||
#define THERMISTOR_ID TEMP_SENSOR_BED
|
||||
|
|
|
@ -422,7 +422,7 @@ void menu_temperature() {
|
|||
//
|
||||
// Preheat for Material 1 and 2
|
||||
//
|
||||
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || HAS_HEATED_BED
|
||||
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || TEMP_SENSOR_5 != 0 || HAS_HEATED_BED
|
||||
MENU_ITEM(submenu, MSG_PREHEAT_1, menu_preheat_m1);
|
||||
MENU_ITEM(submenu, MSG_PREHEAT_2, menu_preheat_m2);
|
||||
#else
|
||||
|
|
|
@ -191,6 +191,16 @@
|
|||
#define HEATER_4_TEMPTABLE_LEN 0
|
||||
#endif
|
||||
|
||||
#if THERMISTORHEATER_5
|
||||
#define HEATER_5_TEMPTABLE TT_NAME(THERMISTORHEATER_5)
|
||||
#define HEATER_5_TEMPTABLE_LEN COUNT(HEATER_5_TEMPTABLE)
|
||||
#elif defined(HEATER_5_USES_THERMISTOR)
|
||||
#error "No heater 5 thermistor table specified"
|
||||
#else
|
||||
#define HEATER_5_TEMPTABLE NULL
|
||||
#define HEATER_5_TEMPTABLE_LEN 0
|
||||
#endif
|
||||
|
||||
#ifdef THERMISTORBED
|
||||
#define BEDTEMPTABLE TT_NAME(THERMISTORBED)
|
||||
#define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)
|
||||
|
|
|
@ -77,6 +77,9 @@
|
|||
#if PIN_EXISTS(TEMP_4) && TEMP_4_PIN < NUM_ANALOG_INPUTS
|
||||
REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(TEMP_5) && TEMP_5_PIN < NUM_ANALOG_INPUTS
|
||||
REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(TEMP_BED) && TEMP_BED_PIN < NUM_ANALOG_INPUTS
|
||||
REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN)
|
||||
#endif
|
||||
|
|
Reference in a new issue