PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <string.h>
#include <containers/Array.hpp>
#include <drivers/device/i2c.h>
#include <drivers/drv_range_finder.h>
#include <perf/perf_counter.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/module_params.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 | MappyDot |
Namespaces | |
mappydot | |
Local functions in support of the shell command. | |
Functions | |
int | mappydot::start () |
Attempt to start driver on all available I2C busses. More... | |
int | mappydot::start_bus (int i2c_bus) |
Start the driver on a specific bus. More... | |
int | mappydot::status () |
Print the driver status. More... | |
int | mappydot::stop () |
Stop the driver. More... | |
int | mappydot::usage () |
Print usage information about the driver. More... | |
__EXPORT int | mappydot_main (int argc, char *argv[]) |
Driver 'main' command. More... | |
Variables | |
MappyDot * | mappydot::g_dev |
Driver for Mappydot infrared rangefinders connected via I2C.
Definition in file MappyDot.cpp.
#define MAPPYDOT_AMBIENT_RATE_RETURN 0x41 |
Definition at line 99 of file MappyDot.cpp.
#define MAPPYDOT_AVERAGING_DISABLE 0x76 |
Definition at line 86 of file MappyDot.cpp.
#define MAPPYDOT_AVERAGING_ENABLE 0x56 |
Definition at line 72 of file MappyDot.cpp.
#define MAPPYDOT_AVERAGING_SAMPLES 0x69 |
Definition at line 78 of file MappyDot.cpp.
#define MAPPYDOT_BASE_ADDR 0x08 |
Definition at line 140 of file MappyDot.cpp.
Referenced by MappyDot::init().
#define MAPPYDOT_BUS_CLOCK 400000 |
Definition at line 136 of file MappyDot.cpp.
#define MAPPYDOT_BUS_DEFAULT PX4_I2C_BUS_EXPANSION |
Definition at line 141 of file MappyDot.cpp.
Referenced by mappydot_main(), and mappydot::usage().
#define MAPPYDOT_CALIBRATE_CROSSTALK 0x78 |
Definition at line 87 of file MappyDot.cpp.
#define MAPPYDOT_CALIBRATE_DISTANCE_OFFSET 0x61 |
Definition at line 74 of file MappyDot.cpp.
#define MAPPYDOT_CALIBRATE_SPAD 0x75 |
Definition at line 85 of file MappyDot.cpp.
#define MAPPYDOT_CHECK_INTERRUPT 0x49 |
Definition at line 57 of file MappyDot.cpp.
#define MAPPYDOT_DEVICE_NAME 0x64 |
Definition at line 93 of file MappyDot.cpp.
#define MAPPYDOT_DEVICE_PATH "/dev/mappydot" |
Definition at line 137 of file MappyDot.cpp.
#define MAPPYDOT_DISABLE_CROSSTALK_COMPENSATION 0x6B |
Definition at line 79 of file MappyDot.cpp.
#define MAPPYDOT_ENABLE_CROSSTALK_COMPENSATION 0x4B |
Definition at line 68 of file MappyDot.cpp.
#define MAPPYDOT_ENTER_FACTORY_MODE 0x23 |
Definition at line 107 of file MappyDot.cpp.
#define MAPPYDOT_FILTERING_DISABLE 0x66 |
Definition at line 76 of file MappyDot.cpp.
#define MAPPYDOT_FILTERING_ENABLE 0x46 |
Definition at line 66 of file MappyDot.cpp.
#define MAPPYDOT_FIRMWARE_VERSION 0x4E |
Definition at line 91 of file MappyDot.cpp.
#define MAPPYDOT_GPIO_HIGH 0x6F |
Definition at line 125 of file MappyDot.cpp.
#define MAPPYDOT_GPIO_LOW 0x66 |
Definition at line 123 of file MappyDot.cpp.
#define MAPPYDOT_GPIO_MEASUREMENT_INTERRUPT 0x6D |
Definition at line 124 of file MappyDot.cpp.
#define MAPPYDOT_GPIO_PWM_ENABLED 0x70 |
Definition at line 126 of file MappyDot.cpp.
#define MAPPYDOT_GPIO_THRESHOLD_ENABLED 0x74 |
Definition at line 127 of file MappyDot.cpp.
#define MAPPYDOT_INTERSENSOR_CROSSTALK_MEASUREMENT_DELAY 0x51 |
Definition at line 70 of file MappyDot.cpp.
#define MAPPYDOT_INTERSENSOR_CROSSTALK_REDUCTION_DISABLE 0x74 |
Definition at line 84 of file MappyDot.cpp.
#define MAPPYDOT_INTERSENSOR_CROSSTALK_REDUCTION_ENABLE 0x54 |
Definition at line 71 of file MappyDot.cpp.
#define MAPPYDOT_INTERSENSOR_CROSSTALK_TIMEOUT 0x71 |
Definition at line 83 of file MappyDot.cpp.
#define MAPPYDOT_INTERSENSOR_SYNC_DISABLE 0x79 |
Definition at line 88 of file MappyDot.cpp.
#define MAPPYDOT_INTERSENSOR_SYNC_ENABLE 0x59 |
Definition at line 73 of file MappyDot.cpp.
#define MAPPYDOT_LED_MEASUREMENT_OUTPUT 0x6D |
Definition at line 117 of file MappyDot.cpp.
#define MAPPYDOT_LED_OFF 0x66 |
Definition at line 116 of file MappyDot.cpp.
#define MAPPYDOT_LED_ON 0x6F |
Definition at line 118 of file MappyDot.cpp.
#define MAPPYDOT_LED_PWM_ENABLED 0x70 |
Definition at line 119 of file MappyDot.cpp.
#define MAPPYDOT_LED_THRESHOLD_ENABLED 0x74 |
Definition at line 120 of file MappyDot.cpp.
#define MAPPYDOT_LONG_RANGE 0x6C |
Definition at line 111 of file MappyDot.cpp.
Referenced by MappyDot::init().
#define MAPPYDOT_MAX_DISTANCE (4.f) |
Definition at line 134 of file MappyDot.cpp.
Referenced by MappyDot::collect().
#define MAPPYDOT_MEASUREMENT_BUDGET 0x42 |
Definition at line 55 of file MappyDot.cpp.
Referenced by MappyDot::init().
#define MAPPYDOT_MEASUREMENT_INTERVAL_USEC 50000 |
Definition at line 142 of file MappyDot.cpp.
Referenced by MappyDot::init(), and MappyDot::start().
#define MAPPYDOT_MED_RANGE 0x6D |
Definition at line 112 of file MappyDot.cpp.
#define MAPPYDOT_MIN_DISTANCE (0.2f) |
Definition at line 133 of file MappyDot.cpp.
Referenced by MappyDot::collect().
#define MAPPYDOT_NAME_DEVICE 0x6E |
Definition at line 94 of file MappyDot.cpp.
#define MAPPYDOT_PERFORM_SINGLE_RANGE 0x53 |
Definition at line 59 of file MappyDot.cpp.
Referenced by MappyDot::probe().
#define MAPPYDOT_RANGING_MEASUREMENT_MODE 0x6D |
Definition at line 61 of file MappyDot.cpp.
Referenced by MappyDot::init().
#define MAPPYDOT_READ_ACCURACY 0x52 |
Definition at line 58 of file MappyDot.cpp.
#define MAPPYDOT_READ_CURRENT_SETTINGS 0x62 |
Definition at line 92 of file MappyDot.cpp.
#define MAPPYDOT_READ_DISTANCE 0x72 |
Definition at line 62 of file MappyDot.cpp.
#define MAPPYDOT_READ_ERROR_CODE 0x45 |
Definition at line 56 of file MappyDot.cpp.
#define MAPPYDOT_READ_NONFILTERED_VALUE 0x6A |
Definition at line 104 of file MappyDot.cpp.
#define MAPPYDOT_REBOOT_TO_BOOTLOADER 0x01 |
Definition at line 130 of file MappyDot.cpp.
#define MAPPYDOT_REGION_OF_INTEREST 0x70 |
Definition at line 82 of file MappyDot.cpp.
#define MAPPYDOT_RESET_VL53L1X_RANGING 0x58 |
Definition at line 102 of file MappyDot.cpp.
#define MAPPYDOT_RESTORE_FACTORY_DEFAULTS 0x7A |
Definition at line 96 of file MappyDot.cpp.
#define MAPPYDOT_SET_CONTINUOUS_RANGING_MODE 0x63 |
Definition at line 60 of file MappyDot.cpp.
#define MAPPYDOT_SET_GPIO_MODE 0x67 |
Definition at line 77 of file MappyDot.cpp.
#define MAPPYDOT_SET_GPIO_THRESHOLD_DISTANCE_IN_MM 0x6F |
Definition at line 81 of file MappyDot.cpp.
#define MAPPYDOT_SET_LED_MODE 0x6C |
Definition at line 80 of file MappyDot.cpp.
#define MAPPYDOT_SET_LED_THRESHOLD_DISTANCE_IN_MM 0x65 |
Definition at line 75 of file MappyDot.cpp.
Referenced by MappyDot::init().
#define MAPPYDOT_SET_SINGLE_RANGING_MODE 0x73 |
Definition at line 63 of file MappyDot.cpp.
#define MAPPYDOT_SHORT_RANGE 0x73 |
Definition at line 113 of file MappyDot.cpp.
#define MAPPYDOT_SIGMA_LIMIT_CHECK_VALUE 0x4C |
Definition at line 69 of file MappyDot.cpp.
#define MAPPYDOT_SIGNAL_LIMIT_CHECK_VALUE 0x47 |
Definition at line 67 of file MappyDot.cpp.
#define MAPPYDOT_SIGNAL_RATE_RETURN 0x4A |
Definition at line 101 of file MappyDot.cpp.
#define MAPPYDOT_VL53L1X_NOT_SHUTDOWN 0x48 |
Definition at line 100 of file MappyDot.cpp.
#define MAPPYDOT_VL53L1X_SHUTDOWN 0x68 |
Definition at line 103 of file MappyDot.cpp.
#define MAPPYDOT_WIPE_ALL_SETTINGS 0x3C |
Definition at line 108 of file MappyDot.cpp.
#define MAPPYDOT_WRITE_CURRENT_SETTINGS_AS_START_UP_DEFAULT 0x77 |
Definition at line 95 of file MappyDot.cpp.
__EXPORT int mappydot_main | ( | int | argc, |
char * | argv[] | ||
) |
Driver 'main' command.
Definition at line 563 of file MappyDot.cpp.
References MAPPYDOT_BUS_DEFAULT, mappydot::start(), mappydot::start_bus(), mappydot::status(), mappydot::stop(), and mappydot::usage().