Hello,
I found a missing condition in the stepperDegreeDual_42 function in the main.ts file.
When Degree1 == Degree2, there is no specific handling, which can lead to incorrect behavior. I think an additional else condition should be added at the end of the function to handle this case.
Suggested fix:
else { // Degree1 == Degree2
timeout1 = (50000 * Degree1) / (360 * 100)
setStepper_42(0x01, direction1 > 0);
setStepper_42(0x02, direction2 > 0);
basic.pause(timeout1);
motorStop(1);
motorStop(2);
motorStop(3);
motorStop(4);
}
This should correctly handle the case where both motors need to rotate the same number of degrees.
Thank you for your work on this project.
Hello,
I found a missing condition in the stepperDegreeDual_42 function in the main.ts file.
When Degree1 == Degree2, there is no specific handling, which can lead to incorrect behavior. I think an additional else condition should be added at the end of the function to handle this case.
Suggested fix:
else { // Degree1 == Degree2
timeout1 = (50000 * Degree1) / (360 * 100)
}
This should correctly handle the case where both motors need to rotate the same number of degrees.
Thank you for your work on this project.