Ardupilot2/libraries/AP_Proximity/AP_Proximity_Backend_Serial.h
Randy Mackay 6025b1dcaa AP_Proximity: move params to separate class
simplies increasing the maximum number of backends
2022-08-24 18:26:27 +10:00

24 lines
600 B
C++

#pragma once
#include "AP_Proximity_Backend.h"
#if HAL_PROXIMITY_ENABLED
class AP_Proximity_Backend_Serial : public AP_Proximity_Backend
{
public:
AP_Proximity_Backend_Serial(AP_Proximity &_frontend,
AP_Proximity::Proximity_State &_state,
AP_Proximity_Params& _params);
// static detection function
static bool detect(uint8_t instance);
protected:
virtual uint16_t rxspace() const { return 0; };
AP_HAL::UARTDriver *_uart; // uart for communicating with sensor
};
#endif // HAL_PROXIMITY_ENABLED