Skip to content

Commit 8ab5385

Browse files
committed
There is a semicolon after SB when setting "Back to spot"
This change was made to make it more consistent
1 parent cc8beb5 commit 8ab5385

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Firmware/Balanduino/Tools.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,12 @@ void setValues(char *input) {
341341
strtok(input, ","); // Ignore 'U'
342342
cfg.turningLimit = atoi(strtok(NULL, ";"));
343343
}
344-
else if (input[1] == 'B') // Set Back To Spot
345-
cfg.backToSpot = input[2] - '0'; // Convert from ASCII to number
344+
else if (input[1] == 'B') { // Set Back To Spot
345+
if (input[3] == '1')
346+
cfg.backToSpot = 1;
347+
else
348+
cfg.backToSpot = 0;
349+
}
346350

347351
updateConfig();
348352
}

0 commit comments

Comments
 (0)