add exception output
This commit is contained in:
@@ -75,13 +75,8 @@ class LedMatrix:
|
|||||||
# The LEDs are laid out in a long string going from north to south,
|
# 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
|
# one step to the east, and then south to north, before thxy e cycle
|
||||||
# starts over.
|
# starts over.
|
||||||
stride = self.stride
|
|
||||||
phys_addr = int(((x)%self.panelcolumn) + ((y)*self.panelcolumn) + (self.round_down((x)/self.panelcolumn) * self.panelcolumn * self.panelcolumn))
|
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
|
return phys_addr
|
||||||
|
|
||||||
def get_pixel(self, x, y):
|
def get_pixel(self, x, y):
|
||||||
|
|||||||
1
main.py
1
main.py
@@ -47,6 +47,7 @@ else:
|
|||||||
except:
|
except:
|
||||||
# ...else assume that there's an MCU (driving the display) connected
|
# ...else assume that there's an MCU (driving the display) connected
|
||||||
# to a serial port
|
# to a serial port
|
||||||
|
print('HAL: failed: {}'.format(e.args[0]))
|
||||||
from arduinoserialhal import ArduinoSerialHAL as HAL
|
from arduinoserialhal import ArduinoSerialHAL as HAL
|
||||||
|
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
|||||||
Reference in New Issue
Block a user