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:
Oleg Kalachev
2026-01-27 08:40:52 +03:00
parent 7d74f3d5cd
commit 40bdaacedb
4 changed files with 50 additions and 30 deletions

View File

@@ -32,6 +32,7 @@ void controlRates();
void controlTorque();
const char* getModeName();
void sendMotors();
int getDutyCycle(float value);
bool motorsActive();
void testMotor(int n);
void print(const char* format, ...);