diff options
author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2020-04-13 04:44:24 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-12 12:44:24 -0700 |
commit | d3c29c9b3c9b1f303ba1c1fd5579d3842d729e5d (patch) | |
tree | b8d087629e258b1782ead2afc8f896159ac13afb /quantum | |
parent | 370577e4ed1a714e818bf11cc870e4915f82e93b (diff) |
Bugfix for quantum/dip_switch.c (#8731)
* dipsw test on helix/rev2/sc/back:five_rows
* bug fix quantum/dip_switch.c
* test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows"
This reverts commit 4b13ebb996e1c4997e6deb1fa3b3227db5fa9661.
* dipsw test on helix/rev2/sc/back:five_rows
* update quantum/dip_switch.c
* test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows"
This reverts commit bf99ace095528ad65c531229bcf5ece037dda595.
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/dip_switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index ab74222d10..66c166ce45 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c @@ -52,13 +52,13 @@ void dip_switch_read(bool forced) { for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { dip_switch_state[i] = !readPin(dip_switch_pad[i]); dip_switch_mask |= dip_switch_state[i] << i; - if (last_dip_switch_state[i] ^ dip_switch_state[i] || forced) { + if (last_dip_switch_state[i] != dip_switch_state[i] || forced) { has_dip_state_changed = true; dip_switch_update_kb(i, dip_switch_state[i]); } } if (has_dip_state_changed) { dip_switch_update_mask_kb(dip_switch_mask); + memcpy(last_dip_switch_state, dip_switch_state, sizeof(dip_switch_state)); } - memcpy(last_dip_switch_state, dip_switch_state, sizeof(&dip_switch_state)); } |