1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 20:18:52 +00:00

Fix servo count define conflict

`MAX_SERVOS` => `NUM_SERVO_PLUGS`
This commit is contained in:
Scott Lahteine 2018-09-11 16:20:12 -05:00
parent 06949ae510
commit 8584d3697d
3 changed files with 6 additions and 6 deletions

View File

@ -756,7 +756,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
/** /**
* Limited number of servos * Limited number of servos
*/ */
#if NUM_SERVOS > MAX_SERVOS #if NUM_SERVOS > NUM_SERVO_PLUGS
#error "The selected board doesn't support enough servos for your configuration. Reduce NUM_SERVOS." #error "The selected board doesn't support enough servos for your configuration. Reduce NUM_SERVOS."
#endif #endif

View File

@ -181,7 +181,7 @@ typedef struct SettingsDataStruct {
// //
// SERVO_ANGLES // SERVO_ANGLES
// //
uint16_t servo_angles[MAX_SERVOS][2]; // M281 P L U uint16_t servo_angles[NUM_SERVO_PLUGS][2]; // M281 P L U
// //
// DELTA / [XYZ]_DUAL_ENDSTOPS // DELTA / [XYZ]_DUAL_ENDSTOPS
@ -545,7 +545,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES; constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES;
#endif #endif
constexpr uint16_t servo_angles[MAX_SERVOS][2] = { constexpr uint16_t servo_angles[NUM_SERVO_PLUGS][2] = {
#if ENABLED(SWITCHING_EXTRUDER) #if ENABLED(SWITCHING_EXTRUDER)
[SWITCHING_EXTRUDER_SERVO_NR] = { sesa[0], sesa[1] } [SWITCHING_EXTRUDER_SERVO_NR] = { sesa[0], sesa[1] }
#if EXTRUDERS > 3 #if EXTRUDERS > 3
@ -1167,7 +1167,7 @@ void MarlinSettings::postprocess() {
// SERVO_ANGLES // SERVO_ANGLES
// //
#if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES) #if !HAS_SERVOS || DISABLED(EDITABLE_SERVO_ANGLES)
uint16_t servo_angles[MAX_SERVOS][2]; uint16_t servo_angles[NUM_SERVO_PLUGS][2];
#endif #endif
EEPROM_READ(servo_angles); EEPROM_READ(servo_angles);

View File

@ -627,8 +627,8 @@
#define MAX_EXTRUDERS 5 #define MAX_EXTRUDERS 5
#endif #endif
#ifndef MAX_SERVOS #ifndef NUM_SERVO_PLUGS
#define MAX_SERVOS 4 #define NUM_SERVO_PLUGS 4
#endif #endif
// //