MissionItemProtocol_Rally.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include "MissionItemProtocol.h"
  3. class MissionItemProtocol_Rally : public MissionItemProtocol {
  4. public:
  5. MissionItemProtocol_Rally(class AP_Rally &_rally) :
  6. rally(_rally) {}
  7. void truncate(const mavlink_mission_count_t &packet) override;
  8. MAV_MISSION_TYPE mission_type() const override { return MAV_MISSION_TYPE_RALLY; }
  9. MAV_MISSION_RESULT complete(const GCS_MAVLINK &_link) override;
  10. void timeout() override;
  11. protected:
  12. ap_message next_item_ap_message_id() const override {
  13. return MSG_NEXT_MISSION_REQUEST_RALLY;
  14. }
  15. bool clear_all_items() override WARN_IF_UNUSED;
  16. private:
  17. AP_Rally &rally;
  18. uint16_t item_count() const override;
  19. uint16_t max_items() const override;
  20. MAV_MISSION_RESULT replace_item(const mavlink_mission_item_int_t&) override WARN_IF_UNUSED;
  21. MAV_MISSION_RESULT append_item(const mavlink_mission_item_int_t&) override WARN_IF_UNUSED;
  22. MAV_MISSION_RESULT get_item(const GCS_MAVLINK &_link,
  23. const mavlink_message_t &msg,
  24. const mavlink_mission_request_int_t &packet,
  25. mavlink_mission_item_int_t &ret_packet) override WARN_IF_UNUSED;
  26. static MAV_MISSION_RESULT convert_MISSION_ITEM_INT_to_RallyLocation(const mavlink_mission_item_int_t &cmd, class RallyLocation &ret) WARN_IF_UNUSED;
  27. };