1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +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
*/
#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."
#endif

View File

@ -181,7 +181,7 @@ typedef struct SettingsDataStruct {
//
// 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
@ -545,7 +545,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(SWITCHING_EXTRUDER)
constexpr uint16_t sesa[][2] = SWITCHING_EXTRUDER_SERVO_ANGLES;
#endif
constexpr uint16_t servo_angles[MAX_SERVOS][2] = {
constexpr uint16_t servo_angles[NUM_SERVO_PLUGS][2] = {
#if ENABLED(SWITCHING_EXTRUDER)
[SWITCHING_EXTRUDER_SERVO_NR] = { sesa[0], sesa[1] }
#if EXTRUDERS > 3
@ -1167,7 +1167,7 @@ void MarlinSettings::postprocess() {
// 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
EEPROM_READ(servo_angles);

View File

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