GCS_MAVLink: correct compilation with rally disabled
This commit is contained in:
parent
339dd33240
commit
2da23a218a
@ -2209,10 +2209,12 @@ void GCS::update_send()
|
||||
if (mission != nullptr) {
|
||||
_missionitemprotocol_waypoints = new MissionItemProtocol_Waypoints(*mission);
|
||||
}
|
||||
#if HAL_RALLY_ENABLED
|
||||
AP_Rally *rally = AP::rally();
|
||||
if (rally != nullptr) {
|
||||
_missionitemprotocol_rally = new MissionItemProtocol_Rally(*rally);
|
||||
}
|
||||
#endif
|
||||
#if AP_FENCE_ENABLED
|
||||
AC_Fence *fence = AP::fence();
|
||||
if (fence != nullptr) {
|
||||
@ -2223,9 +2225,11 @@ void GCS::update_send()
|
||||
if (_missionitemprotocol_waypoints != nullptr) {
|
||||
_missionitemprotocol_waypoints->update();
|
||||
}
|
||||
#if HAL_RALLY_ENABLED
|
||||
if (_missionitemprotocol_rally != nullptr) {
|
||||
_missionitemprotocol_rally->update();
|
||||
}
|
||||
#endif
|
||||
#if AP_FENCE_ENABLED
|
||||
if (_missionitemprotocol_fence != nullptr) {
|
||||
_missionitemprotocol_fence->update();
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <AP_Rally/AP_Rally.h>
|
||||
#include <GCS_MAVLink/GCS.h>
|
||||
|
||||
#if HAL_RALLY_ENABLED
|
||||
|
||||
MAV_MISSION_RESULT MissionItemProtocol_Rally::append_item(const mavlink_mission_item_int_t &cmd)
|
||||
{
|
||||
@ -137,3 +138,5 @@ void MissionItemProtocol_Rally::truncate(const mavlink_mission_count_t &packet)
|
||||
{
|
||||
rally.truncate(packet.count);
|
||||
}
|
||||
|
||||
#endif // HAL_RALLY_ENABLED
|
||||
|
@ -1,9 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "MissionItemProtocol.h"
|
||||
#include <AP_Rally/AP_Rally.h>
|
||||
|
||||
#if HAL_RALLY_ENABLED
|
||||
|
||||
#include "MissionItemProtocol.h"
|
||||
|
||||
class MissionItemProtocol_Rally : public MissionItemProtocol {
|
||||
public:
|
||||
MissionItemProtocol_Rally(class AP_Rally &_rally) :
|
||||
@ -44,4 +46,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // HAL_RALLY_ENABLED
|
||||
|
Loading…
Reference in New Issue
Block a user