From dac259d68ec81adca883653f5c715cee3c472776 Mon Sep 17 00:00:00 2001 From: Victor Barberan Date: Wed, 25 Aug 2021 18:16:43 +0200 Subject: [PATCH 1/2] Slow oled speed to improve stability --- sam/src/SckAux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sam/src/SckAux.cpp b/sam/src/SckAux.cpp index 9aecd0c..5fd0589 100644 --- a/sam/src/SckAux.cpp +++ b/sam/src/SckAux.cpp @@ -853,7 +853,7 @@ bool Groove_OLED::start() { if (!I2Cdetect(&auxWire, deviceAddress)) return false; - u8g2_oled.setBusClock(1000000); // 1000000 -> 68 ms for a full buffer redraw + u8g2_oled.setBusClock(100000); u8g2_oled.begin(); u8g2_oled.drawXBM( 16, 16, 96, 96, scLogo); u8g2_oled.sendBuffer(); From 625cfdd66400a20348bb359eb187a24fa7ae2cb8 Mon Sep 17 00:00:00 2001 From: Victor Barberan Date: Wed, 25 Aug 2021 18:17:17 +0200 Subject: [PATCH 2/2] Read all available data on Serial to avoid delays --- sam/src/SckBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sam/src/SckBase.cpp b/sam/src/SckBase.cpp index a1c31d7..11eb51e 100644 --- a/sam/src/SckBase.cpp +++ b/sam/src/SckBase.cpp @@ -498,7 +498,7 @@ void SckBase::enterSetup() void SckBase::inputUpdate() { - if (SerialUSB.available()) { + while (SerialUSB.available()) { char buff = SerialUSB.read(); uint16_t blen = serialBuff.length();