Browse Source

Further support for 6 extruders

pull/1/head
Scott Lahteine 6 years ago
parent
commit
44571775bd
  1. 30
      Marlin/src/HAL/HAL_STM32F1/HAL.cpp
  2. 6
      Marlin/src/inc/Conditionals_post.h
  3. 9
      Marlin/src/lcd/menu/menu_info.cpp
  4. 2
      Marlin/src/lcd/menu/menu_temperature.cpp
  5. 10
      Marlin/src/module/thermistor/thermistors.h
  6. 3
      Marlin/src/pins/pinsDebug_list.h

30
Marlin/src/HAL/HAL_STM32F1/HAL.cpp

@ -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;

6
Marlin/src/inc/Conditionals_post.h

@ -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
*/

9
Marlin/src/lcd/menu/menu_info.cpp

@ -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

2
Marlin/src/lcd/menu/menu_temperature.cpp

@ -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

10
Marlin/src/module/thermistor/thermistors.h

@ -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)

3
Marlin/src/pins/pinsDebug_list.h

@ -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

Loading…
Cancel
Save