Skip to content

Gamepad is not playing well with serial over BLE? #114

Description

@SaintSampo

@fgrossman I was testing arcade drive and found it was behaving poorly. I have tracked the issue down to what seems like an interaction between serial and gamepad.

My testing was on a Beta XRP connected over BLE with this simple program:

from XRPLib.board import Board
from XRPLib.gamepad import *
import time

board = Board.get_default_board()

gp = Gamepad.get_default_gamepad()


while not (board.is_button_pressed()):
  print(gp.get_value(gp.Y1))
  time.sleep(0.05)

Below is a snapshot of the inconsistent results. Dropped characters. extra and missing newlines:

-0.9843138
-0.9843138

-1.0
0.003921568
1.0
1.0

One possible cause for this, the gamepad is sending 18 vars at 50Hz to the robot, that is a lot of data?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions