Line data Source code
1 : #pragma once 2 : 3 : #include <GCS_MAVLink/GCS.h> 4 : #include "GCS_MAVLink_Sub.h" 5 : 6 : class GCS_Sub : public GCS 7 : { 8 : friend class Sub; // for access to _chan in parameter declarations 9 : 10 : public: 11 : 12 : // the following define expands to a pair of methods to retrieve a 13 : // pointer to an object of the correct subclass for the link at 14 : // offset ofs. These are of the form: 15 : // GCS_MAVLINK_XXXX *chan(const uint8_t ofs) override; 16 : // const GCS_MAVLINK_XXXX *chan(const uint8_t ofs) override const; 17 55982953 : GCS_MAVLINK_CHAN_METHOD_DEFINITIONS(GCS_MAVLINK_Sub); 18 : 19 : void update_vehicle_sensor_status_flags() override; 20 : 21 : uint32_t custom_mode() const override; 22 : MAV_TYPE frame_type() const override; 23 : 24 : bool vehicle_initialised() const override; 25 : 26 : protected: 27 : 28 : // minimum amount of time (in microseconds) that must remain in 29 : // the main scheduler loop before we are allowed to send any 30 : // mavlink messages. We want to prioritise the main flight 31 : // control loop over communications 32 9453430 : uint16_t min_loop_time_remaining_for_message_send_us() const override { 33 9453430 : return 250; 34 : } 35 : 36 257 : GCS_MAVLINK_Sub *new_gcs_mavlink_backend(AP_HAL::UARTDriver &uart) override { 37 257 : return NEW_NOTHROW GCS_MAVLINK_Sub(uart); 38 : } 39 : 40 : };