Having problems with getting inputs from the controller on programming and need some help

Hey there I am from team 7662 and we are having some problems with our programming. The issue is that we are unable to get imputes from the Logic tech controller because when I try to write the code I am told that it is static reference to the non dash static method, error code we are getting “getRawButton(int) from the type Generic HID” so we can’t get the import Generic HID to function with the methods we are attempting to create. If you have any impute on this, it would be greatly appreciated!

Hi Luke!

If you could, please let us know what programming language you’re working in and maybe copy a sample of the code that’s erroring into the thread. It’s hard to guess what the issue might be without more information.


Better yet, please share your entire project, ideally as a link to github or a similar sounce control management system.

It sounds like you may be in Java if so getRawButton(int) is not a static method on GenericHID so you need an instance of it instead of referencing through the class. In our case for logitech we subclassed GenericHID so the this reference is an instance of GenericHID our code is here it is pretty much what we carried over from last year. We do plan to change it to the command style later but have other fish to fry right now.

Ah yea sorry we are using Java. I couldn’t get an link to the code or anything but I have a screenshot of part of the code and the error code at the bottom.

Mu guess is you aren’t extending GenericHID, it is hard to tell, the terminal isn’t really showing the compile problem, the problems tab will have a description of the problem, See at the bottom there are for tabs Problems, Output, Debug Console, and Terminal, click on problems, it will describe the compile problem better. But my guess is you aren’t extending GenericHID or you aren’t importing it.

Ah cool! We got it now, our programmer just started from scratch and was able to get it working, but thank you guys for your help!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.