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

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1512

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

Ernest3.14

Professor

Joined: Sat May 18, 2013 1:24 pmPosts: 272Location: Olympia, WA

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.

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

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1512

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.

Who is online

Users browsing this forum: No registered users and 2 guests

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