APM:Libraries
|
#include <AP_RangeFinder_NMEA.h>
Public Member Functions | |
AP_RangeFinder_NMEA (RangeFinder::RangeFinder_State &_state, AP_SerialManager &serial_manager, uint8_t serial_instance) | |
void | update (void) override |
Public Member Functions inherited from AP_RangeFinder_Backend | |
AP_RangeFinder_Backend (RangeFinder::RangeFinder_State &_state) | |
virtual | ~AP_RangeFinder_Backend (void) |
virtual void | handle_msg (mavlink_message_t *msg) |
void | update_pre_arm_check () |
enum Rotation | orientation () const |
uint16_t | distance_cm () const |
uint16_t | voltage_mv () const |
int16_t | max_distance_cm () const |
int16_t | min_distance_cm () const |
int16_t | ground_clearance_cm () const |
MAV_DISTANCE_SENSOR | get_mav_distance_sensor_type () const |
RangeFinder::RangeFinder_Status | status () const |
RangeFinder::RangeFinder_Type | type () const |
bool | has_data () const |
uint8_t | range_valid_count () const |
const Vector3f & | get_pos_offset () const |
Static Public Member Functions | |
static bool | detect (AP_SerialManager &serial_manager, uint8_t serial_instance) |
Protected Member Functions | |
virtual MAV_DISTANCE_SENSOR | _get_mav_distance_sensor_type () const override |
Protected Member Functions inherited from AP_RangeFinder_Backend | |
void | update_status () |
void | set_status (RangeFinder::RangeFinder_Status status) |
Private Types | |
enum | sentence_types : uint8_t { SONAR_UNKNOWN = 0, SONAR_DBT, SONAR_DPT } |
enum for handled messages More... | |
Private Member Functions | |
bool | get_reading (uint16_t &reading_cm) |
bool | decode (char c) |
bool | decode_latest_term () |
Static Private Member Functions | |
static int16_t | char_to_hex (char a) |
Private Attributes | |
AP_HAL::UARTDriver * | uart = nullptr |
uint32_t | _last_reading_ms |
char | _term [15] |
uint8_t | _term_offset |
uint8_t | _term_number |
float | _distance_m |
uint8_t | _checksum |
bool | _term_is_checksum |
sentence_types | _sentence_type |
Additional Inherited Members | |
Protected Attributes inherited from AP_RangeFinder_Backend | |
RangeFinder::RangeFinder_State & | state |
AP_HAL::Semaphore * | _sem |
Definition at line 21 of file AP_RangeFinder_NMEA.h.
|
private |
enum for handled messages
Enumerator | |
---|---|
SONAR_UNKNOWN | |
SONAR_DBT | |
SONAR_DPT |
Definition at line 45 of file AP_RangeFinder_NMEA.h.
AP_RangeFinder_NMEA::AP_RangeFinder_NMEA | ( | RangeFinder::RangeFinder_State & | _state, |
AP_SerialManager & | serial_manager, | ||
uint8_t | serial_instance | ||
) |
|
inlineoverrideprotectedvirtual |
Implements AP_RangeFinder_Backend.
Definition at line 38 of file AP_RangeFinder_NMEA.h.
|
staticprivate |
Definition at line 178 of file AP_RangeFinder_NMEA.cpp.
Referenced by decode_latest_term().
|
private |
Definition at line 89 of file AP_RangeFinder_NMEA.cpp.
Referenced by get_reading().
|
private |
Definition at line 132 of file AP_RangeFinder_NMEA.cpp.
Referenced by decode().
|
static |
Definition at line 40 of file AP_RangeFinder_NMEA.cpp.
Referenced by RangeFinder::detect_instance().
|
private |
Definition at line 59 of file AP_RangeFinder_NMEA.cpp.
Referenced by update().
|
overridevirtual |
Implements AP_RangeFinder_Backend.
Definition at line 46 of file AP_RangeFinder_NMEA.cpp.
|
private |
Definition at line 74 of file AP_RangeFinder_NMEA.h.
Referenced by decode(), and decode_latest_term().
|
private |
Definition at line 73 of file AP_RangeFinder_NMEA.h.
Referenced by decode(), decode_latest_term(), and get_reading().
|
private |
Definition at line 67 of file AP_RangeFinder_NMEA.h.
Referenced by update().
|
private |
Definition at line 76 of file AP_RangeFinder_NMEA.h.
Referenced by decode(), and decode_latest_term().
|
private |
Definition at line 70 of file AP_RangeFinder_NMEA.h.
Referenced by decode(), and decode_latest_term().
|
private |
Definition at line 75 of file AP_RangeFinder_NMEA.h.
Referenced by decode(), and decode_latest_term().
|
private |
Definition at line 72 of file AP_RangeFinder_NMEA.h.
Referenced by decode(), and decode_latest_term().
|
private |
Definition at line 71 of file AP_RangeFinder_NMEA.h.
Referenced by decode().
|
private |
Definition at line 66 of file AP_RangeFinder_NMEA.h.
Referenced by AP_RangeFinder_NMEA(), and get_reading().