PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <TFMINI.hpp>
Public Member Functions | |
TFMINI (const char *port, uint8_t rotation=distance_sensor_s::ROTATION_DOWNWARD_FACING) | |
virtual | ~TFMINI () |
int | init () |
void | print_info () |
Private Member Functions | |
int | collect () |
void | Run () override |
void | start () |
void | stop () |
Private Attributes | |
PX4Rangefinder | _px4_rangefinder |
TFMINI_PARSE_STATE | _parse_state {TFMINI_PARSE_STATE::STATE0_UNSYNC} |
char | _linebuf [10] {} |
char | _port [20] {} |
int | _fd {-1} |
unsigned int | _linebuf_index {0} |
hrt_abstime | _last_read {0} |
perf_counter_t | _comms_errors {perf_alloc(PC_COUNT, MODULE_NAME": com_err")} |
perf_counter_t | _sample_perf {perf_alloc(PC_ELAPSED, MODULE_NAME": read")} |
Static Private Attributes | |
static constexpr int | kCONVERSIONINTERVAL {9_ms} |
Definition at line 63 of file TFMINI.hpp.
TFMINI::TFMINI | ( | const char * | port, |
uint8_t | rotation = distance_sensor_s::ROTATION_DOWNWARD_FACING |
||
) |
Definition at line 36 of file TFMINI.cpp.
References _port.
|
virtual |
Definition at line 47 of file TFMINI.cpp.
References _comms_errors, _sample_perf, perf_free(), and stop().
|
private |
Definition at line 151 of file TFMINI.cpp.
References _comms_errors, _fd, _last_read, _linebuf, _linebuf_index, _parse_state, _px4_rangefinder, _sample_perf, f(), hrt_absolute_time(), hrt_abstime, hrt_elapsed_time(), kCONVERSIONINTERVAL, perf_begin(), perf_count(), perf_end(), read(), tfmini_parse(), and PX4Rangefinder::update().
Referenced by Run().
int TFMINI::init | ( | ) |
Definition at line 57 of file TFMINI.cpp.
References _fd, _port, _px4_rangefinder, f(), math::radians(), PX4Rangefinder::set_fov(), PX4Rangefinder::set_max_distance(), PX4Rangefinder::set_min_distance(), and start().
Referenced by tfmini::start().
void TFMINI::print_info | ( | ) |
Definition at line 255 of file TFMINI.cpp.
References _comms_errors, _port, _px4_rangefinder, _sample_perf, perf_print_counter(), and PX4Rangefinder::print_status().
Referenced by tfmini::status().
|
overrideprivate |
Definition at line 237 of file TFMINI.cpp.
References _fd, _port, and collect().
|
private |
Definition at line 224 of file TFMINI.cpp.
Referenced by init().
|
private |
Definition at line 231 of file TFMINI.cpp.
Referenced by ~TFMINI().
|
private |
Definition at line 97 of file TFMINI.hpp.
Referenced by collect(), print_info(), and ~TFMINI().
|
private |
Definition at line 91 of file TFMINI.hpp.
|
private |
Definition at line 95 of file TFMINI.hpp.
Referenced by collect().
|
private |
Definition at line 86 of file TFMINI.hpp.
Referenced by collect().
|
private |
Definition at line 93 of file TFMINI.hpp.
Referenced by collect().
|
private |
Definition at line 84 of file TFMINI.hpp.
Referenced by collect().
|
private |
Definition at line 87 of file TFMINI.hpp.
Referenced by init(), print_info(), Run(), and TFMINI().
|
private |
Definition at line 82 of file TFMINI.hpp.
Referenced by collect(), init(), and print_info().
|
private |
Definition at line 98 of file TFMINI.hpp.
Referenced by collect(), print_info(), and ~TFMINI().
|
staticprivate |
Definition at line 89 of file TFMINI.hpp.
Referenced by collect().