diff options
author | Julian Oes <julian@oes.ch> | 2013-08-08 17:23:51 +0200 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-08-14 22:33:43 +0200 |
commit | 53def47216d5bbacdfdb76428c024ba3feaea64e (patch) | |
tree | 1d1e7c5ee7aac58b52a74b70c29fc4ec3224a9f2 /src/modules/commander | |
parent | 9505654f9103c8965891991514ea690b3e6aea25 (diff) | |
download | px4-firmware-53def47216d5bbacdfdb76428c024ba3feaea64e.tar.gz px4-firmware-53def47216d5bbacdfdb76428c024ba3feaea64e.tar.bz2 px4-firmware-53def47216d5bbacdfdb76428c024ba3feaea64e.zip |
Fixed gyro scale calibration (it was storing scale even though the scale calibration was skipped
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/gyro_calibration.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/commander/gyro_calibration.cpp b/src/modules/commander/gyro_calibration.cpp index 9e6909db0..60b747ee0 100644 --- a/src/modules/commander/gyro_calibration.cpp +++ b/src/modules/commander/gyro_calibration.cpp @@ -177,8 +177,12 @@ void do_gyro_calibration(int mavlink_fd) /* abort this loop if not rotated more than 180 degrees within 5 seconds */ if ((fabsf(baseline_integral / (2.0f * M_PI_F)) < 0.6f) - && (hrt_absolute_time() - start_time > 5 * 1e6)) - break; + && (hrt_absolute_time() - start_time > 5 * 1e6)) { + mavlink_log_info(mavlink_fd, "gyro scale calibration skipped"); + mavlink_log_info(mavlink_fd, "gyro calibration done"); + tune_positive(); + return; + } /* wait blocking for new data */ struct pollfd fds[1]; |