Skip to content

Commit

Permalink
replace include of quantum.h in encoder.h
Browse files Browse the repository at this point in the history
  • Loading branch information
BalzGuenat committed Mar 4, 2021
1 parent 91ae274 commit 8f2f14f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions quantum/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void encoder_init(void) {
pad_b = encoders_pad_b;
firstEncoderHere = 0;
#else
if (is_keyboard_left()) {
if (isLeftHand) {
numEncodersHere = NUMBER_OF_ENCODERS_LEFT;
pad_a = encoders_pad_a;
pad_b = encoders_pad_b;
Expand Down Expand Up @@ -129,7 +129,7 @@ static bool encoder_update(int8_t index, uint8_t state) {
# ifndef SPLIT_KEYBOARD
int8_t resolution = encoder_resolutions[index];
# else
int8_t resolution = is_keyboard_left() ? encoder_resolutions[index] : encoder_resolutions_right[index - NUMBER_OF_ENCODERS_LEFT];
int8_t resolution = isLeftHand ? encoder_resolutions[index] : encoder_resolutions_right[index - NUMBER_OF_ENCODERS_LEFT];
# endif
#else
int8_t resolution = ENCODER_RESOLUTION;
Expand Down
4 changes: 3 additions & 1 deletion quantum/encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

#pragma once

#include "quantum.h"
#include <stdbool.h>
#include <stdint.h>
#include <gpio.h>

void encoder_init(void);
bool encoder_read(void);
Expand Down

0 comments on commit 8f2f14f

Please sign in to comment.