Browse Source

extend VPU OUTPUT to 30x8, fix Overlay

micha 1 day ago
parent
commit
9707f8dcbb
2 changed files with 20 additions and 3 deletions
  1. 19 2
      vpu/vpu_live4.py
  2. 1 1
      vpu/watchdog_vpu.py

+ 19 - 2
vpu/vpu_live4.py

@@ -1316,6 +1316,9 @@ if options.videoplayer:
 
 def draw_overlay():
     global fps,fps2
+    pygame.draw.rect(window,[0,0,20],[0,0,MAIN_SIZE[0],57]) # background
+    pygame.draw.rect(window,[0,0,20],[0,215,MAIN_SIZE[0],15]) # background
+    pygame.draw.rect(window,[0,0,20],[0,398,MAIN_SIZE[0],98]) # background
     fr = font15.render("DMX-FPS: {}".format(fps) ,1, (200,0,255))
     window.blit(fr,(10,2))
 
@@ -1344,6 +1347,16 @@ def draw_overlay():
     fr = font15.render("v-play2: 1.{:}".format(vplay2) ,1, (200,0,255))
     window.blit(fr,(270,22))
 
+    try:
+        global pointer
+        # pointer
+        fr = font15.render("X:{:03}".format(pointer._x) ,1, (200,200,200))
+        window.blit(fr,(10,30))
+        fr = font15.render("Y:{:03}".format(pointer._y) ,1, (200,200,200))
+        window.blit(fr,(10,40))
+    except Exception as e:
+        print("Overlay err:",e)
+
 def draw_box_frame(window,rgb,pos,offset=0):
     p1 = [pos[0],pos[1]]
     p2 = [pos[0]+pos[2],pos[1]+pos[3]]
@@ -1897,7 +1910,7 @@ def draw_kachel_nr(): #GRID,_x=0,_y=0):
     _y=0
     for i in range(8):
         _x=0
-        for j in range(20):
+        for j in range(30):
             pygame.draw.rect(window,[10,20,10],[40+_x+2,60+_y+2,14,9]) #background
             _j=j #string.ascii_uppercase[j]
             fr = font12.render("{}:{}".format(_j+1,i+1) ,1, (200,200,55))
@@ -2420,6 +2433,7 @@ def GRID_A1_DIM():
         s.fill((0,0,0))                 # this fills the entire surface
         window.blit(s, (CFG["x1"],CFG["y2"]-p*8))
 
+        # GRID_A1_DIM_LABEL
         fr   = font15.render("Output:GRID_A1",1, (255,255,255))
         fr_r = fr.get_rect(center=(int(wx/2),int(0+pm_wy-p*0-10)))
         window.blit(fr,(CFG["x1"],CFG["y2"]+5))
@@ -2448,6 +2462,7 @@ def GRID_A2_DIM():
         s.fill((0,0,0))                 # this fills the entire surface
         window.blit(s, (CFG["x1"],CFG["y2"]-p*8))
 
+        # GRID_A2_DIM_LABEL
         fr   = font15.render("Output:GRID_A2",1, (255,255,255))
         fr_r = fr.get_rect(center=(int(wx/2),int(0+pm_wy-p*0-10)))
         window.blit(fr,(CFG["x1"],CFG["y2"]+5))
@@ -2499,7 +2514,7 @@ def main():
         window.fill((10,0,30))
         calc_fps()
         calc_fps2()
-        draw_overlay()
+        #draw_overlay()
 
 
         # GRID loop
@@ -2555,6 +2570,8 @@ def main():
         GRID_A1_DIM()
         GRID_A2_DIM()
 
+        draw_overlay()
+
 
         pygame.display.flip()
         clock.tick(25)

+ 1 - 1
vpu/watchdog_vpu.py

@@ -180,7 +180,7 @@ def vpu04(): # pixel-perfect
 
     cmd ="screen -m -d -S vpu04_out --"
     cmd += " python3 /opt/LibreLight/Xdesk/vpu/vpu_live4.py"
-    cmd += " -m 16,30,10"
+    cmd += " -m 16,36,10"
     cmd += " -X 20"
     cmd += " --pixel-map=_10"
     cmd += " --dual-vpu=1"