Skip to content

Commit

Permalink
fix bug in verify/resend code for stop and allow movement
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-8 committed Jun 19, 2024
1 parent f287e7f commit 2a233c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ async function sendStringSerial(string, verifyData) {
name = "DRIVE_BUTTON_"; // change name to match the setting property of the car's result message
name += string.split(":")[1].split("_")[0]; // add the button number
}
if (name == "S") {
name = "stopped";
}
if (name == "G") {
name == "movement allowed";
}
verify[name] = setTimeout(() => {
console.log("serial resend triggered: ", string);
try {
Expand Down

0 comments on commit 2a233c1

Please sign in to comment.