Make all the basic functionality work without the imu

This commit is contained in:
Oleg Kalachev 2025-02-17 19:44:18 +03:00
parent 149c62568f
commit e54e0e8c48
2 changed files with 5 additions and 7 deletions

View File

@ -146,6 +146,9 @@ The latest version of Ubuntu supported by Gazebo 11 simulator is 20.04. If you h
See other available Make commands in the [Makefile](../Makefile). See other available Make commands in the [Makefile](../Makefile).
> [!TIP]
> You can test the firmware on a bare ESP32 board without connecting IMU and other peripherals. The Wi-Fi network `flix` should appear and all the basic functionality including CLI and QGroundControl connection should work.
### Setup and flight ### Setup and flight
Before flight you need to calibrate the accelerometer: Before flight you need to calibrate the accelerometer:

View File

@ -15,13 +15,7 @@ Vector accScale(1, 1, 1);
void setupIMU() { void setupIMU() {
Serial.println("Setup IMU"); Serial.println("Setup IMU");
bool status = IMU.begin(); IMU.begin();
if (!status) {
while (true) {
Serial.println("IMU begin error");
delay(1000);
}
}
configureIMU(); configureIMU();
delay(500); // wait a bit before calibrating delay(500); // wait a bit before calibrating
calibrateGyro(); calibrateGyro();
@ -129,6 +123,7 @@ void printIMUCal() {
} }
void printIMUInfo() { void printIMUInfo() {
IMU.status() ? Serial.printf("status: ERROR %d\n", IMU.status()) : Serial.println("status: OK");
Serial.printf("model: %s\n", IMU.getModel()); Serial.printf("model: %s\n", IMU.getModel());
Serial.printf("who am I: 0x%02X\n", IMU.whoAmI()); Serial.printf("who am I: 0x%02X\n", IMU.whoAmI());
} }