![]() |
Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Power sensors on the uavcan bus. More...
Go to the source code of this file.
Data Structures | |
struct | uavcan_equipment_power_BatteryInfo |
struct | uavcan_equipment_power_CircuitStatus |
struct | uavcan_circuit_battery_t |
Macros | |
#define | UAVCAN_EQUIPMENT_POWER_BATTERYINFO_ID 1092 |
#define | UAVCAN_EQUIPMENT_POWER_BATTERYINFO_SIGNATURE (0x249C26548A711966ULL) |
#define | UAVCAN_EQUIPMENT_POWER_BATTERYINFO_MAX_SIZE 55 |
#define | UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_ID 1091 |
#define | UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_SIGNATURE (0x8313D33D0DDDA115ULL) |
#define | UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_MAX_SIZE 7 |
#define | POWER_UAVCAN_BATTERIES_MAX 3 |
#define | POWER_UAVCAN_CIRCUITS_MAX 15 |
#define | POWER_UAVCAN_BATTERY_CIRCUITS {} |
Functions | |
static void | power_uavcan_battery_cb (struct uavcan_iface_t *iface, CanardRxTransfer *transfer) |
static void | power_uavcan_circuit_cb (struct uavcan_iface_t *iface, CanardRxTransfer *transfer) |
void | power_uavcan_init (void) |
Variables | |
static uavcan_event | power_uavcan_ev |
static uavcan_event | circuit_uavcan_ev |
static struct uavcan_equipment_power_BatteryInfo | batteries [POWER_UAVCAN_BATTERIES_MAX] = {0} |
static struct uavcan_equipment_power_CircuitStatus | circuits [POWER_UAVCAN_CIRCUITS_MAX] = {0} |
static struct uavcan_circuit_battery_t | battery_circuits [] = POWER_UAVCAN_BATTERY_CIRCUITS |
Power sensors on the uavcan bus.
Definition in file power_uavcan.c.
struct uavcan_equipment_power_BatteryInfo |
Definition at line 60 of file power_uavcan.c.
Data Fields | ||
---|---|---|
float | average_power_10sec | |
uint8_t | battery_id | |
float | current | |
float | full_charge_capacity_wh | |
float | hours_to_full_charge | |
uint32_t | model_instance_id | |
uint8_t | node_id | |
float | remaining_capacity_wh | |
bool | set | |
uint8_t | state_of_charge_pct | |
uint8_t | state_of_charge_pct_stdev | |
uint8_t | state_of_health_pct | |
uint16_t | status_flags | |
float | temperature | |
float | voltage |
struct uavcan_equipment_power_CircuitStatus |
Definition at line 82 of file power_uavcan.c.
Data Fields | ||
---|---|---|
uint16_t | circuit_id | |
float | current | |
uint8_t | error_flags | |
bool | is_battery | |
uint8_t | node_id | |
bool | set | |
float | voltage |
struct uavcan_circuit_battery_t |
Definition at line 95 of file power_uavcan.c.
Data Fields | ||
---|---|---|
uint16_t | circuit_id | |
uint8_t | node_id |
#define POWER_UAVCAN_BATTERIES_MAX 3 |
Definition at line 42 of file power_uavcan.c.
#define POWER_UAVCAN_BATTERY_CIRCUITS {} |
Definition at line 52 of file power_uavcan.c.
#define POWER_UAVCAN_CIRCUITS_MAX 15 |
Definition at line 47 of file power_uavcan.c.
#define UAVCAN_EQUIPMENT_POWER_BATTERYINFO_ID 1092 |
Definition at line 31 of file power_uavcan.c.
#define UAVCAN_EQUIPMENT_POWER_BATTERYINFO_MAX_SIZE 55 |
Definition at line 33 of file power_uavcan.c.
#define UAVCAN_EQUIPMENT_POWER_BATTERYINFO_SIGNATURE (0x249C26548A711966ULL) |
Definition at line 32 of file power_uavcan.c.
#define UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_ID 1091 |
Definition at line 36 of file power_uavcan.c.
#define UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_MAX_SIZE 7 |
Definition at line 38 of file power_uavcan.c.
#define UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_SIGNATURE (0x8313D33D0DDDA115ULL) |
Definition at line 37 of file power_uavcan.c.
|
static |
Definition at line 102 of file power_uavcan.c.
References uavcan_equipment_power_BatteryInfo::average_power_10sec, batteries, uavcan_equipment_power_BatteryInfo::battery_id, Electrical::current, uavcan_equipment_power_BatteryInfo::current, electrical, uavcan_equipment_power_BatteryInfo::full_charge_capacity_wh, uavcan_equipment_power_BatteryInfo::hours_to_full_charge, uavcan_equipment_power_BatteryInfo::model_instance_id, uavcan_equipment_power_BatteryInfo::node_id, uavcan_circuit_battery_t::node_id, POWER_UAVCAN_BATTERIES_MAX, uavcan_equipment_power_BatteryInfo::remaining_capacity_wh, uavcan_equipment_power_BatteryInfo::set, uavcan_equipment_power_BatteryInfo::state_of_charge_pct, uavcan_equipment_power_BatteryInfo::state_of_charge_pct_stdev, uavcan_equipment_power_BatteryInfo::state_of_health_pct, uavcan_equipment_power_BatteryInfo::status_flags, uavcan_equipment_power_BatteryInfo::temperature, transfer(), uavcan_equipment_power_BatteryInfo::voltage, and Electrical::vsupply.
Referenced by power_uavcan_init().
|
static |
Definition at line 183 of file power_uavcan.c.
References uavcan_equipment_power_CircuitStatus::circuit_id, uavcan_circuit_battery_t::circuit_id, circuits, Electrical::current, uavcan_equipment_power_CircuitStatus::current, electrical, uavcan_equipment_power_CircuitStatus::error_flags, uavcan_equipment_power_CircuitStatus::node_id, uavcan_circuit_battery_t::node_id, POWER_UAVCAN_CIRCUITS_MAX, uavcan_equipment_power_CircuitStatus::set, transfer(), uavcan_equipment_power_CircuitStatus::voltage, and Electrical::vsupply.
Referenced by power_uavcan_init().
void power_uavcan_init | ( | void | ) |
Definition at line 236 of file power_uavcan.c.
References battery_circuits, uavcan_equipment_power_CircuitStatus::circuit_id, uavcan_circuit_battery_t::circuit_id, circuit_uavcan_ev, circuits, uavcan_equipment_power_CircuitStatus::is_battery, uavcan_equipment_power_CircuitStatus::node_id, uavcan_circuit_battery_t::node_id, power_uavcan_battery_cb(), power_uavcan_circuit_cb(), power_uavcan_ev, uavcan_equipment_power_CircuitStatus::set, uavcan_bind(), UAVCAN_EQUIPMENT_POWER_BATTERYINFO_ID, UAVCAN_EQUIPMENT_POWER_BATTERYINFO_SIGNATURE, UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_ID, and UAVCAN_EQUIPMENT_POWER_CIRCUITSTATUS_SIGNATURE.
|
static |
Definition at line 57 of file power_uavcan.c.
Referenced by power_uavcan_battery_cb().
|
static |
Definition at line 57 of file power_uavcan.c.
Referenced by power_uavcan_init().
|
static |
Definition at line 57 of file power_uavcan.c.
Referenced by power_uavcan_init().
|
static |
Definition at line 57 of file power_uavcan.c.
Referenced by power_uavcan_circuit_cb(), and power_uavcan_init().
|
static |
Definition at line 56 of file power_uavcan.c.
Referenced by power_uavcan_init().