FeralAI / GP2040

Gamepad firmware for Raspberry Pi Pico and other RP2040 microcontrollers supporting Nintendo Switch, XInput and DirectInput
https://gp2040.info
MIT License
585 stars 125 forks source link

after use latest version dependency libs, init adc is not work #81

Open fiefdx opened 2 years ago

fiefdx commented 2 years ago

I use latest wizio-pico, and, patch the tinyusb_gamepad commit(Updated to support latest TinyUSB version #79), then, the init adc is not work.

I init adc in Gamepad::setup method, like:

adc_init(); adc_gpio_init(26); adc_gpio_init(27); adc_gpio_init(28);

and, in Gamepad::read method: update joystick like:

adc_select_input(0); state.lx = (adc_read() >> 4) << 8; adc_select_input(1); state.ly = (adc_read() >> 4) << 8;

it worked before, but, now it not work, I am sure it not my hardware problem, and, not the code problem, it must be some latest lib update break something

TheTrainGoes commented 2 years ago

Hi @fiefdx,

There was an update recently to Wizio-Pico that caused some issues for compiling through VS.

From one of the gents working on development: "if you are trying to build the latest GP2040-CE, you will need to uninstall your current Wizio platform and reinstall using my modified fork here: https://github.com/arntsonl/wizio-pico.git "

As a note - This project is no longer maintained. Please check out the Community Edition project and post your issue there if it continues. The Community Edition issues section can be found here: https://github.com/OpenStickFoundation/GP2040-CE/issues

fiefdx commented 2 years ago

Hi @fiefdx,

There was an update recently to Wizio-Pico that caused some issues for compiling through VS.

From one of the gents working on development: "if you are trying to build the latest GP2040-CE, you will need to uninstall your current Wizio platform and reinstall using my modified fork here: https://github.com/arntsonl/wizio-pico.git "

As a note - This project is no longer maintained. Please check out the Community Edition project and post your issue there if it continues. The Community Edition issues section can be found here: https://github.com/OpenStickFoundation/GP2040-CE/issues

thanks, I will try it