Quote:
Originally Posted by Random Dude
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?