PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <status_display.h>
Public Member Functions | |
StatusDisplay (const events::SubscriberHandler &subscriber_handler) | |
void | process () |
regularily called to handle state updates More... | |
Protected Member Functions | |
bool | check_for_updates () |
check for topic updates More... | |
void | set_leds () |
handle LED logic changes & call publish() More... | |
void | publish () |
publish LED control More... | |
Protected Attributes | |
struct battery_status_s | _battery_status = {} |
struct cpuload_s | _cpu_load = {} |
struct vehicle_status_s | _vehicle_status = {} |
struct vehicle_status_flags_s | _vehicle_status_flags = {} |
struct vehicle_attitude_s | _vehicle_attitude = {} |
struct led_control_s | _led_control = {} |
Private Attributes | |
bool | _old_gps_lock_valid = false |
bool | _old_home_position_valid = false |
bool | _low_battery = false |
bool | _critical_battery = false |
int | _old_nav_state = -1 |
int | _old_battery_status_warning = -1 |
uORB::PublicationQueued< led_control_s > | _led_control_pub {ORB_ID(led_control)} |
const events::SubscriberHandler & | _subscriber_handler |
Definition at line 59 of file status_display.h.
events::status::StatusDisplay::StatusDisplay | ( | const events::SubscriberHandler & | subscriber_handler | ) |
Definition at line 51 of file status_display.cpp.
References _led_control, led_control_s::color, led_control_s::led_mask, led_control_s::mode, led_control_s::num_blinks, led_control_s::priority, and publish().
|
protected |
check for topic updates
Definition at line 65 of file status_display.cpp.
References _battery_status, _cpu_load, _subscriber_handler, _vehicle_status, _vehicle_status_flags, events::SubscriberHandler::battery_status_updated(), cpuload, events::SubscriberHandler::cpuload_updated(), events::SubscriberHandler::get_battery_status_sub(), events::SubscriberHandler::get_cpuload_sub(), events::SubscriberHandler::get_vehicle_status_flags_sub(), events::SubscriberHandler::get_vehicle_status_sub(), orb_copy(), ORB_ID, events::SubscriberHandler::vehicle_status_flags_updated(), and events::SubscriberHandler::vehicle_status_updated().
Referenced by process().
void events::status::StatusDisplay::process | ( | ) |
regularily called to handle state updates
Definition at line 92 of file status_display.cpp.
References check_for_updates(), and set_leds().
Referenced by events::SendEvent::cycle().
|
protected |
publish LED control
Definition at line 101 of file status_display.cpp.
References _led_control, _led_control_pub, hrt_absolute_time(), uORB::PublicationQueued< T >::publish(), and led_control_s::timestamp.
Referenced by StatusDisplay().
|
protected |
handle LED logic changes & call publish()
Definition at line 48 of file set_leds.cpp.
Referenced by process().
|
protected |
Definition at line 84 of file status_display.h.
Referenced by check_for_updates().
|
protected |
Definition at line 85 of file status_display.h.
Referenced by check_for_updates().
|
private |
Definition at line 96 of file status_display.h.
|
protected |
Definition at line 90 of file status_display.h.
Referenced by publish(), and StatusDisplay().
|
private |
Definition at line 100 of file status_display.h.
Referenced by publish().
|
private |
Definition at line 95 of file status_display.h.
|
private |
Definition at line 98 of file status_display.h.
|
private |
Definition at line 93 of file status_display.h.
|
private |
Definition at line 94 of file status_display.h.
|
private |
Definition at line 97 of file status_display.h.
|
private |
Definition at line 102 of file status_display.h.
Referenced by check_for_updates().
|
protected |
Definition at line 88 of file status_display.h.
|
protected |
Definition at line 86 of file status_display.h.
Referenced by check_for_updates().
|
protected |
Definition at line 87 of file status_display.h.
Referenced by check_for_updates().