mirror of
https://github.com/EFeru/hoverboard-firmware-hack-FOC.git
synced 2025-08-04 18:14:28 +02:00
Update comms.c
This commit is contained in:
@@ -487,7 +487,7 @@ void handle_input(uint8_t *userCommand, uint32_t len)
|
|||||||
|
|
||||||
// If there is already an unprocessed command, exit
|
// If there is already an unprocessed command, exit
|
||||||
if (command.semaphore == 1) return;
|
if (command.semaphore == 1) return;
|
||||||
if (*userCommand != '$') return; // reject if first character is not #
|
if (*userCommand != '$') return; // reject if first character is not $
|
||||||
|
|
||||||
// Check end of line
|
// Check end of line
|
||||||
userCommand+=len-1; // Go to last char
|
userCommand+=len-1; // Go to last char
|
||||||
@@ -496,7 +496,7 @@ void handle_input(uint8_t *userCommand, uint32_t len)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
userCommand-=len-1; // Come back
|
userCommand-=len-1; // Come back
|
||||||
userCommand++; // Skip #
|
userCommand++; // Skip $
|
||||||
|
|
||||||
int8_t cindex = -1;
|
int8_t cindex = -1;
|
||||||
int8_t pindex = -1;
|
int8_t pindex = -1;
|
||||||
|
Reference in New Issue
Block a user