mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
Fix mavlink disconnection in pauses in cli commands
Implement pause function that proceeds processing mavlink. Use temporal workaround for simulation, as micros function gives the same result on the same simulation step.
This commit is contained in:
+12
-7
@@ -68,18 +68,23 @@ void calibrateAccel() {
|
||||
print("Calibrating accelerometer\n");
|
||||
IMU.setAccelRange(IMU.ACCEL_RANGE_2G); // the most sensitive mode
|
||||
|
||||
Serial.setTimeout(5000);
|
||||
print("Place level [enter | 5 sec] \n"); Serial.readStringUntil('\n');
|
||||
print("Place level [8 sec]\n");
|
||||
pause(8);
|
||||
calibrateAccelOnce();
|
||||
print("Place nose up [enter | 5 sec] \n"); Serial.readStringUntil('\n');
|
||||
print("Place nose up [8 sec]\n");
|
||||
pause(8);
|
||||
calibrateAccelOnce();
|
||||
print("Place nose down [enter | 5 sec] \n"); Serial.readStringUntil('\n');
|
||||
print("Place nose down [8 sec]\n");
|
||||
pause(8);
|
||||
calibrateAccelOnce();
|
||||
print("Place on right side [enter | 5 sec] \n"); Serial.readStringUntil('\n');
|
||||
print("Place on right side [8 sec]\n");
|
||||
pause(8);
|
||||
calibrateAccelOnce();
|
||||
print("Place on left side [enter | 5 sec] \n"); Serial.readStringUntil('\n');
|
||||
print("Place on left side [8 sec]\n");
|
||||
pause(8);
|
||||
calibrateAccelOnce();
|
||||
print("Place upside down [enter | 5 sec] \n"); Serial.readStringUntil('\n');
|
||||
print("Place upside down [8 sec]\n");
|
||||
pause(8);
|
||||
calibrateAccelOnce();
|
||||
|
||||
printIMUCal();
|
||||
|
||||
Reference in New Issue
Block a user