Save some PROGMEM with constexpr (#11798)
When possible, make `active_extruder` a `constexpr` to save some PROGMEM.
This commit is contained in:
		| @@ -124,7 +124,7 @@ uint8_t Stepper::last_direction_bits = 0, | ||||
|  | ||||
| bool Stepper::abort_current_block; | ||||
|  | ||||
| #if DISABLED(MIXING_EXTRUDER) | ||||
| #if DISABLED(MIXING_EXTRUDER) && EXTRUDERS > 1 | ||||
|   uint8_t Stepper::last_moved_extruder = 0xFF; | ||||
| #endif | ||||
|  | ||||
| @@ -159,8 +159,8 @@ uint32_t Stepper::advance_dividend[XYZE] = { 0 }, | ||||
|   int32_t Stepper::delta_error_m[MIXING_STEPPERS]; | ||||
|   uint32_t Stepper::advance_dividend_m[MIXING_STEPPERS], | ||||
|            Stepper::advance_divisor_m; | ||||
| #else | ||||
|   int8_t Stepper::active_extruder;           // Active extruder | ||||
| #elif EXTRUDERS > 1 | ||||
|   uint8_t Stepper::active_extruder;          // Active extruder | ||||
| #endif | ||||
|  | ||||
| #if ENABLED(S_CURVE_ACCELERATION) | ||||
| @@ -1702,7 +1702,7 @@ uint32_t Stepper::stepper_block_phase_isr() { | ||||
|           advance_dividend_m[i] = current_block->mix_steps[i] << 1; | ||||
|         } | ||||
|         advance_divisor_m = e_steps << 1; | ||||
|       #else | ||||
|       #elif EXTRUDERS > 1 | ||||
|         active_extruder = current_block->active_extruder; | ||||
|       #endif | ||||
|  | ||||
| @@ -1729,7 +1729,7 @@ uint32_t Stepper::stepper_block_phase_isr() { | ||||
|         #endif | ||||
|       ) { | ||||
|         last_direction_bits = current_block->direction_bits; | ||||
|         #if DISABLED(MIXING_EXTRUDER) | ||||
|         #if DISABLED(MIXING_EXTRUDER) && EXTRUDERS > 1 | ||||
|           last_moved_extruder = active_extruder; | ||||
|         #endif | ||||
|         set_directions(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user