51 #include <px4_platform_common/px4_config.h> 52 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 75 class CM8JL65 :
public px4::ScheduledWorkItem
83 CM8JL65(
const char *port, uint8_t rotation = distance_sensor_s::ROTATION_DOWNWARD_FACING);
115 uint16_t crc16_calc(
const unsigned char *data_frame, uint8_t crc16_length);
123 uint16_t &
crc16,
int &distance);
129 int open_serial_port(
const speed_t speed = B115200);
156 int _file_descriptor{-1};
158 uint8_t _linebuf[25] {};
static constexpr unsigned char START_FRAME_DIGIT1
static constexpr unsigned char START_FRAME_DIGIT2
measure the time elapsed performing an event
static constexpr uint8_t DISTANCE_MSB_POS
Frame format definition 1B 1B 1B 1B 2B | 0xA5 | 0x5A | distance-MSB | distance-LSB | crc-16 |...
count the number of times an event occurs
High-resolution timer with callouts and timekeeping.
PX4Rangefinder _px4_rangefinder
void init()
Activates/configures the hardware registers.
static constexpr uint8_t PARSER_BUF_LENGTH
uint16_t crc16(const uint8_t *data_p, uint32_t length)
Calculate buffer CRC16.
static constexpr uint8_t DISTANCE_LSB_POS
static constexpr uint32_t CM8JL65_MEASURE_INTERVAL
Performance measuring tools.