Is IEEE 754 not supported in *.dbc files?

Hello, while implementing a vehilceIO driver to communicate with a vehicle controller, I saw, that encoding a command does not result in the intended values in the CAN message. Using this DBC file: oscc/oscc.dbc at master · PolySync/oscc · GitHub 1 With the following code: status = dwCANInterpreter_encodef32(0.7f, OSCC_ID_THROTTLE_COMMAND_PEDAL_REQUEST, &msgCAN, gIntp); checkError(result, status, "encode OSCC_ID_THROTTLE_COMMAND_PEDAL_REQUEST failed"); Results in the following message on the bus: $candump -i vcan1,92:FF vcan1 092 [8] 11001100 00000101 00000001 00000000 00000000 00000000 00000000 00000000 Trying to encode the value ‘1’ has the exact same result. Using ‘100.5’ leads to: vcan1 092 [8] 11001100 00000101 01100101 00000000 00000000 00000000 00000000 00000000 Which is ‘101’. So it seems the value is round and then not encoded using IEEE 754, but just encoded as integer number. Is “SIG_VALTYPE_ … :1” in *.dbc files not supported? Are there any workarounds? Regards

Our Sidebar

You can put any information here you'd like.

  • Latest Posts
  • Announcements
  • Calendars
  • Letc