Move motorsActive function to motors.ino

This commit is contained in:
Oleg Kalachev 2025-01-09 11:30:04 +03:00
parent c8109af04f
commit 0a45614751
2 changed files with 4 additions and 4 deletions

View File

@ -164,10 +164,6 @@ void controlTorque() {
motors[3] = constrain(motors[3], 0, 1);
}
bool motorsActive() {
return motors[0] > 0 || motors[1] > 0 || motors[2] > 0 || motors[3] > 0;
}
const char* getModeName() {
switch (mode) {
case MANUAL: return "MANUAL";

View File

@ -46,3 +46,7 @@ void sendMotors() {
ledcWrite(MOTOR_2_PIN, getDutyCycle(motors[2]));
ledcWrite(MOTOR_3_PIN, getDutyCycle(motors[3]));
}
bool motorsActive() {
return motors[0] != 0 || motors[1] != 0 || motors[2] != 0 || motors[3] != 0;
}