Enable motor pins only for classic esp32 by default

Also simplify flix2 config code.
This commit is contained in:
Oleg Kalachev
2026-08-16 01:26:34 +03:00
parent 815ccfc08f
commit bbe753add0
2 changed files with 13 additions and 7 deletions
+12 -6
View File
@@ -12,16 +12,22 @@ void setDefaults() {
pwmFrequency = 38000; pwmFrequency = 38000;
#endif #endif
#ifdef CONFIG_IDF_TARGET_ESP32
// classic esp32 configuration
motorPins[0] = 12;
motorPins[1] = 13;
motorPins[2] = 14;
motorPins[3] = 15;
#endif
#ifdef FLIX2 #ifdef FLIX2
imuModel = 4; // ICM-40609-D imuModel = 4; // ICM-40609-D
imuIntPin = 10; imuIntPin = 10;
imuCsPin = 14; imuCsPin = 14;
motorPins[MOTOR_REAR_LEFT] = 41;
motorPins[MOTOR_REAR_RIGHT] = 7;
motorPins[MOTOR_FRONT_RIGHT] = 18;
motorPins[MOTOR_FRONT_LEFT] = 38;
voltagePin = 3; voltagePin = 3;
motorPins[0] = 41;
motorPins[1] = 7;
motorPins[2] = 18;
motorPins[3] = 38;
#endif #endif
} }
+1 -1
View File
@@ -7,7 +7,7 @@
float motors[4]; // normalized motor thrusts in range [0..1] float motors[4]; // normalized motor thrusts in range [0..1]
int motorPins[4] = {12, 13, 14, 15}; // default pin numbers int motorPins[4] = {-1, -1, -1, -1}; // default pin numbers
int pwmFrequency = 78000; int pwmFrequency = 78000;
int pwmResolution = 10; int pwmResolution = 10;
int pwmStop = 0; int pwmStop = 0;