Firmware
|
Driver for the BlinkM LED controller connected via I2C. More...
#include <strings.h>
#include <px4_config.h>
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <poll.h>
#include <px4_workqueue.h>
#include <perf/perf_counter.h>
#include <systemlib/err.h>
#include <board_config.h>
#include <drivers/device/i2c.h>
#include <drivers/drv_blinkm.h>
#include <uORB/uORB.h>
#include <uORB/topics/vehicle_status.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/vehicle_gps_position.h>
#include <uORB/topics/safety.h>
Classes | |
class | BlinkM |
Functions | |
__EXPORT int | blinkm_main (int argc, char *argv[]) |
void | blinkm_usage () |
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