3 Commits
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -76,9 +76,9 @@ See other available Make commands in [Makefile](../Makefile).
In case if using different IMU model than MPU9250, change `imu` variable declaration in the `imu.ino`:
```cpp
ICM20948 imu(SPI); // For ICM-20948
ICM20948 imu(SPI); // For ICM-20948 via SPI
// or
MPU6050 imu(Wire); // For MPU-6050
MPU6050 imu(Wire); // For MPU-6050 via I2C
```
If using non-default SPI pins, pass SCK, MISO, and MOSI pin numbers to `SPI.begin` call and SS pin to `imu` constructor like that:
+1 -1
View File
@@ -38,7 +38,7 @@ void descend() {
// Allow pilot to interrupt automatic flight
void autoFailsafe() {
static float roll, pitch, yaw, throttle;
if (roll != controlRoll || pitch != controlPitch || yaw != controlYaw || abs(throttle - controlThrottle) > 0.05) {
if (abs(roll - controlRoll) > 0.05 || abs(pitch - controlPitch) > 0.05 || abs(yaw - controlYaw) > 0.05 || abs(throttle - controlThrottle) > 0.05) {
// controls changed and mode switch is not configured
if (mode == AUTO && invalid(controlMode)) mode = STAB; // regain control by the pilot
}
+1 -1
View File
@@ -58,7 +58,7 @@ void sendWiFi(const uint8_t *buf, int len) {
espnow.write(buf, len);
static Rate discovery(2);
if (discovery) espnowBroadcast.write((const uint8_t *)"flix", 4); // broadcast message to help finding this device
if (espnow.isEncrypted() && discovery) espnowBroadcast.write((const uint8_t *)"flix", 4); // broadcast message to help finding this device
return;
}