mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 01:33:34 +08:00
vehicle_status_flags: cleanup message, move non-failsafe flags to vehicle_status
This commit is contained in:
@@ -86,6 +86,12 @@ void GyroCalibration::Run()
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_system_calibrating != vehicle_status.calibration_enabled) {
|
||||
_system_calibrating = vehicle_status.calibration_enabled;
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,18 +100,6 @@ void GyroCalibration::Run()
|
||||
return;
|
||||
}
|
||||
|
||||
if (_vehicle_status_flags_sub.updated()) {
|
||||
vehicle_status_flags_s vehicle_status_flags;
|
||||
|
||||
if (_vehicle_status_flags_sub.copy(&vehicle_status_flags)) {
|
||||
if (_system_calibrating != vehicle_status_flags.calibration_enabled) {
|
||||
_system_calibrating = vehicle_status_flags.calibration_enabled;
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_system_calibrating) {
|
||||
// do nothing if system is calibrating
|
||||
Reset();
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#include <uORB/topics/sensor_accel.h>
|
||||
#include <uORB/topics/sensor_gyro.h>
|
||||
#include <uORB/topics/vehicle_status.h>
|
||||
#include <uORB/topics/vehicle_status_flags.h>
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
@@ -87,7 +86,6 @@ private:
|
||||
|
||||
uORB::SubscriptionInterval _parameter_update_sub{ORB_ID(parameter_update), 1_s};
|
||||
uORB::Subscription _vehicle_status_sub{ORB_ID::vehicle_status};
|
||||
uORB::Subscription _vehicle_status_flags_sub{ORB_ID::vehicle_status_flags};
|
||||
|
||||
uORB::SubscriptionMultiArray<sensor_accel_s, MAX_SENSORS> _sensor_accel_subs{ORB_ID::sensor_accel};
|
||||
uORB::SubscriptionMultiArray<sensor_gyro_s, MAX_SENSORS> _sensor_gyro_subs{ORB_ID::sensor_gyro};
|
||||
|
||||
Reference in New Issue
Block a user