Skip to content

Commit 7cedb82

Browse files
committed
Simplify message parsing since timeout is always sent on SPI bus
1 parent 8cd19a5 commit 7cedb82

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

main/CommandHandler.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,7 @@ int startClientTcp(const uint8_t command[], uint8_t response[])
631631
port = ntohs(port);
632632
socket = command[13 + command[3]];
633633
type = command[15 + command[3]];
634-
if (command[2] == 6) { // optional sixth parameter
635-
timeout = (uint16_t) command[17 + command[3]] << 8 | command[18 + command[3]];
636-
}
634+
timeout = (uint16_t) command[17 + command[3]] << 8 | command[18 + command[3]];
637635
}
638636

639637
if (type == 0x00) {

0 commit comments

Comments
 (0)