Path: blob/master/libraries/AP_Airspeed/AP_Airspeed_External.h
9785 views
/*1external AHRS airspeed backend2*/3#pragma once45#include "AP_Airspeed_config.h"67#if AP_AIRSPEED_EXTERNAL_ENABLED89#include "AP_Airspeed_Backend.h"10#include <AP_ExternalAHRS/AP_ExternalAHRS.h>1112class AP_Airspeed_External : public AP_Airspeed_Backend13{14public:15AP_Airspeed_External(AP_Airspeed &airspeed, uint8_t instance);1617bool init(void) override {18return true;19}2021void handle_external(const AP_ExternalAHRS::airspeed_data_message_t &pkt) override;2223// return the current differential_pressure in Pascal24bool get_differential_pressure(float &pressure) override;2526// temperature not available via analog backend27bool get_temperature(float &temperature) override;2829private:30float sum_pressure;31uint8_t press_count;32float sum_temperature;33uint8_t temperature_count;34};3536#endif // AP_AIRSPEED_EXTERNAL_ENABLED37383940