add exception output

This commit is contained in:
2021-01-24 14:41:39 +01:00
parent 11d9a58a55
commit 6bd6dd2e1c
2 changed files with 1 additions and 5 deletions

View File

@@ -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):

View File

@@ -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()