Skip to content
Open
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
9 changes: 8 additions & 1 deletion pybricksdev/connections/ev3.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,17 @@ def _send_command(self, command: Command, payload: bytes | None = None) -> int:

length += len(payload)

# report_id is not used by the EV3 but is required by HIDAPI on Windows.
# It does no harm on Linux, so we include it unconditionally. Note that
# the report ID is automatically stripped from incoming messages by
# HIDAPI on all platforms.
report_id = 0

message_number = next(self._msg_count)

message = struct.pack(
"<HHBB",
"<BHHBB",
report_id,
length,
message_number,
MessageType.SYSTEM_COMMAND_REPLY,
Expand Down