View Single Post
  #38   Spotlight this post!  
Unread 21-12-2010, 13:45
l0jec l0jec is offline
Registered User
no team
 
Join Date: Oct 2009
Rookie Year: 2004
Location: St. Louis, MO
Posts: 52
l0jec has a spectacular aura aboutl0jec has a spectacular aura about
Re: [FTC]: Samantha? Like it or hate it?

Quote:
Originally Posted by Random Dude View Post
It's actually not specifically a samantha issue. The same thing can (and does) happen over bluetooth, and even potentially direct USB tether (if one were to pull the cable out). The joystick.c template fails to get any packets from the controller, and just assumes the values should remain the same. (instead of entering a failsafe mode)
If what normalmutant is saying about the Samantha locking up and continuing to send the same packet to the NXT is accurate, then a fix to the template may not work well without additional design changes? Your idea for a template fix to JoystickDriver.c as I understand it would rely on detecting that new packets are not being received so that you could stop sending the last known good one back in the joystick struct. If the Samantha cannot detect a drop and keeps sending the NXT old packets as if they are new ones, the template may not have enough info to easily know the difference without resorting to comparing the payload state of each packet to previous ones.
The "additional design changes" I mention above may be to add an incrementing id to each packet payload which could be used to easily identify if they are new or not by any downstream receiver (Samantha or ROBOTC/LabView code) and even allow tracking of dropped/missed messages.
Thoughts?

Last edited by l0jec : 21-12-2010 at 13:48. Reason: Spelling
Reply With Quote