mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
msg/geofence_update.msg: remove this topic
We'll use dataman to check for geofence data updates.
This commit is contained in:
@@ -59,7 +59,6 @@ set(msg_file_names
|
|||||||
follow_target.msg
|
follow_target.msg
|
||||||
fw_pos_ctrl_status.msg
|
fw_pos_ctrl_status.msg
|
||||||
geofence_result.msg
|
geofence_result.msg
|
||||||
geofence_update.msg
|
|
||||||
gps_dump.msg
|
gps_dump.msg
|
||||||
gps_inject_data.msg
|
gps_inject_data.msg
|
||||||
hil_sensor.msg
|
hil_sensor.msg
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
# This message is used to notify the system about a geofence update (dataman
|
|
||||||
# storage)
|
|
||||||
|
|
||||||
uint32 dummy # unused
|
|
||||||
@@ -51,7 +51,6 @@
|
|||||||
#include <px4_defines.h>
|
#include <px4_defines.h>
|
||||||
|
|
||||||
#include <navigator/navigation.h>
|
#include <navigator/navigation.h>
|
||||||
#include <uORB/topics/geofence_update.h>
|
|
||||||
#include <uORB/topics/mission.h>
|
#include <uORB/topics/mission.h>
|
||||||
#include <uORB/topics/mission_result.h>
|
#include <uORB/topics/mission_result.h>
|
||||||
|
|
||||||
@@ -88,7 +87,6 @@ MavlinkMissionManager::MavlinkMissionManager(Mavlink *mavlink) :
|
|||||||
_offboard_mission_sub(-1),
|
_offboard_mission_sub(-1),
|
||||||
_mission_result_sub(-1),
|
_mission_result_sub(-1),
|
||||||
_offboard_mission_pub(nullptr),
|
_offboard_mission_pub(nullptr),
|
||||||
_geofence_update_pub(nullptr),
|
|
||||||
_slow_rate_limiter(100 * 1000), // Rate limit sending of the current WP sequence to 10 Hz
|
_slow_rate_limiter(100 * 1000), // Rate limit sending of the current WP sequence to 10 Hz
|
||||||
_verbose(mavlink->verbose()),
|
_verbose(mavlink->verbose()),
|
||||||
_mavlink(mavlink)
|
_mavlink(mavlink)
|
||||||
@@ -103,7 +101,6 @@ MavlinkMissionManager::~MavlinkMissionManager()
|
|||||||
{
|
{
|
||||||
orb_unsubscribe(_mission_result_sub);
|
orb_unsubscribe(_mission_result_sub);
|
||||||
orb_unadvertise(_offboard_mission_pub);
|
orb_unadvertise(_offboard_mission_pub);
|
||||||
orb_unadvertise(_geofence_update_pub);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -214,9 +211,6 @@ MavlinkMissionManager::update_geofence_count(unsigned count)
|
|||||||
if (res == sizeof(mission_stats_entry_s)) {
|
if (res == sizeof(mission_stats_entry_s)) {
|
||||||
_count[(uint8_t)MAV_MISSION_TYPE_FENCE] = count;
|
_count[(uint8_t)MAV_MISSION_TYPE_FENCE] = count;
|
||||||
|
|
||||||
geofence_update_s geofence_update{};
|
|
||||||
orb_publish_auto(ORB_ID(geofence_update), &_geofence_update_pub, &geofence_update, nullptr, ORB_PRIO_DEFAULT);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
PX4_ERR("WPM: can't save mission state");
|
PX4_ERR("WPM: can't save mission state");
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,6 @@ private:
|
|||||||
int _offboard_mission_sub;
|
int _offboard_mission_sub;
|
||||||
int _mission_result_sub;
|
int _mission_result_sub;
|
||||||
orb_advert_t _offboard_mission_pub;
|
orb_advert_t _offboard_mission_pub;
|
||||||
orb_advert_t _geofence_update_pub;
|
|
||||||
|
|
||||||
MavlinkRateLimiter _slow_rate_limiter;
|
MavlinkRateLimiter _slow_rate_limiter;
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,6 @@ private:
|
|||||||
int _param_update_sub{-1}; /**< param update subscription */
|
int _param_update_sub{-1}; /**< param update subscription */
|
||||||
int _sensor_combined_sub{-1}; /**< sensor combined subscription */
|
int _sensor_combined_sub{-1}; /**< sensor combined subscription */
|
||||||
int _vehicle_command_sub{-1}; /**< vehicle commands (onboard and offboard) */
|
int _vehicle_command_sub{-1}; /**< vehicle commands (onboard and offboard) */
|
||||||
int _geofence_update_sub{-1}; /**< geofence updates */
|
|
||||||
int _vstatus_sub{-1}; /**< vehicle status subscription */
|
int _vstatus_sub{-1}; /**< vehicle status subscription */
|
||||||
|
|
||||||
orb_advert_t _att_sp_pub{nullptr};
|
orb_advert_t _att_sp_pub{nullptr};
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include <uORB/uORB.h>
|
#include <uORB/uORB.h>
|
||||||
#include <uORB/topics/geofence_update.h>
|
|
||||||
#include <uORB/topics/fw_pos_ctrl_status.h>
|
#include <uORB/topics/fw_pos_ctrl_status.h>
|
||||||
#include <uORB/topics/home_position.h>
|
#include <uORB/topics/home_position.h>
|
||||||
#include <uORB/topics/mission.h>
|
#include <uORB/topics/mission.h>
|
||||||
@@ -252,7 +251,6 @@ Navigator::task_main()
|
|||||||
_offboard_mission_sub = orb_subscribe(ORB_ID(offboard_mission));
|
_offboard_mission_sub = orb_subscribe(ORB_ID(offboard_mission));
|
||||||
_param_update_sub = orb_subscribe(ORB_ID(parameter_update));
|
_param_update_sub = orb_subscribe(ORB_ID(parameter_update));
|
||||||
_vehicle_command_sub = orb_subscribe(ORB_ID(vehicle_command));
|
_vehicle_command_sub = orb_subscribe(ORB_ID(vehicle_command));
|
||||||
_geofence_update_sub = orb_subscribe(ORB_ID(geofence_update));
|
|
||||||
|
|
||||||
/* copy all topics first time */
|
/* copy all topics first time */
|
||||||
vehicle_status_update();
|
vehicle_status_update();
|
||||||
@@ -346,15 +344,6 @@ Navigator::task_main()
|
|||||||
params_update();
|
params_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* geofence updated */
|
|
||||||
orb_check(_geofence_update_sub, &updated);
|
|
||||||
|
|
||||||
if (updated) {
|
|
||||||
geofence_update_s geofence_update;
|
|
||||||
orb_copy(ORB_ID(geofence_update), _geofence_update_sub, &geofence_update);
|
|
||||||
_geofence.updateFence();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* vehicle status updated */
|
/* vehicle status updated */
|
||||||
orb_check(_vstatus_sub, &updated);
|
orb_check(_vstatus_sub, &updated);
|
||||||
|
|
||||||
@@ -706,8 +695,6 @@ Navigator::task_main()
|
|||||||
_param_update_sub = -1;
|
_param_update_sub = -1;
|
||||||
orb_unsubscribe(_vehicle_command_sub);
|
orb_unsubscribe(_vehicle_command_sub);
|
||||||
_vehicle_command_sub = -1;
|
_vehicle_command_sub = -1;
|
||||||
orb_unsubscribe(_geofence_update_sub);
|
|
||||||
_geofence_update_sub = -1;
|
|
||||||
|
|
||||||
PX4_INFO("exiting");
|
PX4_INFO("exiting");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user