Further refactoring of joystick feature (#18437)

This commit is contained in:
Ryan
2022-09-27 18:37:13 +10:00
committed by GitHub
parent fb400f2ac2
commit be8907d634
12 changed files with 248 additions and 309 deletions

View File

@@ -10,11 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
void matrix_scan_user() {
int16_t val = (((uint32_t)timer_read() % 5000 - 2500) * 255) / 5000;
if (val != joystick_status.axes[1]) {
joystick_status.axes[1] = val;
joystick_status.status |= JS_UPDATED;
}
joystick_set_axis(1, val);
}
// Joystick config