diff --git a/regulated/zubax/actuator/esc/AngVelSetpoint.0.1.uavcan b/regulated/zubax/actuator/esc/AngVelSetpoint.0.1.uavcan index f64a7d60..06120042 100644 --- a/regulated/zubax/actuator/esc/AngVelSetpoint.0.1.uavcan +++ b/regulated/zubax/actuator/esc/AngVelSetpoint.0.1.uavcan @@ -3,6 +3,6 @@ # Negative values indicate reverse rotation. # If reversal is not supported, negative values should be treated as zero setpoint. -uavcan.si.unit.angular_velocity.Scalar.1.0[<64] motor_mechanical_angular_velocity +uavcan.si.unit.angular_velocity.Scalar.1.0[<64] motor_mechanical_angular_velocity # [radian/second] @assert _offset_ % 8 == {0} diff --git a/regulated/zubax/actuator/esc/RatiometricSetpoint.0.1.uavcan b/regulated/zubax/actuator/esc/RatiometricSetpoint.0.1.uavcan index a7f19d0b..e2091b4a 100644 --- a/regulated/zubax/actuator/esc/RatiometricSetpoint.0.1.uavcan +++ b/regulated/zubax/actuator/esc/RatiometricSetpoint.0.1.uavcan @@ -12,6 +12,9 @@ # For example, conventional trapezoidal (six-step) ESCs generally map the setpoint to the phase PWM duty cycle setting; # a vector control ESC may map the setpoint to the Q-axis voltage vector projection or torque. +int16 FULL_REVERSE = -32768 +int16 FULL_FORWARD = +32767 + int16[<64] ratiometric @assert _offset_ % 8 == {0} diff --git a/regulated/zubax/actuator/esc/Status.0.1.uavcan b/regulated/zubax/actuator/esc/Status.0.1.uavcan index 36792355..6e466c89 100644 --- a/regulated/zubax/actuator/esc/Status.0.1.uavcan +++ b/regulated/zubax/actuator/esc/Status.0.1.uavcan @@ -15,7 +15,7 @@ # # The setpoint message types that can be used to command a group of ESC are defined in this namespace. # Additional setpoint message types may also be supported on an implementation-specific basis. -# If a group is controlled using different setpoint subjects concurrently (e.g., ratiometric and torque), +# If a group is controlled using different setpoint subjects concurrently (e.g., ratiometric and speed), # the behavior is implementation-defined. # # ESC should stop automatically if no setpoint was received in one second; this limit may be configurable. @@ -33,20 +33,20 @@ uint8 MAX_PUBLICATION_PERIOD = 1 # [second] # Publication frequency limits. -void2 uint6 index # The index in the setpoint array that this status message refers to. # This value should never be changed while the node is running. +void2 uint8 demand_factor # [percent] # Percentage of the maximum rated power output. May exceed 100% in case of overload. -void12 bool dc_voltage_warning # DC link voltage above or below the SOA. bool overload_warning # Output power/current above SOA or regeneration below the SOA. bool motor_temperature_warning # Temperature above or below the SOA. bool inverter_temperature_warning # Temperature above or below the SOA. # A warning flag is set when the corresponding parameter exceeds the safe operating area (SOA) of the ESC. +void12 @assert _offset_ % 32 == {0} @@ -72,8 +72,6 @@ float16 inverter_temperature # [kelvin] # Sampled temperatures. If multiple values are available, reduction is implementation-defined. # We use raw float16 here instead of the more type-safe SI types to reduce the footprint. -void32 - @assert _offset_ % 8 == {0} @assert _offset_.count == 1 # Fixed-size @assert _offset_.max / 8 <= 63 # Fits into one CAN FD frame diff --git a/regulated/zubax/sensor/bms/BatteryPackParams.0.1.uavcan b/regulated/zubax/sensor/bms/BatteryPackParams.0.1.uavcan index 41b300bb..6e1a0fc1 100644 --- a/regulated/zubax/sensor/bms/BatteryPackParams.0.1.uavcan +++ b/regulated/zubax/sensor/bms/BatteryPackParams.0.1.uavcan @@ -43,10 +43,10 @@ uint32 cycle_count Technology.0.1 technology # Shall not change at runtime. -void1 uint7 state_of_health # The SoH of the pack, ranges from 0 to 100. May change at runtime. # If not provided by the BMS, use best guess or report 100%. +void1 void64 void64 diff --git a/regulated/zubax/sensor/bms/BatteryPackStatus.0.1.uavcan b/regulated/zubax/sensor/bms/BatteryPackStatus.0.1.uavcan index 06d8bd41..4b7ac737 100644 --- a/regulated/zubax/sensor/bms/BatteryPackStatus.0.1.uavcan +++ b/regulated/zubax/sensor/bms/BatteryPackStatus.0.1.uavcan @@ -32,10 +32,10 @@ uavcan.time.SynchronizedTimestamp.1.0 timestamp # -------------------------- ESTIMATES -------------------------- -void1 uint7 state_of_charge # [percent] # The instant SoC of the pack, ranges from 0 to 100. Mandatory. # The methods of estimation are implementation-defined. +void1 @assert _offset_ % 32 == {0} diff --git a/regulated/zubax/sensor/bms/Technology.0.1.uavcan b/regulated/zubax/sensor/bms/Technology.0.1.uavcan index 0dc68731..93effcd6 100644 --- a/regulated/zubax/sensor/bms/Technology.0.1.uavcan +++ b/regulated/zubax/sensor/bms/Technology.0.1.uavcan @@ -1,7 +1,7 @@ # Battery chemistry type and its form-factor. This is a nested type. -void1 uint7 value +void1 uint7 UNKNOWN = 0 uint7 OTHER = 1 # The technology is not specified in this enumeration. Please submit a pull request.