63 int init(
const char *uart_device);
123 bool decodeByte(uint8_t byte,
bool &successful_decoding);
125 static inline uint8_t
updateCrc8(uint8_t crc, uint8_t crc_seed);
126 static uint8_t
crc8(
const uint8_t *buf, uint8_t len);
static uint8_t crc8(const uint8_t *buf, uint8_t len)
static uint8_t updateCrc8(uint8_t crc, uint8_t crc_seed)
uint8_t _frame_buffer[ESC_FRAME_SIZE]
bool decodeByte(uint8_t byte, bool &successful_decoding)
Decode a single byte from an ESC feedback frame.
int getRequestMotorIndex()
Get the motor index for which telemetry should be requested.
void setNumMotors(int num_motors)
static constexpr int esc_info_size_kiss_v1
int8_t temperature
[deg C]
High-resolution timer with callouts and timekeeping.
int _num_successful_responses
int update()
Read telemetry from the UART (non-blocking) and handle timeouts.
const EscData & latestESCData() const
int setBaudrate(unsigned baud)
set the Baudrate
bool expectingData() const
Check whether we are currently expecting to read new data from an ESC.
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
int redirectOutput(OutputBuffer &buffer)
Redirect everything that is read into a different buffer.
bool redirectActive() const
int init(const char *uart_device)
static constexpr int esc_info_size_blheli32
static constexpr int max_esc_info_size
static void decodeAndPrintEscInfoPacket(const OutputBuffer &buffer)
OutputBuffer * _redirect_output
if set, all read bytes are stored here instead of the internal buffer
static constexpr int esc_info_size_kiss_v2
int _current_motor_index_request
hrt_abstime _current_request_start
static constexpr int ESC_FRAME_SIZE