PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <arch/board/board.h>
#include <drivers/device/device.h>
#include <drivers/device/ringbuffer.h>
#include <drivers/drv_hrt.h>
#include <lib/drivers/rangefinder/PX4Rangefinder.hpp>
#include <perf/perf_counter.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/module.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <uORB/topics/distance_sensor.h>
Go to the source code of this file.
Classes | |
class | LeddarOne |
Namespaces | |
leddar_one | |
Local functions in support of the shell command. | |
Macros | |
#define | DEVICE_PATH "/dev/LeddarOne" |
#define | LEDDAR_ONE_DEFAULT_SERIAL_PORT "/dev/ttyS3" |
#define | LEDDAR_ONE_FIELD_OF_VIEW (0.105f) |
#define | LEDDAR_ONE_MAX_DISTANCE 40.0f |
#define | LEDDAR_ONE_MIN_DISTANCE 0.01f |
#define | LEDDAR_ONE_MEASURE_INTERVAL 100_ms |
#define | MODBUS_SLAVE_ADDRESS 0x01 |
#define | MODBUS_READING_FUNCTION 0x04 |
#define | READING_START_ADDR 0x14 |
#define | READING_LEN 0xA |
Functions | |
struct | __attribute__ ((__packed__)) reading_msg |
int | leddar_one::start (const char *port=LEDDAR_ONE_DEFAULT_SERIAL_PORT, const uint8_t rotation=distance_sensor_s::ROTATION_DOWNWARD_FACING) |
int | leddar_one::status () |
Print the driver status. More... | |
int | leddar_one::stop () |
Stop the driver. More... | |
int | leddar_one::test (const char *port) |
Perform some basic functional tests on the driver; make sure we can collect data from the sensor in polled and automatic modes. More... | |
int | leddar_one::usage () |
Prints info about the driver argument usage. More... | |
__EXPORT int | leddar_one_main (int argc, char *argv[]) |
Variables | |
static const uint8_t | request_reading_msg [] |
LeddarOne * | leddar_one::g_dev |
#define DEVICE_PATH "/dev/LeddarOne" |
Definition at line 54 of file leddar_one.cpp.
Referenced by leddar_one::start().
#define LEDDAR_ONE_DEFAULT_SERIAL_PORT "/dev/ttyS3" |
Definition at line 55 of file leddar_one.cpp.
Referenced by leddar_one_main().
#define LEDDAR_ONE_FIELD_OF_VIEW (0.105f) |
Definition at line 57 of file leddar_one.cpp.
Referenced by LeddarOne::LeddarOne().
#define LEDDAR_ONE_MAX_DISTANCE 40.0f |
Definition at line 59 of file leddar_one.cpp.
Referenced by LeddarOne::LeddarOne().
#define LEDDAR_ONE_MEASURE_INTERVAL 100_ms |
Definition at line 62 of file leddar_one.cpp.
Referenced by LeddarOne::init(), LeddarOne::print_info(), LeddarOne::start(), and leddar_one::test().
#define LEDDAR_ONE_MIN_DISTANCE 0.01f |
Definition at line 60 of file leddar_one.cpp.
Referenced by LeddarOne::LeddarOne().
#define MODBUS_READING_FUNCTION 0x04 |
Definition at line 65 of file leddar_one.cpp.
Referenced by LeddarOne::collect().
#define MODBUS_SLAVE_ADDRESS 0x01 |
Definition at line 64 of file leddar_one.cpp.
Referenced by LeddarOne::collect().
#define READING_LEN 0xA |
Definition at line 67 of file leddar_one.cpp.
#define READING_START_ADDR 0x14 |
Definition at line 66 of file leddar_one.cpp.
struct __attribute__ | ( | (__packed__) | ) |
Definition at line 80 of file leddar_one.cpp.
Referenced by test_file(), and test_mount().
__EXPORT int leddar_one_main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 593 of file leddar_one.cpp.
References LEDDAR_ONE_DEFAULT_SERIAL_PORT, leddar_one::start(), leddar_one::status(), leddar_one::stop(), leddar_one::test(), and leddar_one::usage().
|
static |
Definition at line 69 of file leddar_one.cpp.
Referenced by LeddarOne::measure(), and leddar_one::test().