Re: Program termination at end of match
The flag needs to be set prior to each motor being set to take effect.
You could internally create a timer task that would flip the flag & set each motor just before two minutes is up. Not very clean, but a possibility.
The problem is that the FCS kills your running program; so I cannot think of a better way to trigger an end-of-match event to coast the motors.