calibration: shorten too long messages

This commit is contained in:
Beat Küng
2019-11-28 10:14:23 +01:00
committed by Daniel Agar
parent 5ff83ef740
commit f30e01ec02
5 changed files with 10 additions and 10 deletions
@@ -414,7 +414,7 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
failed |= (PX4_OK != param_set_no_notification(param_find(str), &(device_id[uorb_index])));
if (failed) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, uorb_index);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG);
return PX4_ERROR;
}
@@ -432,7 +432,7 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
}
if (res != PX4_OK) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_APPLY_CAL_MSG, uorb_index);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_APPLY_CAL_MSG);
}
#endif
@@ -115,7 +115,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
/* set scaling offset parameter */
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG);
goto error_return;
}
}
@@ -186,7 +186,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
}
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG);
goto error_return;
}
@@ -237,7 +237,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
diff_pres_offset = 0.0f;
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG);
goto error_return;
}
+2 -2
View File
@@ -61,7 +61,7 @@
#define CAL_ERROR_SENSOR_MSG "[cal] calibration failed: reading sensor"
#define CAL_ERROR_RESET_CAL_MSG "[cal] calibration failed: to reset, sensor %u"
#define CAL_ERROR_APPLY_CAL_MSG "[cal] calibration failed: to apply calibration, sensor %u"
#define CAL_ERROR_SET_PARAMS_MSG "[cal] calibration failed: to set parameters, sensor %u"
#define CAL_ERROR_APPLY_CAL_MSG "[cal] calibration failed: to apply calibration"
#define CAL_ERROR_SET_PARAMS_MSG "[cal] calibration failed: to set parameters"
#endif /* CALIBRATION_MESSAGES_H_ */
+1 -1
View File
@@ -487,7 +487,7 @@ int do_gyro_calibration(orb_advert_t *mavlink_log_pub)
px4_close(fd);
if (res != PX4_OK) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_APPLY_CAL_MSG, 1);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_APPLY_CAL_MSG);
}
#endif
+2 -2
View File
@@ -840,7 +840,7 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub)
#ifdef __PX4_NUTTX
if (px4_ioctl(fd_mag, MAGIOCSSCALE, (long unsigned int)&mscale) != PX4_OK) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_APPLY_CAL_MSG, cur_mag);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_APPLY_CAL_MSG);
result = calibrate_return_error;
}
@@ -881,7 +881,7 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub)
#endif
if (failed) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, cur_mag);
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG);
result = calibrate_return_error;
} else {