diff --git a/openxc/formats/binary.py b/openxc/formats/binary.py index 3797ea43..8c05d5b9 100644 --- a/openxc/formats/binary.py +++ b/openxc/formats/binary.py @@ -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) @@ -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) diff --git a/openxc/sources/base.py b/openxc/sources/base.py index 7e5a3f46..80dc9f2d 100644 --- a/openxc/sources/base.py +++ b/openxc/sources/base.py @@ -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)