platypusllc / tablet

Source code for Platypus tablet android app
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

Joystick control cuts out #70

Open shawnhanna opened 7 years ago

shawnhanna commented 7 years ago

Joystick control, even when we are standing near the robot, often will cut out.

It appears to be worst when running w/o moving your fingers at all (i.e. not updating the throttle values, I assume?)

shawnhanna commented 7 years ago

I haven't yet tried playing too much with the update rate option. Maybe it needs to be set lower

jjblum commented 7 years ago

I'm not sure about outside of my branches, but this is a "feature" in the phone server, not the tablet. It isn't cutting out. Any time you press the joystick, the function that runs on the phone server in response starts a "time out" of sorts. If the phone does not receive new joystick inputs, it sets the signals to zero. This prevents a runaway condition.

I think Chris removed this some time ago in a cleanup branch, but I never incorporated that change into my branches.

shantanu-vyas commented 7 years ago

If the phone does not receive new joystick inputs, it sets the signals to zero

Maybe I'm misunderstanding this but the tablet joystick is constantly sending out values when the joystick is not at origin. So shouldn't the phone constantly be getting twist values so it doesnt time out?

shantanu-vyas commented 7 years ago

Oh I'm wrong. https://github.com/platypusllc/tablet/blob/master/app/src/main/java/com/platypus/android/tablet/TeleOpPanel.java#L865 Only when its moved does it update the thrust and rudder. We should should switch to a joystick listener to uses the MotionEvent.ACTION_DOWN instead of ACTION_MOVE so it constantly runs while youre holding the joystick.

christomaszewski commented 7 years ago

I fixed this in a commit somewhere...

Sincerely,

Christopher Tomaszewski (973) 641-0694

On Thu, Jun 15, 2017 at 12:02 AM, Shantanu Vyas notifications@github.com wrote:

Oh I'm wrong. https://github.com/platypusllc/tablet/blob/master/app/src/main/java/com/ platypus/android/tablet/TeleOpPanel.java#L865 Only when its moved does it update the thrust and rudder. We should add a new joystick listener that handles while not at origin.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/platypusllc/tablet/issues/70#issuecomment-308622515, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbbGlhT_yNm7eN3Of8j15Ce0bQAOe4hks5sEKzvgaJpZM4N35LP .

shantanu-vyas commented 7 years ago

A commit for the tablet or server?

christomaszewski commented 7 years ago

Tablet

El El jue, jun. 15, 2017 a las 14:00, Shantanu Vyas < notifications@github.com> escribió:

A commit for the tablet or server?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/platypusllc/tablet/issues/70#issuecomment-308811220, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbbGnyjwn3705XlU3bthhX0PuPl_Uo0ks5sEWgkgaJpZM4N35LP .

-- Sincerely,

Christopher Tomaszewski (973) 641-0694