mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 19:30:35 +08:00
commander/safety: replace safety.msg with Safety class (#19558)
This commit is contained in:
@@ -52,7 +52,6 @@
|
||||
#include <uORB/Subscription.hpp>
|
||||
#include <uORB/topics/battery_status.h>
|
||||
#include <uORB/topics/actuator_test.h>
|
||||
#include <uORB/topics/safety.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
using namespace time_literals;
|
||||
@@ -94,15 +93,6 @@ static void set_motor_actuators(uORB::Publication<actuator_test_s> &publisher, f
|
||||
|
||||
int do_esc_calibration_ctrl_alloc(orb_advert_t *mavlink_log_pub)
|
||||
{
|
||||
// check safety
|
||||
uORB::SubscriptionData<safety_s> safety_sub{ORB_ID(safety)};
|
||||
safety_sub.update();
|
||||
|
||||
if (safety_sub.get().safety_switch_available && !safety_sub.get().safety_off) {
|
||||
calibration_log_critical(mavlink_log_pub, CAL_QGC_FAILED_MSG, "Disable safety first");
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
int return_code = PX4_OK;
|
||||
uORB::Publication<actuator_test_s> actuator_test_pub{ORB_ID(actuator_test)};
|
||||
// since we publish multiple at once, make sure the output driver subscribes before we publish
|
||||
|
||||
Reference in New Issue
Block a user