You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
782 B
26 lines
782 B
#pragma once |
|
|
|
#include "RangeFinder_Backend.h" |
|
|
|
class AP_RangeFinder_Backend_Serial : public AP_RangeFinder_Backend |
|
{ |
|
public: |
|
// constructor |
|
AP_RangeFinder_Backend_Serial(RangeFinder::RangeFinder_State &_state, |
|
AP_RangeFinder_Params &_params, |
|
uint8_t serial_instance); |
|
|
|
// static detection function |
|
static bool detect(uint8_t serial_instance); |
|
|
|
protected: |
|
|
|
// baudrate used during object construction: |
|
virtual uint32_t initial_baudrate(uint8_t serial_instance) const; |
|
|
|
// the value 0 is special to the UARTDriver - it's "use default" |
|
virtual uint16_t rx_bufsize() const { return 0; } |
|
virtual uint16_t tx_bufsize() const { return 0; } |
|
|
|
AP_HAL::UARTDriver *uart = nullptr; |
|
};
|
|
|