mirror of
https://github.com/DashyFox/StackSport.git
synced 2025-05-04 07:10:17 +00:00
fix program infinity mod
This commit is contained in:
parent
1564f38ff3
commit
b95af34bfd
@ -16,7 +16,6 @@
|
|||||||
#define PRE_RUN_DELAY_MODE 0
|
#define PRE_RUN_DELAY_MODE 0
|
||||||
#define NOBALL_TIMEOUT_MULTIPLIER 4.2
|
#define NOBALL_TIMEOUT_MULTIPLIER 4.2
|
||||||
|
|
||||||
|
|
||||||
typedef enum ServoMap{
|
typedef enum ServoMap{
|
||||||
SERVO_AXIAL = 0,
|
SERVO_AXIAL = 0,
|
||||||
SERVO_HORIZONTAL = 1,
|
SERVO_HORIZONTAL = 1,
|
||||||
|
@ -168,7 +168,8 @@ void BallEXT_Handler() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentInfo.program.currentBallCount + 1
|
if (currentInfo.program.currentBallCount + 1
|
||||||
< currentInfo.program.program.header.countRepeat) {
|
< currentInfo.program.program.header.countRepeat
|
||||||
|
|| currentInfo.program.program.header.countRepeat == 0) {
|
||||||
currentInfo.program.currentBallCount++;
|
currentInfo.program.currentBallCount++;
|
||||||
} else {
|
} else {
|
||||||
stopShooting();
|
stopShooting();
|
||||||
@ -266,8 +267,9 @@ void shotApply(Shot *shot) {
|
|||||||
shot->rotationVertical);
|
shot->rotationVertical);
|
||||||
setRollersSpeed(shot->speedRollerTop, shot->speedRollerBottom);
|
setRollersSpeed(shot->speedRollerTop, shot->speedRollerBottom);
|
||||||
setScrewkSpeed(shot->speedScrew);
|
setScrewkSpeed(shot->speedScrew);
|
||||||
noBallTimeout = MIN(calculatePeriod(
|
noBallTimeout = MIN(
|
||||||
shot->speedScrew) * NOBALL_TIMEOUT_MULTIPLIER, 30000);
|
calculatePeriod( shot->speedScrew) * NOBALL_TIMEOUT_MULTIPLIER,
|
||||||
|
30000);
|
||||||
noBallTimer = millis();
|
noBallTimer = millis();
|
||||||
print("Fire!\n");
|
print("Fire!\n");
|
||||||
print("isExist ");
|
print("isExist ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user