Do not draw blocked graph if there is little or no activity.
This commit is contained in:
parent
11720bcf3d
commit
e6b884ee97
@ -228,14 +228,15 @@ def drawout(sclpo, sclbl, maxcanv, failture, restart, distance, dots):
|
||||
currpoint = 1
|
||||
targetpx = 128 - distance
|
||||
while currpoint < len(sclbl):
|
||||
if (sclbl[currpoint - 1] < sclbl[currpoint]):
|
||||
draw.polygon([(targetpx + distance, 47 - sclbl[currpoint - 1]), (targetpx, 47 - sclbl[currpoint]), (targetpx, 47 - sclbl[currpoint - 1])], fill="white")
|
||||
#cliout(f"RectDBG (less): X1: {targetpx}, Y1: {47 - sclbl[currpoint - 1]}, X2:{targetpx + distance}, Y2: 47",4)
|
||||
draw.rectangle((targetpx, 47 - sclbl[currpoint - 1], targetpx + distance, 47), fill="white")
|
||||
else:
|
||||
draw.polygon([(targetpx + distance, 47 - sclbl[currpoint - 1]), (targetpx + distance, 47 - sclbl[currpoint]), (targetpx, 47 - sclbl[currpoint])], fill="white")
|
||||
#cliout(f"RectDBG (more): X1: {targetpx}, Y1: {47 - sclbl[currpoint]}, X1: {targetpx + distance}, Y2: 47", 4)
|
||||
draw.rectangle((targetpx, 47 - sclbl[currpoint], targetpx + distance, 47), fill="white")
|
||||
if sclbl[currpoint] != 0 :
|
||||
if (sclbl[currpoint - 1] < sclbl[currpoint]):
|
||||
draw.polygon([(targetpx + distance, 47 - sclbl[currpoint - 1]), (targetpx, 47 - sclbl[currpoint]), (targetpx, 47 - sclbl[currpoint - 1])], fill="white")
|
||||
#cliout(f"RectDBG (less): X1: {targetpx}, Y1: {47 - sclbl[currpoint - 1]}, X2:{targetpx + distance}, Y2: 47",4)
|
||||
draw.rectangle((targetpx, 47 - sclbl[currpoint - 1], targetpx + distance, 47), fill="white")
|
||||
else:
|
||||
draw.polygon([(targetpx + distance, 47 - sclbl[currpoint - 1]), (targetpx + distance, 47 - sclbl[currpoint]), (targetpx, 47 - sclbl[currpoint])], fill="white")
|
||||
#cliout(f"RectDBG (more): X1: {targetpx}, Y1: {47 - sclbl[currpoint]}, X1: {targetpx + distance}, Y2: 47", 4)
|
||||
draw.rectangle((targetpx, 47 - sclbl[currpoint], targetpx + distance, 47), fill="white")
|
||||
currpoint += 1
|
||||
targetpx -= distance
|
||||
|
||||
@ -295,7 +296,7 @@ def cliout(data, code):
|
||||
print(f"[{codes}] [{time}] {data}")
|
||||
|
||||
def main():
|
||||
cliout("Blocky Graph Monitor for OLED v0.91b", 0)
|
||||
cliout("Blocky Graph Monitor for OLED v0.9.2b", 0)
|
||||
cliout("Nikopol 2025", 0)
|
||||
cliout("Init...", 0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user