Skip to content

Commit

Permalink
updated from reviewer feedback, match data types to mavlink
Browse files Browse the repository at this point in the history
  • Loading branch information
dakejahl committed Mar 26, 2022
1 parent c2f12fa commit be885a4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
25 changes: 14 additions & 11 deletions ardupilot/equipment/power/20008.SmartBatteryContinuous.uavcan
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
# Smart battery data to be sent continuously (10Hz or greater)
#

float16 temperature # [Celsius]
float16 current # [Ampere]
float16 voltage # [Volt]
uint8 remaining # [Percent]
uint16 status # [Bitmask]
int16_t temperature # [cdegC]
int16_t current # [cA]
uint16_t voltage # [mV]
int8 battery_remaining # [%]
int32 time_remaining # [s]
uint32 status_flags

uint16 STATUS_FLAG_IN_USE = 1
uint16 STATUS_FLAG_CHARGING = 2
uint16 STATUS_FLAG_OVER_TEMP = 4
uint16 STATUS_FLAG_OVER_VOLT = 8
uint16 STATUS_FLAG_OVER_CURRENT = 16
uint16 STATUS_FLAG_CELL_IMBALANCE = 32
uint16 STATUS_FLAG_PROTECTIONS_ENABLED = 64
uint16 STATUS_FLAG_REQUIRES_SERVICE = 128
uint16 STATUS_FLAG_ERROR_UNKNOWN = 256
uint16 STATUS_FLAG_UNDER_TEMP = 8
uint16 STATUS_FLAG_OVER_VOLT = 16
uint16 STATUS_FLAG_OVER_CURRENT = 32
uint16 STATUS_FLAG_CELL_IMBALANCE = 64
uint16 STATUS_FLAG_PROTECTIONS_ENABLED = 128
uint16 STATUS_FLAG_REQUIRES_SERVICE = 256
uint16 STATUS_FLAG_BAD_BATTERY = 512
uint16 STATUS_FLAG_ERROR_UNKNOWN = 32768
13 changes: 6 additions & 7 deletions ardupilot/equipment/power/20009.SmartBatteryPeriodic.uavcan
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
# Smart battery data to be sent periodically (1Hz or less)
#

uint8[<=32] name # Formatted as manufacturer_model, eg wattsinnovations_smartbattery
uint32 serial # Manufacturer serial number
uint8 state_of_health # [Percent]
uint8[<=50] name # Formatted as manufacturer_product, eg wattsinnovations_smartbattery
uint8[<=16] serial_number # Serial number in ASCII characters, 0 terminated
uint8[<=11] manufacture_date # Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated
int32 capacity_full_specification # [mAh]
int32 capacity_full # [mAh]
uint16 cycle_count
uint16 time_remaining # [Seconds]
float16 design_capacity # [Watt hours]
float16 actual_capacity # [Watt hours]
float16[<=24] cell_voltages # [Volt]
uint16_t[<=24] cell_voltages # [mV]

0 comments on commit be885a4

Please sign in to comment.