Skip to content

Commit be885a4

Browse files
committed
updated from reviewer feedback, match data types to mavlink
1 parent c2f12fa commit be885a4

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

ardupilot/equipment/power/20008.SmartBatteryContinuous.uavcan

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22
# Smart battery data to be sent continuously (10Hz or greater)
33
#
44

5-
float16 temperature # [Celsius]
6-
float16 current # [Ampere]
7-
float16 voltage # [Volt]
8-
uint8 remaining # [Percent]
9-
uint16 status # [Bitmask]
5+
int16_t temperature # [cdegC]
6+
int16_t current # [cA]
7+
uint16_t voltage # [mV]
8+
int8 battery_remaining # [%]
9+
int32 time_remaining # [s]
10+
uint32 status_flags
1011

1112
uint16 STATUS_FLAG_IN_USE = 1
1213
uint16 STATUS_FLAG_CHARGING = 2
1314
uint16 STATUS_FLAG_OVER_TEMP = 4
14-
uint16 STATUS_FLAG_OVER_VOLT = 8
15-
uint16 STATUS_FLAG_OVER_CURRENT = 16
16-
uint16 STATUS_FLAG_CELL_IMBALANCE = 32
17-
uint16 STATUS_FLAG_PROTECTIONS_ENABLED = 64
18-
uint16 STATUS_FLAG_REQUIRES_SERVICE = 128
19-
uint16 STATUS_FLAG_ERROR_UNKNOWN = 256
15+
uint16 STATUS_FLAG_UNDER_TEMP = 8
16+
uint16 STATUS_FLAG_OVER_VOLT = 16
17+
uint16 STATUS_FLAG_OVER_CURRENT = 32
18+
uint16 STATUS_FLAG_CELL_IMBALANCE = 64
19+
uint16 STATUS_FLAG_PROTECTIONS_ENABLED = 128
20+
uint16 STATUS_FLAG_REQUIRES_SERVICE = 256
21+
uint16 STATUS_FLAG_BAD_BATTERY = 512
22+
uint16 STATUS_FLAG_ERROR_UNKNOWN = 32768

ardupilot/equipment/power/20009.SmartBatteryPeriodic.uavcan

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
# Smart battery data to be sent periodically (1Hz or less)
33
#
44

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

0 commit comments

Comments
 (0)