mirror of
https://github.com/okalachev/flix.git
synced 2026-08-16 00:38:56 +00:00
Compare commits
2
Commits
3f11fa11e8
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbe753add0 | ||
|
|
815ccfc08f |
@@ -31,7 +31,7 @@
|
||||
|
||||
* [`vector.h`](https://github.com/okalachev/flix/blob/master/flix/vector.h), [`quaternion.h`](https://github.com/okalachev/flix/blob/master/flix/quaternion.h) — библиотеки векторов и кватернионов.
|
||||
* [`pid.h`](https://github.com/okalachev/flix/blob/master/flix/pid.h) — ПИД-регулятор.
|
||||
* [`lpf.h`](https://github.com/okalachev/flix/blob/master/flix/lpf.h) — фильтр нижних частот.
|
||||
* [`filter.h`](https://github.com/okalachev/flix/blob/master/flix/filter.h) — фильтр нижних частот.
|
||||
|
||||
### Подсистема управления
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ Utility files:
|
||||
|
||||
* [`vector.h`](../flix/vector.h), [`quaternion.h`](../flix/quaternion.h) — vector and quaternion libraries.
|
||||
* [`pid.h`](../flix/pid.h) — generic PID controller.
|
||||
* [`lpf.h`](../flix/lpf.h) — generic low-pass filter.
|
||||
* [`filter.h`](../flix/filter.h) — generic low-pass filter.
|
||||
|
||||
### Control subsystem
|
||||
|
||||
|
||||
+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