From 8e78bbdea8649ed85bae75a3a6acb145fd05de3f Mon Sep 17 00:00:00 2001 From: Andrew Kay Date: Wed, 26 Jun 2019 19:28:35 -0500 Subject: [PATCH] Fix issue where buffer was not updated after clearing screen --- oec/display.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oec/display.py b/oec/display.py index 75d7c4e..9fd307b 100644 --- a/oec/display.py +++ b/oec/display.py @@ -185,7 +185,10 @@ class Display: self.interface.offload_write(b'\x00', address=0, repeat=((rows+1)*columns)-1) - # TODO: Update the buffer and dirty indicators to reflect the cleared screen. + # Update the buffer and dirty indicators to reflect the cleared screen. + for index in range(rows * columns): + self.buffer[index] = 0x00 + self.dirty[index] = False self.load_address_counter(index=0)