mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Make all the basic functionality work without the imu
This commit is contained in:
parent
149c62568f
commit
e54e0e8c48
@ -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).
|
||||
|
||||
> [!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
|
||||
|
||||
Before flight you need to calibrate the accelerometer:
|
||||
|
@ -15,13 +15,7 @@ Vector accScale(1, 1, 1);
|
||||
|
||||
void setupIMU() {
|
||||
Serial.println("Setup IMU");
|
||||
bool status = IMU.begin();
|
||||
if (!status) {
|
||||
while (true) {
|
||||
Serial.println("IMU begin error");
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
IMU.begin();
|
||||
configureIMU();
|
||||
delay(500); // wait a bit before calibrating
|
||||
calibrateGyro();
|
||||
@ -129,6 +123,7 @@ void printIMUCal() {
|
||||
}
|
||||
|
||||
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("who am I: 0x%02X\n", IMU.whoAmI());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user