Selaa lähdekoodia

Fix check when compiling HID Joystick with digital driver (#17844)

Drashna Jaelre 2 vuotta sitten
vanhempi
commit
d93dfbff3c
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      quantum/process_keycode/process_joystick.c

+ 1 - 1
quantum/process_keycode/process_joystick.c

@@ -106,7 +106,7 @@ bool process_joystick_analogread_quantum() {
 
         wait_us(10);
 
-#    if defined(__AVR__) || defined(PROTOCOL_CHIBIOS)
+#    if defined(ANALOG_JOYSTICK_ENABLE) && (defined(__AVR__) || defined(PROTOCOL_CHIBIOS))
         int16_t axis_val = analogReadPin(joystick_axes[axis_index].input_pin);
 #    else
         // default to resting position