mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
navigator: reset vehicle_roi on mission update
This commit is contained in:
parent
9355324209
commit
d5aad58c92
@ -448,6 +448,11 @@ Mission::update_mission()
|
||||
/* reset triplets */
|
||||
_navigator->reset_triplets();
|
||||
|
||||
/* Reset vehicle_roi
|
||||
* Missions that do not explicitly configure ROI would not override
|
||||
* an existing ROI setting from previous missions */
|
||||
_navigator->reset_vroi();
|
||||
|
||||
struct mission_s old_mission = _mission;
|
||||
|
||||
if (orb_copy(ORB_ID(mission), _navigator->get_mission_sub(), &_mission) == OK) {
|
||||
|
||||
@ -159,6 +159,7 @@ public:
|
||||
PrecLand *get_precland() { return &_precland; } /**< allow others, e.g. Mission, to use the precision land block */
|
||||
|
||||
const vehicle_roi_s &get_vroi() { return _vroi; }
|
||||
void reset_vroi() { _vroi = {}; }
|
||||
|
||||
bool home_alt_valid() { return (_home_pos.timestamp > 0 && _home_pos.valid_alt); }
|
||||
bool home_position_valid() { return (_home_pos.timestamp > 0 && _home_pos.valid_alt && _home_pos.valid_hpos); }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user