FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Robot Does Not Stop When Match Is Over

Solved!
Go to solution

Re: Robot Does Not Stop When Match Is Over

Garrett,

Thanks for all of your work on this.  While it is not great to have the field end the match .5 seconds early, I understand this workaround and it is much better than what it does now.  I will try out the fix and let you know how things go.

When you say you could work around the new .5 early disable, how would you do that.  I don't think we would do this but it would be good to get some idea on how to do this.  My guess is we would just capture the disable event and allow our robot to run for some defined additional amount of time before we actually call our disable.  Not sure if that made sense but it is what I thought of initially.

Thanks,

Matt

0 Kudos
Message 11 of 13
(317 Views)

Re: Robot Does Not Stop When Match Is Over

That's exactly what you'd do. Measure your loop iteration time. When you see disable, instead of disabling, run a few more loops based off how much time you know you have.

0 Kudos
Message 12 of 13
(317 Views)

Re: Robot Does Not Stop When Match Is Over

I tested this and it now works correctly.  Thanks again.

0 Kudos
Message 13 of 13
(317 Views)