mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 09:41:35 +08:00
commander: Better text feedback in preflight-check
This commit is contained in:
@@ -93,7 +93,7 @@ static bool magnometerCheck(int mavlink_fd, unsigned instance, bool optional)
|
|||||||
|
|
||||||
if (devid != calibration_devid) {
|
if (devid != calibration_devid) {
|
||||||
mavlink_and_console_log_critical(mavlink_fd,
|
mavlink_and_console_log_critical(mavlink_fd,
|
||||||
"PREFLIGHT FAIL: MAG #%u UNCALIBRATED (NO ID)", instance);
|
"PREFLIGHT FAIL: MAG #%u UNCALIBRATED", instance);
|
||||||
success = false;
|
success = false;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -137,7 +137,7 @@ static bool accelerometerCheck(int mavlink_fd, unsigned instance, bool optional,
|
|||||||
|
|
||||||
if (devid != calibration_devid) {
|
if (devid != calibration_devid) {
|
||||||
mavlink_and_console_log_critical(mavlink_fd,
|
mavlink_and_console_log_critical(mavlink_fd,
|
||||||
"PREFLIGHT FAIL: ACCEL #%u UNCALIBRATED (NO ID)", instance);
|
"PREFLIGHT FAIL: ACCEL #%u UNCALIBRATED", instance);
|
||||||
success = false;
|
success = false;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@ static bool accelerometerCheck(int mavlink_fd, unsigned instance, bool optional,
|
|||||||
float accel_magnitude = sqrtf(acc.x * acc.x + acc.y * acc.y + acc.z * acc.z);
|
float accel_magnitude = sqrtf(acc.x * acc.x + acc.y * acc.y + acc.z * acc.z);
|
||||||
|
|
||||||
if (accel_magnitude < 4.0f || accel_magnitude > 15.0f /* m/s^2 */) {
|
if (accel_magnitude < 4.0f || accel_magnitude > 15.0f /* m/s^2 */) {
|
||||||
mavlink_and_console_log_critical(mavlink_fd, "PREFLIGHT FAIL: ACCEL RANGE, hold still");
|
mavlink_and_console_log_critical(mavlink_fd, "PREFLIGHT FAIL: ACCEL RANGE, hold still on arming");
|
||||||
/* this is frickin' fatal */
|
/* this is frickin' fatal */
|
||||||
success = false;
|
success = false;
|
||||||
goto out;
|
goto out;
|
||||||
@@ -204,7 +204,7 @@ static bool gyroCheck(int mavlink_fd, unsigned instance, bool optional)
|
|||||||
|
|
||||||
if (devid != calibration_devid) {
|
if (devid != calibration_devid) {
|
||||||
mavlink_and_console_log_critical(mavlink_fd,
|
mavlink_and_console_log_critical(mavlink_fd,
|
||||||
"PREFLIGHT FAIL: GYRO #%u UNCALIBRATED (NO ID)", instance);
|
"PREFLIGHT FAIL: GYRO #%u UNCALIBRATED", instance);
|
||||||
success = false;
|
success = false;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user