Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen committed Dec 28, 2024
1 parent d96f8de commit 0975f20
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/generators/arduino/leaphy_original.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,11 @@ function getCodeGenerators(arduino: Arduino) {
);
// Set different motor pins for nano robots
if (arduino.robotType.includes("nano"))
// Map the speed to a range of 150 - 255 to compensate for low PWM signal voltage
if (parseInt(speed) > 0) {
// Map the speed to a range of 150 - 255 to compensate for low PWM signal voltage
speed = `map(${speed}, 0, 255, 150, 255)`;
}
arduino.addSetup(
"set_motor_pins",
"setMotorPins(3, 2, 11, 4);",
true,
);
arduino.addSetup("set_motor_pins", "setMotorPins(3, 2, 11, 4);", true);

return `setMotor(${dropdown_Type}, ${speed});\n`;
};
Expand Down

0 comments on commit 0975f20

Please sign in to comment.