mirror of
https://github.com/2martens/uni.git
synced 2026-05-06 19:36:26 +02:00
[ES] Fixed potential error with loop
Signed-óff-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -90,9 +90,11 @@ void loop() {
|
|||||||
while (readable) {
|
while (readable) {
|
||||||
currentChar = Serial.read();
|
currentChar = Serial.read();
|
||||||
readable = (currentChar != -1);
|
readable = (currentChar != -1);
|
||||||
|
if (readable) {
|
||||||
command[i] = currentChar;
|
command[i] = currentChar;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
command[i] = '\0';
|
command[i] = '\0';
|
||||||
|
|
||||||
long servoPos = parse_angle(command);
|
long servoPos = parse_angle(command);
|
||||||
|
|||||||
Reference in New Issue
Block a user