Path: blob/master/libraries/AP_Frsky_Telem/AP_Frsky_MAVliteMsgHandler.h
9836 views
#pragma once12#include "AP_Frsky_MAVlite.h"3#include "AP_Frsky_Telem.h"4#include "AP_Frsky_MAVlite_Message.h"56#if HAL_WITH_FRSKY_TELEM_BIDIRECTIONAL78class AP_Frsky_MAVliteMsgHandler {9public:1011FUNCTOR_TYPEDEF(send_mavlite_fn_t, bool, const AP_Frsky_MAVlite_Message &);12AP_Frsky_MAVliteMsgHandler(send_mavlite_fn_t send_fn) :13_send_fn(send_fn) {}1415void process_message(const AP_Frsky_MAVlite_Message &rxmsg);1617private:18// mavlite messages tx/rx methods19bool send_message(AP_Frsky_MAVlite_Message &txmsg);2021// gcs mavlite methods22void handle_param_request_read(const AP_Frsky_MAVlite_Message &rxmsg);23void handle_param_set(const AP_Frsky_MAVlite_Message &rxmsg);2425void handle_command_long(const AP_Frsky_MAVlite_Message &rxmsg);2627MAV_RESULT handle_command(const mavlink_command_long_t &mav_command_long);28MAV_RESULT handle_command_preflight_calibration_baro(const mavlink_command_long_t &mav_command_long);29MAV_RESULT handle_command_do_set_mode(const mavlink_command_long_t &mav_command_long);30MAV_RESULT handle_command_do_fence_enable(const mavlink_command_long_t &mav_command_long);31MAV_RESULT handle_command_preflight_reboot(const mavlink_command_long_t &mav_command_long);3233void send_command_ack(const MAV_RESULT mav_result, const uint16_t cmdid);3435send_mavlite_fn_t _send_fn;36};3738#endif394041