From 6bd6dd2e1c0f562e8f3237459caa9dc41e67c208 Mon Sep 17 00:00:00 2001 From: willem Date: Sun, 24 Jan 2021 14:41:39 +0100 Subject: [PATCH] add exception output --- ledmatrix.py | 5 ----- main.py | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ledmatrix.py b/ledmatrix.py index 3f61810..bfc558b 100755 --- a/ledmatrix.py +++ b/ledmatrix.py @@ -75,13 +75,8 @@ class LedMatrix: # The LEDs are laid out in a long string going from north to south, # one step to the east, and then south to north, before thxy e cycle # starts over. - stride = self.stride phys_addr = int(((x)%self.panelcolumn) + ((y)*self.panelcolumn) + (self.round_down((x)/self.panelcolumn) * self.panelcolumn * self.panelcolumn)) - # if x & 1: - # phys_addr += stride - 1 - y - # else: - # phys_addr += y return phys_addr def get_pixel(self, x, y): diff --git a/main.py b/main.py index 0d4d515..9d8bba1 100755 --- a/main.py +++ b/main.py @@ -47,6 +47,7 @@ else: except: # ...else assume that there's an MCU (driving the display) connected # to a serial port + print('HAL: failed: {}'.format(e.args[0])) from arduinoserialhal import ArduinoSerialHAL as HAL gc.collect()