From 4f59f397fe885031f26361b6218871c1b5d0ca76 Mon Sep 17 00:00:00 2001 From: Arthur Golubtsov Date: Fri, 1 Nov 2019 15:56:05 +0000 Subject: [PATCH] mavros_mavlink: Update get_calibration_status --- Drone/mavros_mavlink.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Drone/mavros_mavlink.py b/Drone/mavros_mavlink.py index e5dede5..feded7c 100644 --- a/Drone/mavros_mavlink.py +++ b/Drone/mavros_mavlink.py @@ -85,7 +85,10 @@ def get_calibration_status(): if acc_status.value.integer == 0 and acc_status.success: status_text += "acc: uncalibrated; " if status_text == "": - status_text = "OK" + if not gyro_status.success or not mag_status.success or not acc_status.success: + status_text = "NO_INFO" + else: + status_text = "OK" else: status_text = status_text[:-2] return status_text