Skip to content

Commit

Permalink
who use const anyway?
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicezki committed Oct 17, 2023
1 parent c38db5f commit 00cd24e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -1336,11 +1336,11 @@ class ARMMane{
let instructionText = this.translateInstruction(step);
newDiv.querySelector(".cmd-text > div > h2").textContent = instructionText;
// Translate the instruction to data
data = this.extractInstruction(instructionText);
newDiv.setAttribute("data-type", data.type || "servo");
newDiv.setAttribute("data-device", data.id || 0);
newDiv.setAttribute("data-value", data.degree || 0);
newDiv.setAttribute("data-speed", data.speed || 0);
let extdata = this.extractInstruction(instructionText);
newDiv.setAttribute("data-type", extdata.type || "servo");
newDiv.setAttribute("data-device", extdata.id || 0);
newDiv.setAttribute("data-value", extdata.degree || 0);
newDiv.setAttribute("data-speed", extdata.speed || 0);
swimLane.appendChild(newDiv);
});
}
Expand Down

0 comments on commit 00cd24e

Please sign in to comment.