Browse Source

AP_Vehicle: move control_mode_reason up to AP_Vehicle

c415-sdk
Peter Barker 4 years ago committed by Andrew Tridgell
parent
commit
f15a1fbd62
  1. 7
      libraries/AP_Vehicle/AP_Vehicle.h

7
libraries/AP_Vehicle/AP_Vehicle.h

@ -76,9 +76,14 @@ public: @@ -76,9 +76,14 @@ public:
// HAL::Callbacks implementation.
void loop() override final;
// set_mode *must* set control_mode_reason
bool virtual set_mode(const uint8_t new_mode, const ModeReason reason) = 0;
uint8_t virtual get_mode() const = 0;
ModeReason get_control_mode_reason() const {
return control_mode_reason;
}
/*
common parameters for fixed wing aircraft
*/
@ -321,6 +326,8 @@ protected: @@ -321,6 +326,8 @@ protected:
void publish_osd_info();
#endif
ModeReason control_mode_reason = ModeReason::UNKNOWN;
private:
// delay() callback that processing MAVLink packets

Loading…
Cancel
Save