PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <atxxxx.h>
Public Member Functions | |
OSDatxxxx (int bus=OSD_BUS) | |
~OSDatxxxx () | |
virtual int | init () |
Static Public Member Functions | |
static int | custom_command (int argc, char *argv[]) |
static int | print_usage (const char *reason=nullptr) |
static int | task_spawn (int argc, char *argv[]) |
Protected Member Functions | |
virtual int | probe () |
Private Member Functions | |
void | Run () override |
int | start () |
int | reset () |
int | init_osd () |
int | readRegister (unsigned reg, uint8_t *data, unsigned count) |
int | writeRegister (unsigned reg, uint8_t data) |
int | add_character_to_screen (char c, uint8_t pos_x, uint8_t pos_y) |
void | add_string_to_screen_centered (const char *str, uint8_t pos_y, int max_length) |
void | clear_line (uint8_t pos_x, uint8_t pos_y, int length) |
int | add_battery_info (uint8_t pos_x, uint8_t pos_y) |
int | add_altitude (uint8_t pos_x, uint8_t pos_y) |
int | add_flighttime (float flight_time, uint8_t pos_x, uint8_t pos_y) |
int | enable_screen () |
int | disable_screen () |
int | update_topics () |
int | update_screen () |
Static Private Member Functions | |
static const char * | get_flight_mode (uint8_t nav_state) |
Private Attributes | |
uORB::Subscription | _battery_sub {ORB_ID(battery_status)} |
uORB::Subscription | _local_position_sub {ORB_ID(vehicle_local_position)} |
uORB::Subscription | _vehicle_status_sub {ORB_ID(vehicle_status)} |
float | _battery_voltage_filtered_v {0.f} |
float | _battery_discharge_mah {0.f} |
bool | _battery_valid {false} |
float | _local_position_z {0.f} |
bool | _local_position_valid {false} |
uint8_t | _arming_state {0} |
uint64_t | _arming_timestamp {0} |
uint8_t | _nav_state {0} |
OSDatxxxx::OSDatxxxx | ( | int | bus = OSD_BUS | ) |
Definition at line 49 of file atxxxx.cpp.
Referenced by task_spawn().
OSDatxxxx::~OSDatxxxx | ( | ) |
Definition at line 56 of file atxxxx.cpp.
|
private |
Definition at line 306 of file atxxxx.cpp.
References _local_position_z, add_character_to_screen(), OSD_SYMBOL_ARROW_NORTH, and OSD_SYMBOL_M.
Referenced by update_screen().
|
private |
Definition at line 275 of file atxxxx.cpp.
References _battery_discharge_mah, _battery_voltage_filtered_v, add_character_to_screen(), OSD_SYMBOL_BATT_3, and OSD_SYMBOL_MAH.
Referenced by update_screen().
|
private |
Definition at line 211 of file atxxxx.cpp.
References OSD_CHARS_PER_ROW, position, and writeRegister().
Referenced by add_altitude(), add_battery_info(), add_flighttime(), add_string_to_screen_centered(), clear_line(), and init().
|
private |
Definition at line 322 of file atxxxx.cpp.
References add_character_to_screen(), and OSD_SYMBOL_FLIGHT_TIME.
Referenced by update_screen().
|
private |
Definition at line 242 of file atxxxx.cpp.
References add_character_to_screen(), and OSD_CHARS_PER_ROW.
Referenced by update_screen().
|
private |
Definition at line 267 of file atxxxx.cpp.
References add_character_to_screen().
Referenced by update_screen().
|
static |
Definition at line 560 of file atxxxx.cpp.
References print_usage().
|
private |
Definition at line 350 of file atxxxx.cpp.
References data, readRegister(), and writeRegister().
|
private |
Definition at line 338 of file atxxxx.cpp.
References data, readRegister(), and writeRegister().
Referenced by init_osd().
|
staticprivate |
Definition at line 414 of file atxxxx.cpp.
References flight_mode.
Referenced by update_screen().
|
virtual |
Definition at line 98 of file atxxxx.cpp.
References add_character_to_screen(), ToneAlarmInterface::init(), init_osd(), OSD_CHARS_PER_ROW, OSD_NUM_ROWS_NTSC, OSD_NUM_ROWS_PAL, and reset().
Referenced by task_spawn().
|
private |
Definition at line 156 of file atxxxx.cpp.
References data, enable_screen(), OSD_PAL_TX_MODE, OSD_ZERO_BYTE, and writeRegister().
Referenced by init().
|
static |
Definition at line 537 of file atxxxx.cpp.
Referenced by custom_command().
|
protectedvirtual |
Definition at line 140 of file atxxxx.cpp.
References data, readRegister(), and writeRegister().
|
private |
Definition at line 174 of file atxxxx.cpp.
References DEVICE_LOG, and DIR_READ.
Referenced by disable_screen(), enable_screen(), and probe().
|
private |
Definition at line 515 of file atxxxx.cpp.
References writeRegister().
Referenced by init().
|
overrideprivate |
Definition at line 524 of file atxxxx.cpp.
References update_screen(), and update_topics().
|
private |
Definition at line 132 of file atxxxx.cpp.
References OSD_UPDATE_RATE.
Referenced by task_spawn().
|
static |
Definition at line 62 of file atxxxx.cpp.
References init(), OSDatxxxx(), and start().
|
private |
Definition at line 480 of file atxxxx.cpp.
References _arming_state, _arming_timestamp, _battery_valid, _local_position_valid, _nav_state, add_altitude(), add_battery_info(), add_flighttime(), add_string_to_screen_centered(), clear_line(), flight_mode, get_flight_mode(), and hrt_absolute_time().
Referenced by Run().
|
private |
Definition at line 362 of file atxxxx.cpp.
References _arming_state, _arming_timestamp, _battery_discharge_mah, _battery_sub, _battery_valid, _battery_voltage_filtered_v, _local_position_sub, _local_position_valid, _local_position_z, _nav_state, _vehicle_status_sub, uORB::Subscription::copy(), hrt_absolute_time(), and uORB::Subscription::updated().
Referenced by Run().
|
private |
Definition at line 193 of file atxxxx.cpp.
References data, DEVICE_LOG, DIR_WRITE, and OK.
Referenced by add_character_to_screen(), disable_screen(), enable_screen(), init_osd(), probe(), and reset().
|
private |
Definition at line 150 of file atxxxx.h.
Referenced by update_screen(), and update_topics().
|
private |
Definition at line 151 of file atxxxx.h.
Referenced by update_screen(), and update_topics().
|
private |
Definition at line 142 of file atxxxx.h.
Referenced by add_battery_info(), and update_topics().
|
private |
Definition at line 136 of file atxxxx.h.
Referenced by update_topics().
|
private |
Definition at line 143 of file atxxxx.h.
Referenced by update_screen(), and update_topics().
|
private |
Definition at line 141 of file atxxxx.h.
Referenced by add_battery_info(), and update_topics().
|
private |
Definition at line 137 of file atxxxx.h.
Referenced by update_topics().
|
private |
Definition at line 147 of file atxxxx.h.
Referenced by update_screen(), and update_topics().
|
private |
Definition at line 146 of file atxxxx.h.
Referenced by add_altitude(), and update_topics().
|
private |
Definition at line 154 of file atxxxx.h.
Referenced by update_screen(), and update_topics().
|
private |
Definition at line 138 of file atxxxx.h.
Referenced by update_topics().