got motor running

This commit is contained in:
Leonetienne
2025-12-14 18:57:28 +01:00
parent d339f5b297
commit bd906add53
14 changed files with 123 additions and 78 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ CommandParser::Command CommandParser::parsePacket(const uint8_t *packet) noexcep
Command command;
command.instruction = (Command::TYPE)packet[0];
// Fetch args by big endian byte ordering
command.args[0] = ((uint16_t)packet[1] << 8) | packet[2];
command.args[1] = ((uint16_t)packet[3] << 8) | packet[4];
command.args[0] = ((int16_t)packet[1] << 8) | packet[2];
command.args[1] = ((int16_t)packet[3] << 8) | packet[4];
// Validate instruction
if ((uint8_t)command.instruction > 0x02) {