PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
BlinkM (int bus, int blinkm) | |
virtual | ~BlinkM ()=default |
virtual int | init () |
virtual int | probe () |
virtual int | setMode (int mode) |
virtual int | ioctl (device::file_t *filp, int cmd, unsigned long arg) |
Static Public Attributes | |
static const char *const | script_names [] |
Private Types | |
enum | ScriptID { USER = 0, RGB, WHITE_FLASH, RED_FLASH, GREEN_FLASH, BLUE_FLASH, CYAN_FLASH, MAGENTA_FLASH, YELLOW_FLASH, BLACK, HUE_CYCLE, MOOD_LIGHT, VIRTUAL_CANDLE, WATER_REFLECTIONS, OLD_NEON, THE_SEASONS, THUNDERSTORM, STOP_LIGHT, MORSE_CODE } |
enum | ledColors { LED_OFF, LED_RED, LED_ORANGE, LED_YELLOW, LED_PURPLE, LED_GREEN, LED_BLUE, LED_CYAN, LED_WHITE, LED_AMBER } |
Private Member Functions | |
void | setLEDColor (int ledcolor) |
void | Run () override |
int | set_rgb (uint8_t r, uint8_t g, uint8_t b) |
int | fade_rgb (uint8_t r, uint8_t g, uint8_t b) |
int | fade_hsb (uint8_t h, uint8_t s, uint8_t b) |
int | fade_rgb_random (uint8_t r, uint8_t g, uint8_t b) |
int | fade_hsb_random (uint8_t h, uint8_t s, uint8_t b) |
int | set_fade_speed (uint8_t s) |
int | play_script (uint8_t script_id) |
int | play_script (const char *script_name) |
int | stop_script () |
int | write_script_line (uint8_t line, uint8_t ticks, uint8_t cmd, uint8_t arg1, uint8_t arg2, uint8_t arg3) |
int | read_script_line (uint8_t line, uint8_t &ticks, uint8_t cmd[4]) |
int | set_script (uint8_t length, uint8_t repeats) |
int | get_rgb (uint8_t &r, uint8_t &g, uint8_t &b) |
int | get_firmware_version (uint8_t version[2]) |
Private Attributes | |
int | led_color_1 |
int | led_color_2 |
int | led_color_3 |
int | led_color_4 |
int | led_color_5 |
int | led_color_6 |
int | led_color_7 |
int | led_color_8 |
int | led_blink |
bool | systemstate_run |
uORB::Subscription | vehicle_status_sub {ORB_ID(vehicle_status)} |
uORB::Subscription | battery_status_sub {ORB_ID(battery_status)} |
uORB::Subscription | vehicle_control_mode_sub {ORB_ID(vehicle_control_mode)} |
uORB::Subscription | vehicle_gps_position_sub {ORB_ID(vehicle_gps_position)} |
uORB::Subscription | actuator_armed_sub {ORB_ID(actuator_armed)} |
uORB::Subscription | safety_sub {ORB_ID(safety)} |
int | num_of_cells |
int | detected_cells_runcount |
int | t_led_color [8] |
int | t_led_blink |
int | led_thread_runcount |
int | led_interval |
bool | detected_cells_blinked |
bool | led_thread_ready |
int | num_of_used_sats |
Definition at line 116 of file blinkm.cpp.
|
private |
Enumerator | |
---|---|
LED_OFF | |
LED_RED | |
LED_ORANGE | |
LED_YELLOW | |
LED_PURPLE | |
LED_GREEN | |
LED_BLUE | |
LED_CYAN | |
LED_WHITE | |
LED_AMBER |
Definition at line 153 of file blinkm.cpp.
|
private |
Definition at line 131 of file blinkm.cpp.
BlinkM::BlinkM | ( | int | bus, |
int | blinkm | ||
) |
Definition at line 257 of file blinkm.cpp.
References detected_cells_blinked, led_interval, led_thread_ready, led_thread_runcount, num_of_used_sats, and t_led_blink.
Referenced by blinkm_main().
|
virtualdefault |
|
private |
Definition at line 788 of file blinkm.cpp.
References msg.
|
private |
Definition at line 804 of file blinkm.cpp.
References msg.
|
private |
Definition at line 780 of file blinkm.cpp.
References msg.
|
private |
Definition at line 796 of file blinkm.cpp.
References msg.
|
private |
Definition at line 920 of file blinkm.cpp.
References blinkm_usage(), and msg.
Referenced by probe().
|
private |
Definition at line 903 of file blinkm.cpp.
|
virtual |
Definition at line 283 of file blinkm.cpp.
References ToneAlarmInterface::init(), OK, set_rgb(), stop_script(), and warnx.
|
virtual |
Definition at line 332 of file blinkm.cpp.
References BLINKM_PLAY_SCRIPT, BLINKM_PLAY_SCRIPT_NAMED, BLINKM_SET_USER_SCRIPT, OK, play_script(), set_script(), and write_script_line().
|
private |
Definition at line 820 of file blinkm.cpp.
References msg.
Referenced by ioctl(), and play_script().
|
private |
Definition at line 828 of file blinkm.cpp.
References play_script(), script_names, set_rgb(), and stop_script().
|
virtual |
Definition at line 317 of file blinkm.cpp.
References DEVICE_DEBUG, get_firmware_version(), and OK.
|
private |
Definition at line 876 of file blinkm.cpp.
|
overrideprivate |
Definition at line 385 of file blinkm.cpp.
References actuator_armed_sub, battery_status_sub, uORB::Subscription::copy(), detected_cells_blinked, detected_cells_runcount, LED_BLINK, led_blink, LED_BLUE, led_color_1, led_color_2, led_color_3, led_color_4, led_color_5, led_color_6, led_color_7, led_color_8, LED_CYAN, LED_GREEN, led_interval, LED_NOBLINK, LED_OFF, LED_OFFTIME, LED_ONTIME, LED_ORANGE, LED_PURPLE, LED_RED, led_thread_ready, led_thread_runcount, LED_WHITE, LED_YELLOW, num_of_cells, num_of_used_sats, safety, safety_s::safety_off, safety_sub, set_rgb(), setLEDColor(), stop_script(), systemstate_run, t_led_blink, t_led_color, uORB::Subscription::updated(), vehicle_control_mode_sub, vehicle_gps_position_sub, and vehicle_status_sub.
|
private |
Definition at line 812 of file blinkm.cpp.
References msg.
|
private |
Definition at line 772 of file blinkm.cpp.
References msg.
Referenced by init(), play_script(), Run(), setLEDColor(), and setMode().
|
private |
Definition at line 895 of file blinkm.cpp.
References msg.
Referenced by ioctl().
|
private |
Definition at line 726 of file blinkm.cpp.
References LED_AMBER, LED_BLUE, LED_CYAN, LED_GREEN, LED_OFF, LED_ORANGE, LED_PURPLE, LED_RED, LED_WHITE, LED_YELLOW, and set_rgb().
Referenced by Run().
|
virtual |
Definition at line 299 of file blinkm.cpp.
References OK, set_rgb(), stop_script(), and systemstate_run.
|
private |
Definition at line 860 of file blinkm.cpp.
References msg.
Referenced by init(), play_script(), Run(), and setMode().
|
private |
Definition at line 868 of file blinkm.cpp.
References msg.
Referenced by ioctl().
|
private |
Definition at line 182 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 179 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 192 of file blinkm.cpp.
|
private |
Definition at line 186 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 174 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 166 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 167 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 168 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 169 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 170 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 171 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 172 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 173 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 190 of file blinkm.cpp.
|
private |
Definition at line 193 of file blinkm.cpp.
|
private |
Definition at line 189 of file blinkm.cpp.
|
private |
Definition at line 185 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 195 of file blinkm.cpp.
|
private |
Definition at line 183 of file blinkm.cpp.
Referenced by Run().
|
static |
Definition at line 128 of file blinkm.cpp.
Referenced by blinkm_main(), and play_script().
|
private |
Definition at line 176 of file blinkm.cpp.
|
private |
Definition at line 188 of file blinkm.cpp.
|
private |
Definition at line 187 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 180 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 181 of file blinkm.cpp.
Referenced by Run().
|
private |
Definition at line 178 of file blinkm.cpp.
Referenced by Run().