mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-26 23:19:33 +00:00
mavros_mavlink: Modify get_calibration_status
This commit is contained in:
@@ -78,17 +78,11 @@ def get_calibration_status():
|
||||
mag_status = get_param('CAL_MAG0_ID')
|
||||
acc_status = get_param('CAL_ACC0_ID')
|
||||
status_text = ""
|
||||
if gyro_status.success == False:
|
||||
status_text += "gyro: wrong_param; "
|
||||
elif gyro_status.value.integer == 0:
|
||||
if gyro_status.value.integer == 0 and gyro_status.success:
|
||||
status_text += "gyro: uncalibrated; "
|
||||
if mag_status.success == False:
|
||||
status_text += "mag: wrong_param; "
|
||||
elif mag_status.value.integer == 0:
|
||||
if mag_status.value.integer == 0 and mag_status.success:
|
||||
status_text += "mag: uncalibrated; "
|
||||
if acc_status.success == False:
|
||||
status_text += "acc: wrong_param; "
|
||||
elif acc_status.value.integer == 0:
|
||||
if acc_status.value.integer == 0 and acc_status.success:
|
||||
status_text += "acc: uncalibrated; "
|
||||
if status_text == "":
|
||||
status_text = "OK"
|
||||
|
||||
Reference in New Issue
Block a user