💥 Update Motor Current G-codes for extra axes (#23975)

This commit is contained in:
DerAndere 2022-04-19 05:15:15 +02:00 committed by GitHub
parent 5005c7b64c
commit 8aaf64d917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 138 additions and 68 deletions

View file

@ -447,7 +447,15 @@ typedef struct SettingsDataStruct {
// HAS_MOTOR_CURRENT_PWM
//
#ifndef MOTOR_CURRENT_COUNT
#define MOTOR_CURRENT_COUNT NUM_AXES
#if HAS_MOTOR_CURRENT_PWM
#define MOTOR_CURRENT_COUNT 3
#elif HAS_MOTOR_CURRENT_DAC
#define MOTOR_CURRENT_COUNT LOGICAL_AXES
#elif HAS_MOTOR_CURRENT_I2C
#define MOTOR_CURRENT_COUNT DIGIPOT_I2C_NUM_CHANNELS
#else // HAS_MOTOR_CURRENT_SPI
#define MOTOR_CURRENT_COUNT DISTINCT_AXES
#endif
#endif
uint32_t motor_current_setting[MOTOR_CURRENT_COUNT]; // M907 X Z E ...