From adc8bc1747a108d48b0240938c05c0d878045dbf Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 2 Nov 2018 12:48:58 -0400 Subject: [PATCH] sandwich if statement --- keyboards/planck/thk/matrix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/planck/thk/matrix.c b/keyboards/planck/thk/matrix.c index b2028bfae6..482861fbdc 100644 --- a/keyboards/planck/thk/matrix.c +++ b/keyboards/planck/thk/matrix.c @@ -86,9 +86,10 @@ uint8_t matrix_scan(void) { dip_switch[2] = !(PIND & (1 << 4)); dip_switch[3] = !(PIND & (1 << 5)); for (uint8_t i = 0; i < 4; i++) { - if (last_dip_switch[i] ^ dip_switch[i]) + if (last_dip_switch[i] ^ dip_switch[i]) { dip_update(i, dip_switch[i]); dip_update_kb(i, dip_switch[i]); + } } memcpy(last_dip_switch, dip_switch, sizeof(&dip_switch));