PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Driver for the BlinkM LED controller connected via I2C. More...
#include <ctype.h>
#include <string.h>
#include <strings.h>
#include <drivers/device/i2c.h>
#include <drivers/drv_blinkm.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <uORB/Subscription.hpp>
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/safety.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/vehicle_gps_position.h>
#include <uORB/topics/vehicle_status.h>
Go to the source code of this file.
Classes | |
class | BlinkM |
Functions | |
__EXPORT int | blinkm_main (int argc, char *argv[]) |
void | blinkm_usage () |
Variables | |
static const int | LED_ONTIME = 120 |
static const int | LED_OFFTIME = 120 |
static const int | LED_BLINK = 1 |
static const int | LED_NOBLINK = 0 |
Driver for the BlinkM LED controller connected via I2C.
Connect the BlinkM to I2C3 and put the following line to the rc startup-script: blinkm start
To start the system monitor put in the next line after the blinkm start: blinkm systemmonitor
Description: After startup, the Application checked how many lipo cells are connected to the System. The recognized number off cells, will be blinked 5 times in purple color. 2 Cells = 2 blinks ... 6 Cells = 6 blinks Now the Application will show the actual selected Flightmode, GPS-Fix and Battery Warnings and Alerts.
System disarmed and safe: The BlinkM should light solid cyan.
System safety off but not armed: The BlinkM should light flashing orange
System armed: One message is made of 4 Blinks and a pause in the same length as the 4 blinks.
G G G M P P P O S S S D E
(X = on, _=off)
The first 3 blinks indicates the status of the GPS-Signal (red): 0-4 satellites = X-X-X-X-X-_-_-_-_-_- 5 satellites = X-X-_-X-X-_-_-_-_-_- 6 satellites = X-_-_-X-X-_-_-_-_-_- >=7 satellites = _-_-_-X-X-_-_-_-_-_- If no GPS is found the first 3 blinks are white
The fourth Blink indicates the Flightmode: MANUAL : amber STABILIZED : yellow HOLD : blue AUTO : green
Battery Warning (low Battery Level): Continuously blinking in yellow X-X-X-X-X-X-X-X-X-X
Battery Alert (critical Battery Level) Continuously blinking in red X-X-X-X-X-X-X-X-X-X
General Error (no uOrb Data) Continuously blinking in white X-X-X-X-X-X-X-X-X-X
Definition in file blinkm.cpp.
int blinkm_main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 938 of file blinkm.cpp.
References BlinkM::BlinkM(), BLINKM0_DEVICE_PATH, BLINKM_PLAY_SCRIPT_NAMED, blinkm_usage(), fd, OK, px4_close(), px4_ioctl(), px4_open(), BlinkM::script_names, warn, and warnx.
void blinkm_usage | ( | ) |
Definition at line 929 of file blinkm.cpp.
References warnx.
Referenced by blinkm_main(), and BlinkM::get_firmware_version().
|
static |
Definition at line 113 of file blinkm.cpp.
Referenced by BlinkM::Run().
|
static |
Definition at line 114 of file blinkm.cpp.
Referenced by BlinkM::Run().
|
static |
Definition at line 112 of file blinkm.cpp.
Referenced by BlinkM::Run().
|
static |
Definition at line 111 of file blinkm.cpp.
Referenced by BlinkM::Run().