[chronojump] Encoder: after capturing graph window do not close
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder: after capturing graph window do not close
- Date: Wed, 10 Oct 2012 16:02:55 +0000 (UTC)
commit 011328eb7885d45d7cb2c451503e1ed97a13185a
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Oct 10 18:02:18 2012 +0200
Encoder: after capturing graph window do not close
encoder/pyserial_pyper.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/encoder/pyserial_pyper.py b/encoder/pyserial_pyper.py
index 86d14db..02e4032 100644
--- a/encoder/pyserial_pyper.py
+++ b/encoder/pyserial_pyper.py
@@ -288,7 +288,8 @@ def update_graph(meanPowerList):
else:
width = (surface_width - 2*horiz_margin) / len(meanPowerList)
left = horiz_margin + width*count
- pygame.draw.rect(s, (255,255,255), (left, bar_height, width-sep, surface_height-bar_height), 2)
+ #pygame.draw.rect(s, (255,255,255), (left, bar_height, width-sep, surface_height-bar_height), 2)
+ pygame.draw.rect(s, (255,255,255), (left, bar_height, width-sep, surface_height-bar_height), 0) #0: filled
string = "%.2f" % meanPower
text = font.render(string,1,(255,255,255))
@@ -480,6 +481,11 @@ if __name__ == '__main__':
print "\nDone! Please, close this window."
+ while 1:
+ pygame.time.delay(30)
+ pygame.display.flip() #update the screen
+
+
#except:
# print "aarrgggggh!!"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]