Skip to content

Commit

Permalink
mavros_mavlink: Modify get_calibration_status
Browse files Browse the repository at this point in the history
  • Loading branch information
goldarte committed Oct 31, 2019
1 parent b17607e commit 370bee5
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Drone/mavros_mavlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 370bee5

Please sign in to comment.