View Single Post
  #1   Spotlight this post!  
Unread 21-02-2013, 12:40
FTC6389's Avatar
FTC6389 FTC6389 is offline
FTC Team #6389
FTC #6389 (The Flaming Unicorns)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Eden Prairie Minnestoa
Posts: 13
FTC6389 is an unknown quantity at this point
[FTC]: Detect loss of comm with FCS...

In case anyone is interested, we found a modified version of JoystickDriver.c created by now retired FTC team 2848 (available here). It basically adds another property to the joystick object called "connected", which you then test inside your main loop.

This is useful because as some of us have experienced, the NXT will carry out the last instruction it received if it loses connection to the FCS. So, say you are "moving forward" and that action sets all your drive motors to 75% power, then your samo drops connection to the FCS (which we can always repro by shocking the bot via static electricity), your bot will continue to move forward at 75% power indefinately because the "set all motors to 0%" message will never get to the NXT. The modified joystick driver and additional main loop check of the "joystick.connected" property will allow your teleop program to automatically stop all motors if the FCS connection is lost.

Hope this is useful to teams.

----
FTC Team #6389
__________________

2012-13 FTC Team #6389 - Flaming Unicorns
Reply With Quote