mirror of
https://github.com/okalachev/flix.git
synced 2026-08-16 00:38:56 +00:00
Enable motor pins only for classic esp32 by default
Also simplify flix2 config code.
This commit is contained in:
+12
-6
@@ -12,16 +12,22 @@ void setDefaults() {
|
||||
pwmFrequency = 38000;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
// classic esp32 configuration
|
||||
motorPins[0] = 12;
|
||||
motorPins[1] = 13;
|
||||
motorPins[2] = 14;
|
||||
motorPins[3] = 15;
|
||||
#endif
|
||||
|
||||
#ifdef FLIX2
|
||||
imuModel = 4; // ICM-40609-D
|
||||
imuIntPin = 10;
|
||||
imuCsPin = 14;
|
||||
|
||||
motorPins[MOTOR_REAR_LEFT] = 41;
|
||||
motorPins[MOTOR_REAR_RIGHT] = 7;
|
||||
motorPins[MOTOR_FRONT_RIGHT] = 18;
|
||||
motorPins[MOTOR_FRONT_LEFT] = 38;
|
||||
|
||||
voltagePin = 3;
|
||||
motorPins[0] = 41;
|
||||
motorPins[1] = 7;
|
||||
motorPins[2] = 18;
|
||||
motorPins[3] = 38;
|
||||
#endif
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
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 pwmResolution = 10;
|
||||
int pwmStop = 0;
|
||||
|
||||
Reference in New Issue
Block a user