30 uint8_t serial_instance) :
34 if (
uart !=
nullptr) {
52 if (
uart ==
nullptr) {
60 while (nbytes-- > 0) {
67 }
else if (isdigit(c) || c ==
'.') {
82 reading_cm = 100 * sum /
count;
static AP_SerialManager serial_manager
AP_RangeFinder_LightWareSerial(RangeFinder::RangeFinder_State &_state, AP_SerialManager &serial_manager, uint8_t serial_instance)
virtual void begin(uint32_t baud)=0
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
static bool detect(AP_SerialManager &serial_manager, uint8_t serial_instance)
uint32_t find_baudrate(enum SerialProtocol protocol, uint8_t instance) const
AP_HAL::UARTDriver * uart
virtual size_t write(uint8_t)=0
virtual uint32_t available()=0
bool get_reading(uint16_t &reading_cm)
void set_status(RangeFinder::RangeFinder_Status status)
RangeFinder::RangeFinder_State & state
AP_HAL::UARTDriver * find_serial(enum SerialProtocol protocol, uint8_t instance) const