From 35b7ae180bcafe90af77a8387861588e59be5926 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Tue, 22 Jul 2014 15:01:34 +0400 Subject: [PATCH] Power messages update --- .../equipment/power/711.CircuitStatus.uavcan | 6 +++++ .../equipment/power/BatteryStatus.uavcan | 27 ++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan b/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan index 17d8a9a335..82f6d877f7 100644 --- a/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan +++ b/dsdl/uavcan/equipment/power/711.CircuitStatus.uavcan @@ -4,5 +4,11 @@ uint8 circuit_id +uint8 ERROR_MASK_OVERVOLTAGE = 1 +uint8 ERROR_MASK_UNDERVOLTAGE = 2 +uint8 ERROR_MASK_OVERCURRENT = 4 +uint8 ERROR_MASK_UNDERCURRENT = 8 +uint8 error_mask + float16 voltage float16 current diff --git a/dsdl/uavcan/equipment/power/BatteryStatus.uavcan b/dsdl/uavcan/equipment/power/BatteryStatus.uavcan index 42ca83d2ee..6224cf7070 100644 --- a/dsdl/uavcan/equipment/power/BatteryStatus.uavcan +++ b/dsdl/uavcan/equipment/power/BatteryStatus.uavcan @@ -2,19 +2,22 @@ # Nested type. # Energy and capacity are expressed in watt hours (Joules are infeasible because of range limitations). # Unknown values should be represented as NAN. +# Typical publishing rate should be around 1 Hz. # -uint8 battery_id +uint8 STATUS_MASK_IN_USE = 1 +uint8 STATUS_MASK_CHARGING = 2 +uint8 STATUS_MASK_CHARGED = 4 # Charging complete +uint8 STATUS_MASK_TEMP_HOT = 8 # Temperature above normal +uint8 STATUS_MASK_TEMP_COLD = 16 # Temperature below normal +uint8 STATUS_MASK_OVERLOAD = 32 +uint8 status_mask -uint8 MASK_IN_USE = 1 -uint8 MASK_CHARGING = 2 -uint8 MASK_CHARGED = 4 -uint8 mask +float16 temperature # Celsius, required +float16 voltage # Required +float16 current # Required +float16 average_power_10sec # Average power consumption over the last 10 seconds, required +float16 consumed_wh # Required +float16 capacity_wh # NAN if unknown -float16 voltage -float16 power -float16 consumed_wh -float16 capacity_wh # NAN if unknown - -uint7 CHARGE_PCT_UNKNOWN = 127 -uint7 charge_pct +uint7 remaining_charge_pct # Percent of the full charge [0, 100], required