Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Clarification on the Gamepad class #275

Open
novabansal opened this issue Oct 9, 2020 · 3 comments
Open

Clarification on the Gamepad class #275

novabansal opened this issue Oct 9, 2020 · 3 comments

Comments

@novabansal
Copy link

Hi devs,
I'm a programmer on Team 7149. Recently, we've been doing a deep dive into the FTC SDK and we were wondering how the Gamepad class updates during loops. We noticed that in EventLoopManager, the gamepad.fromByteArray() method is called instead of one of the update() functions. How does the fromByteArray method work? How did you determine what hex values to use?

Thanks,
Team 7149

@novabansal novabansal reopened this Oct 9, 2020
@novabansal novabansal reopened this Oct 9, 2020
@novabansal
Copy link
Author

(Ignore my computer glitching out haha)

@Windwoes
Copy link
Member

Windwoes commented Oct 9, 2020

fromByteArray() is called to fill the object with the serialized gamepad data sent over from the Driver Station. Since the gamepads are not connected to the Robot Controller, it would make sense that update() is not used in the RC side code; most likely it is only used on the DS side. (Shared codebase)

@novabansal
Copy link
Author

@FROGbots-4634 Thanks! That's what we thought.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants