mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
Make motor subsystem configurable using parameters
Motor pins: MOT_PIN_FL, MOT_PIN_FR, MOT_PIN_RL, MOT_PIN_RR. PWM configuration: MOT_PWM_FREQ, MOT_PWM_RES, MOT_PWM_STOP, MOT_PWM_MIN, MOT_PWM_MAX. MOT_PWM_MAX = -1 chooses duty cycle mode for brushed motors (default).
This commit is contained in:
@@ -63,6 +63,16 @@ Parameter parameters[] = {
|
||||
// estimate
|
||||
{"EST_ACC_WEIGHT", &accWeight},
|
||||
{"EST_RATES_LPF_A", &ratesFilter.alpha},
|
||||
// motors
|
||||
{"MOT_PIN_FL", &motorPins[MOTOR_FRONT_LEFT]},
|
||||
{"MOT_PIN_FR", &motorPins[MOTOR_FRONT_RIGHT]},
|
||||
{"MOT_PIN_RL", &motorPins[MOTOR_REAR_LEFT]},
|
||||
{"MOT_PIN_RR", &motorPins[MOTOR_REAR_RIGHT]},
|
||||
{"MOT_PWM_FREQ", &pwmFrequency},
|
||||
{"MOT_PWM_RES", &pwmResolution},
|
||||
{"MOT_PWM_STOP", &pwmStop},
|
||||
{"MOT_PWM_MIN", &pwmMin},
|
||||
{"MOT_PWM_MAX", &pwmMax},
|
||||
// rc
|
||||
{"RC_ZERO_0", &channelZero[0]},
|
||||
{"RC_ZERO_1", &channelZero[1]},
|
||||
|
||||
Reference in New Issue
Block a user