Path: blob/master/libraries/AP_Airspeed/AP_Airspeed_MSP.h
9784 views
/*1MSP airspeed backend2*/3#pragma once45#include "AP_Airspeed_config.h"67#if AP_AIRSPEED_MSP_ENABLED89#include "AP_Airspeed_Backend.h"1011#include <AP_MSP/msp.h>1213class AP_Airspeed_MSP : public AP_Airspeed_Backend14{15public:16AP_Airspeed_MSP(AP_Airspeed &airspeed, uint8_t instance, uint8_t msp_instance);1718bool init(void) override {19return true;20}2122void handle_msp(const MSP::msp_airspeed_data_message_t &pkt) override;2324// return the current differential_pressure in Pascal25bool get_differential_pressure(float &pressure) override;2627// temperature not available via analog backend28bool get_temperature(float &temperature) override;2930private:31const uint8_t msp_instance;32float sum_pressure;33uint8_t press_count;34float sum_temp;35uint8_t temp_count;36};3738#endif // AP_AIRSPEED_MSP_ENABLED394041