2019-12-04 00:49:29 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AP_Proximity_Backend.h"
|
|
|
|
|
2021-03-25 04:32:09 -03:00
|
|
|
#if HAL_PROXIMITY_ENABLED
|
|
|
|
|
2019-12-04 00:49:29 -04:00
|
|
|
class AP_Proximity_Backend_Serial : public AP_Proximity_Backend
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AP_Proximity_Backend_Serial(AP_Proximity &_frontend,
|
|
|
|
AP_Proximity::Proximity_State &_state);
|
|
|
|
// static detection function
|
|
|
|
static bool detect();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual uint16_t rxspace() const { return 0; };
|
|
|
|
|
|
|
|
AP_HAL::UARTDriver *_uart; // uart for communicating with sensor
|
|
|
|
};
|
2021-03-25 04:32:09 -03:00
|
|
|
|
|
|
|
#endif // HAL_PROXIMITY_ENABLED
|