From ab571da499f1ec6443dee43335e6d7ec0fdac0b9 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 21 Oct 2020 09:01:58 -0600 Subject: [PATCH] Fix when i2c read ack condition happens --- keyboards/system76/launch_beta_1/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/system76/launch_beta_1/i2c.c b/keyboards/system76/launch_beta_1/i2c.c index 08630089c42..7877a2b8bfa 100644 --- a/keyboards/system76/launch_beta_1/i2c.c +++ b/keyboards/system76/launch_beta_1/i2c.c @@ -99,7 +99,7 @@ int i2c_read(uint8_t * data, int length) { int i; for (i = 0; i < length; i++) { - bool ack = (i + 1) == length; + bool ack = (i + 1) < length; res = i2c_read_byte(ack); if (res < 0) return res; data[i] = (uint8_t)res;