modified service script and fixed merge conflict

This commit is contained in:
2021-01-07 15:00:00 +01:00
3 changed files with 6 additions and 9 deletions

View File

@@ -55,7 +55,6 @@ class LedMatrix:
return math.floor(n * multiplier) / multiplier
def xy_to_phys(self, x, y):
"""
Map x,y to physical LED address after accounting for display rotation
@@ -74,12 +73,10 @@ class LedMatrix:
x = y
y = self.columns-1-tmp
# 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 the cycle
# 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))
#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)
stride = self.strid
phys_addr = ((x)%self.panelcolumn) + ((y)*self.panelcolumn) + (self.round_down((x)/self.panelcolumn) * self.panelcolumn * self.panelcolumn)
# if x & 1:
# phys_addr += stride - 1 - y