Further refactoring of joystick feature (#18437)
This commit is contained in:
parent
fb400f2ac2
commit
be8907d634
12 changed files with 248 additions and 309 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue