values with spaces generate invalid code
d4l3k opened this issue · 0 comments
d4l3k commented
I'm trying to generate Go code for the following dbc file:
https://github.com/joshwardell/model3dbc/blob/master/Model3CAN.dbc#L4745
This line
VAL_ 280 DI_tractionControlMode 6 "Offroad Assist" 5 "Dyno Mode" 4 "Rolls Mode" 3 "Dev2" 2 "Dev1" 1 "Slip Start" 0 "Standard" ;
generates Go code like:
type ID118DriveSystemStatus_DI_tractionControlMode uint8
// Value descriptions for the DI_tractionControlMode signal of the ID118DriveSystemStatus message.
const (
ID118DriveSystemStatus_DI_tractionControlMode_Standard ID118DriveSystemStatus_DI_tractionControlMode = 0
ID118DriveSystemStatus_DI_tractionControlMode_Slip Start ID118DriveSystemStatus_DI_tractionControlMode = 1
ID118DriveSystemStatus_DI_tractionControlMode_Dev1 ID118DriveSystemStatus_DI_tractionControlMode = 2
ID118DriveSystemStatus_DI_tractionControlMode_Dev2 ID118DriveSystemStatus_DI_tractionControlMode = 3
ID118DriveSystemStatus_DI_tractionControlMode_Rolls Mode ID118DriveSystemStatus_DI_tractionControlMode = 4
ID118DriveSystemStatus_DI_tractionControlMode_Dyno Mode ID118DriveSystemStatus_DI_tractionControlMode = 5
ID118DriveSystemStatus_DI_tractionControlMode_Offroad Assist ID118DriveSystemStatus_DI_tractionControlMode = 6
)
which is invalid due to the spaces