Added icon upload script, fixed ledmatrix for different layout
This commit is contained in:
@@ -77,13 +77,15 @@ class LedMatrix:
|
||||
# one step to the east, and then south to north, before the cycle
|
||||
# starts over.
|
||||
stride = self.stride
|
||||
phys_addr = ((x-1)%self.panelcolumn) + ((y-1)*self.panelcolumn) + (self.round_down((x-1)/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))
|
||||
#MOD(x-1;panelCol) + ((y-1)*panelCol) + (FLOOR.MATH((x-1)/panelCol;1)*panelCol*panelRow)
|
||||
#print("xy_to_phys x=",x," y=",y," phys=",phys_addr)
|
||||
|
||||
# if x & 1:
|
||||
# phys_addr += stride - 1 - y
|
||||
# else:
|
||||
# phys_addr += y
|
||||
# return phys_addr
|
||||
return phys_addr
|
||||
|
||||
def get_pixel(self, x, y):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user