mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 17:16:10 +00:00
Minor code updates
This commit is contained in:
@@ -19,7 +19,7 @@ Vector acc; // accelerometer data, m/s/s
|
||||
Vector rates; // filtered angular rates, rad/s
|
||||
Quaternion attitude; // estimated attitude
|
||||
bool landed; // are we landed and stationary
|
||||
float motors[4]; // normalized motors thrust in range [-1..1]
|
||||
float motors[4]; // normalized motors thrust in range [0..1]
|
||||
|
||||
void setup() {
|
||||
Serial.begin(SERIAL_BAUDRATE);
|
||||
|
@@ -11,8 +11,8 @@
|
||||
MPU9250 IMU(SPI);
|
||||
|
||||
Vector accBias;
|
||||
Vector gyroBias;
|
||||
Vector accScale(1, 1, 1);
|
||||
Vector gyroBias;
|
||||
|
||||
void setupIMU() {
|
||||
print("Setup IMU\n");
|
||||
|
@@ -55,7 +55,7 @@ bool motorsActive() {
|
||||
return motors[0] != 0 || motors[1] != 0 || motors[2] != 0 || motors[3] != 0;
|
||||
}
|
||||
|
||||
void testMotor(uint8_t n) {
|
||||
void testMotor(int n) {
|
||||
print("Testing motor %d\n", n);
|
||||
motors[n] = 1;
|
||||
delay(50); // ESP32 may need to wait until the end of the current cycle to change duty https://github.com/espressif/arduino-esp32/issues/5306
|
||||
|
Reference in New Issue
Block a user