Browse Source

Client now displays drift rate

Graham Northup 7 năm trước cách đây
mục cha
commit
171cfd400c
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      client.py

+ 6 - 0
client.py

@@ -130,6 +130,7 @@ def pygame_notes():
     bgrwin.set_colorkey((0, 0, 0))
 
     clock = pygame.time.Clock()
+    font = pygame.font.SysFont(pygame.font.get_default_font(), 24)
 
     while True:
         if options.no_colback:
@@ -180,8 +181,13 @@ def pygame_notes():
         #        break
         #if len(pts) > 2:
         #    pygame.gfxdraw.aapolygon(disp, pts, [0, 255, 0])
+
         disp.blit(bgrwin, (0, 0))
         disp.blit(sampwin, (BGR_WIDTH, 0))
+        if QUEUED_PCM:
+            tsurf = font.render('%08.6f'%(DRIFT_FACTOR,), True, (255, 255, 255), (0, 0, 0))
+            disp.fill((0, 0, 0), tsurf.get_rect())
+            disp.blit(tsurf, (0, 0))
         pygame.display.flip()
 
         for ev in pygame.event.get():