So Ive run into a problem programming for the drop targets on my flash machine.
For those of you not familiar with early solid state Williams drop targets, the work in the following manner:
When the target is hit and goes down, the contacts will close a switch circuit on thy way down, but at the bottom of their fall, the circuit opens up again. When all the targets are down, It is supposed to create an ‘all down’ switch circuit. However, due to the nature of the design, this ‘all down’ switch rarely works. When the drop targets reset, the switch also end up getting triggered on the way up.
So to make the switches register more reliably, I am trying to create some coding that detects the switch closing and opening quickly, and then sets a flag that shows that target is down. I then would check all the flags for the targets to see if the entire bank is down. What would be the best way to go about this? Could I use a call like sw_droptarget_active_for_10ms? I need to check my last log file to see what the minimum time the targets are going from close to open.
On my other issue, with the switches closing on the way back up, I may have to move my reset routine to a higher mode (my utility mode runs at 99) and then employ a switch stop to keep them from scoring on the way back up. Any ideas how I can do this during game play? The best I can come up with is a flag in my player stats that comes up during the reset, and is applied in the top mode to stop the score from registering, and then gets turned off after the reset coils finish.
I do have a ‘all targets up’ switch I could use, and it seems to work reliably.
What I have so far can be found in the drop target file on my github. : https://github.com/UncivilEngineer/Flash