Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openxc/formats/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def _command_string_to_protobuf(self, command_name):
return openxc_pb2.ControlCommand.PAYLOAD_FORMAT
elif command_name == "predefined_obd2":
return openxc_pb2.ControlCommand.PREDEFINED_OBD2_REQUESTS
elif command_name == "platform":
return openxc_pb2.ControlCommand.PLATFORM
else:
raise UnrecognizedBinaryCommandError(command_name)

Expand Down Expand Up @@ -321,6 +323,8 @@ def _protobuf_to_dict(cls, message):
parsed_message['command_response'] = "af_bypass"
elif response.type == openxc_pb2.ControlCommand.PREDEFINED_OBD2_REQUESTS:
parsed_message['command_response'] = "predefined_obd2"
elif response.type == openxc_pb2.ControlCommand.PLATFORM:
parsed_message['command_response'] = "platform"
else:
raise UnrecognizedBinaryCommandError(response.type)

Expand Down
2 changes: 1 addition & 1 deletion openxc/sources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, callback=None, log_mode=None, payload_format=None):
self.running = True
self._streamer = None
self._formatter = None
self.format = payload_format
self._format = payload_format

self.logger = SourceLogger(self, log_mode)

Expand Down