View unanswered posts | View active topics It is currently Thu Jul 24, 2014 1:09 am






Reply to topic  [ 5 posts ] 
Determining when match ends FTC 
Author Message
Rookie

Joined: Sun Nov 03, 2013 12:10 am
Posts: 2
Post Determining when match ends FTC
My team has written special motor controlling software that needs to be specially shut down at the end of the FTC teleop period. Unfortunately, we have no idea how our program is terminated by the field control software. Is there any way to alter the software that terminates the program to first call a method, or other way to have code executed before our program is terminated?
Thanks,
-SAAS Robotics


Sun Nov 03, 2013 12:19 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Determining when match ends FTC
As far as I know, the FCS just kills your teleop program so all motors will be stopped. So you can't really run any "shutdown" code. What exactly do you want to do at the end of the game? If you need to do something to "stabilize" your hang. You should do it as soon as you are hung, not waiting for teleop to end.


Sun Nov 03, 2013 12:34 am
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: Determining when match ends FTC
An unreliable way to do it would be to start a timer after waitForStart(), but that only provides a rough estimate.

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sun Nov 03, 2013 10:35 am
Profile
Rookie

Joined: Sun Nov 03, 2013 12:10 am
Posts: 2
Post Re: Determining when match ends FTC
We are using the I2C bus to communicate with the NXT Motor Controllers, which continue to power the motors even when the game had stopped. For this reason, we need to find a way to cut power to these devices before the game ends.


Sun Nov 03, 2013 12:27 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Determining when match ends FTC
isaaczinda wrote:
We are using the I2C bus to communicate with the NXT Motor Controllers, which continue to power the motors even when the game had stopped. For this reason, we need to find a way to cut power to these devices before the game ends.

What do you mean by "continue to power the motors even when the game had stopped" then "cut power to these devices before the game ends"? Is there a difference between "game had stopped" and "game ends"?
BTW, FIRST would not be happy if you bypass the FCS and continue to power the motor controllers. For safety, they want to be able to cut your power. There was one year that for some unknown reason, our robot went crazy and would not stop. The FCS tried to exercise their control to disable our robot but it did not work. We didn't know what caused it but it's not a good thing that FCS cannot cut power to your robot.


Sun Nov 03, 2013 1:49 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.