1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

Reformat ADC cases

This commit is contained in:
Scott Lahteine 2019-09-05 20:01:38 -05:00
parent 4cdf7a1b93
commit 91c3b8e3ca

View File

@ -2670,81 +2670,47 @@ void Temperature::isr() {
break; break;
#if HAS_TEMP_ADC_0 #if HAS_TEMP_ADC_0
case PrepareTemp_0: case PrepareTemp_0: HAL_START_ADC(TEMP_0_PIN); break;
HAL_START_ADC(TEMP_0_PIN); case MeasureTemp_0: ACCUMULATE_ADC(temp_hotend[0]); break;
break;
case MeasureTemp_0:
ACCUMULATE_ADC(temp_hotend[0]);
break;
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
case PrepareTemp_BED: case PrepareTemp_BED: HAL_START_ADC(TEMP_BED_PIN); break;
HAL_START_ADC(TEMP_BED_PIN); case MeasureTemp_BED: ACCUMULATE_ADC(temp_bed); break;
break;
case MeasureTemp_BED:
ACCUMULATE_ADC(temp_bed);
break;
#endif #endif
#if HAS_TEMP_CHAMBER #if HAS_TEMP_CHAMBER
case PrepareTemp_CHAMBER: case PrepareTemp_CHAMBER: HAL_START_ADC(TEMP_CHAMBER_PIN); break;
HAL_START_ADC(TEMP_CHAMBER_PIN); case MeasureTemp_CHAMBER: ACCUMULATE_ADC(temp_chamber); break;
break;
case MeasureTemp_CHAMBER:
ACCUMULATE_ADC(temp_chamber);
break;
#endif #endif
#if HAS_TEMP_ADC_1 #if HAS_TEMP_ADC_1
case PrepareTemp_1: case PrepareTemp_1: HAL_START_ADC(TEMP_1_PIN); break;
HAL_START_ADC(TEMP_1_PIN); case MeasureTemp_1: ACCUMULATE_ADC(temp_hotend[1]); break;
break;
case MeasureTemp_1:
ACCUMULATE_ADC(temp_hotend[1]);
break;
#endif #endif
#if HAS_TEMP_ADC_2 #if HAS_TEMP_ADC_2
case PrepareTemp_2: case PrepareTemp_2: HAL_START_ADC(TEMP_2_PIN); break;
HAL_START_ADC(TEMP_2_PIN); case MeasureTemp_2: ACCUMULATE_ADC(temp_hotend[2]); break;
break;
case MeasureTemp_2:
ACCUMULATE_ADC(temp_hotend[2]);
break;
#endif #endif
#if HAS_TEMP_ADC_3 #if HAS_TEMP_ADC_3
case PrepareTemp_3: case PrepareTemp_3: HAL_START_ADC(TEMP_3_PIN); break;
HAL_START_ADC(TEMP_3_PIN); case MeasureTemp_3: ACCUMULATE_ADC(temp_hotend[3]); break;
break;
case MeasureTemp_3:
ACCUMULATE_ADC(temp_hotend[3]);
break;
#endif #endif
#if HAS_TEMP_ADC_4 #if HAS_TEMP_ADC_4
case PrepareTemp_4: case PrepareTemp_4: HAL_START_ADC(TEMP_4_PIN); break;
HAL_START_ADC(TEMP_4_PIN); case MeasureTemp_4: ACCUMULATE_ADC(temp_hotend[4]); break;
break;
case MeasureTemp_4:
ACCUMULATE_ADC(temp_hotend[4]);
break;
#endif #endif
#if HAS_TEMP_ADC_5 #if HAS_TEMP_ADC_5
case PrepareTemp_5: case PrepareTemp_5: HAL_START_ADC(TEMP_5_PIN); break;
HAL_START_ADC(TEMP_5_PIN); case MeasureTemp_5: ACCUMULATE_ADC(temp_hotend[5]); break;
break;
case MeasureTemp_5:
ACCUMULATE_ADC(temp_hotend[5]);
break;
#endif #endif
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
case Prepare_FILWIDTH: case Prepare_FILWIDTH: HAL_START_ADC(FILWIDTH_PIN); break;
HAL_START_ADC(FILWIDTH_PIN);
break;
case Measure_FILWIDTH: case Measure_FILWIDTH:
if (!HAL_ADC_READY()) if (!HAL_ADC_READY())
next_sensor_state = adc_sensor_state; // redo this state next_sensor_state = adc_sensor_state; // redo this state
@ -2756,9 +2722,7 @@ void Temperature::isr() {
#endif #endif
#if HAS_ADC_BUTTONS #if HAS_ADC_BUTTONS
case Prepare_ADC_KEY: case Prepare_ADC_KEY: HAL_START_ADC(ADC_KEYPAD_PIN); break;
HAL_START_ADC(ADC_KEYPAD_PIN);
break;
case Measure_ADC_KEY: case Measure_ADC_KEY:
if (!HAL_ADC_READY()) if (!HAL_ADC_READY())
next_sensor_state = adc_sensor_state; // redo this state next_sensor_state = adc_sensor_state; // redo this state