Joystick feature improvements (#19052)

This commit is contained in:
Ryan
2022-11-27 03:14:45 +11:00
committed by GitHub
parent a5a20cc792
commit 1e95f7be8f
27 changed files with 475 additions and 215 deletions

View File

@@ -1,4 +1,4 @@
#pragma once
#define JOYSTICK_AXES_COUNT 2
#define JOYSTICK_AXIS_COUNT 2
#define JOYSTICK_BUTTON_COUNT 1

View File

@@ -14,7 +14,7 @@ void matrix_scan_user() {
}
// Joystick config
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {
[0] = JOYSTICK_AXIS_IN(ADC_PIN, 0, 512, 1023),
[1] = JOYSTICK_AXIS_VIRTUAL
};