fix program infinity mod

This commit is contained in:
DashyFox 2024-09-22 23:21:44 +03:00
parent 1564f38ff3
commit b95af34bfd
2 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,6 @@
#define PRE_RUN_DELAY_MODE 0
#define NOBALL_TIMEOUT_MULTIPLIER 4.2
typedef enum ServoMap{
SERVO_AXIAL = 0,
SERVO_HORIZONTAL = 1,

View File

@ -168,7 +168,8 @@ void BallEXT_Handler() {
}
if (currentInfo.program.currentBallCount + 1
< currentInfo.program.program.header.countRepeat) {
< currentInfo.program.program.header.countRepeat
|| currentInfo.program.program.header.countRepeat == 0) {
currentInfo.program.currentBallCount++;
} else {
stopShooting();
@ -266,8 +267,9 @@ void shotApply(Shot *shot) {
shot->rotationVertical);
setRollersSpeed(shot->speedRollerTop, shot->speedRollerBottom);
setScrewkSpeed(shot->speedScrew);
noBallTimeout = MIN(calculatePeriod(
shot->speedScrew) * NOBALL_TIMEOUT_MULTIPLIER, 30000);
noBallTimeout = MIN(
calculatePeriod( shot->speedScrew) * NOBALL_TIMEOUT_MULTIPLIER,
30000);
noBallTimer = millis();
print("Fire!\n");
print("isExist ");