team2059 / Zaphod

Robot for 2014 FRC Game Aerial Assist
0 stars 0 forks source link

Duplicate shooting #1

Open AquaMorph opened 9 years ago

AquaMorph commented 9 years ago

If the shooting trigger is hit multiple times the robot will shoot more than one shot back to back. Dangerous at demos with little kids rushing to the robot after it shoots.

CarlColglazier commented 9 years ago

Sounds like something that needs be fixed.

@stonewareslord @int0x191f2 : Are the shooting and waitingToFire booleans declared at the top of the file doing anything currently? Was that designed to prevent this issue or is it unrelated?

Looking at the code, it seems like hasShot, which is always called using bool shooter_fired(), is being used to check the state of the shooter; however, when bool shooter_fire() (which is only ever used once) is called, the tree that seems to actually shoots does not seem to declare that it is shooting.

Apparently, master was made obsolete at some point. I shall take a look at the current branch later.