aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/accelerometer_calibration.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-09-01 12:47:10 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-09-01 12:47:10 +0200
commit2d83c6f825db02f04624467f3d0b492ee371c72a (patch)
tree021a5793f2dbff6d6be9b14286a7c3f487d6bcb3 /src/modules/commander/accelerometer_calibration.cpp
parent9eff3170a3aa63d17fbaefd39619866fb745b237 (diff)
downloadpx4-firmware-2d83c6f825db02f04624467f3d0b492ee371c72a.tar.gz
px4-firmware-2d83c6f825db02f04624467f3d0b492ee371c72a.tar.bz2
px4-firmware-2d83c6f825db02f04624467f3d0b492ee371c72a.zip
Closing all opened file descriptors, fixed param save issue, tests clean
Diffstat (limited to 'src/modules/commander/accelerometer_calibration.cpp')
-rw-r--r--src/modules/commander/accelerometer_calibration.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/commander/accelerometer_calibration.cpp b/src/modules/commander/accelerometer_calibration.cpp
index ed6707f04..cfa7d9e8a 100644
--- a/src/modules/commander/accelerometer_calibration.cpp
+++ b/src/modules/commander/accelerometer_calibration.cpp
@@ -241,8 +241,10 @@ int do_accel_calibration_measurements(int mavlink_fd, float accel_offs[3], float
break;
int orient = detect_orientation(mavlink_fd, sensor_combined_sub);
- if (orient < 0)
+ if (orient < 0) {
+ close(sensor_combined_sub);
return ERROR;
+ }
if (data_collected[orient]) {
mavlink_log_info(mavlink_fd, "%s done, please rotate to a different axis", orientation_strs[orient]);