mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-23 00:59:54 +08:00
Add missing flags to heartbeat message
This commit is contained in:
@@ -4,9 +4,13 @@ import cantools
|
||||
|
||||
# 0x001 - Heartbeat
|
||||
axisError = cantools.database.can.Signal("Axis_Error", 0, 32)
|
||||
axisState = cantools.database.can.Signal("Axis_State", 32, 32)
|
||||
axisState = cantools.database.can.Signal("Axis_State", 32, 8)
|
||||
motorFlags = cantools.database.can.Signal("Motor_Flags", 40, 8)
|
||||
encoderFlags = cantools.database.can.Signal("Encoder_Flags", 48, 8)
|
||||
controllerFlags = cantools.database.can.Signal("Controller_Flags", 56, 8)
|
||||
|
||||
heartbeatMsg = cantools.database.can.Message(
|
||||
0x001, "Heartbeat", 8, [axisError, axisState]
|
||||
0x001, "Heartbeat", 8, [axisError, axisState, motorFlags, encoderFlags, controllerFlags]
|
||||
)
|
||||
|
||||
# 0x002 - E-Stop Message
|
||||
|
||||
@@ -37,7 +37,10 @@ BU_:
|
||||
|
||||
|
||||
BO_ 1 Heartbeat: 8 Vector__XXX
|
||||
SG_ Axis_State : 32|32@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ Controller_Flags : 56|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ Encoder_Flags : 48|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ Motor_Flags : 40|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ Axis_State : 32|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ Axis_Error : 0|32@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 2 Estop: 0 Vector__XXX
|
||||
|
||||
Reference in New Issue
Block a user