Example #1
0
	if(tfl > 1.5):
		isHighValueFlow = True
	if(tfl < 1.5) and (isHighValueFlow == True):
		realFlVal += tfl
    else:
	#attende d'au moins 2 secondes avant reset
	if((timestamp - flLastTs) > 2):
		isHighValueFlow = False
    #affichage valeur reele debitmetre
    buf = "Flow %.1f ml" % fl
    mygauge.drawGauge(buf," ml",  700,400, realFlVal ,0,60,False,False,WHITE) 


    #ajoute les valeurs au graphique
#    myplot.addGraphVal(t1,(t2+t3)/2,t6,tfl)
    myplot.addGraphVal(t1,t1,t6,tfl)
    #genere et affiche les courbes sur le graphique a l'ecran
    myplot.drawGraph(50,25,400,300,85,100)
    
    # --- Go ahead and update the screen with what we've drawn.
    pygame.display.flip()
 
    # --- Limit to 60 frames per second (unused)
    #clock.tick(60)
    
    rot = rot + 3
    if(rot > 100):
       rot = 0


    #log to file
Example #2
0
    if(tfl > 0):
	if(tfl > 1.5):
		isHighValueFlow = True
	if(tfl < 1.5) and (isHighValueFlow == True):
		realFlVal += tfl
    else:
	#attende d'au moins 2 secondes avant reset
	if((timestamp - flLastTs) > 2):
		isHighValueFlow = False
    #affichage valeur reele debitmetre
    buf = "Flow %.1f ml" % fl
    mygauge.drawGauge(buf," ml",  700,400, realFlVal ,0,60,False,False,WHITE) 


    #ajoute les valeurs au graphique
    myplot.addGraphVal(t1,(t2+t3)/2,t6,tfl)
    #genere et affiche les courbes sur le graphique a l'ecran
    myplot.drawGraph(50,25,400,300,85,100)
    
    # --- Go ahead and update the screen with what we've drawn.
    pygame.display.flip()
 
    # --- Limit to 60 frames per second (unused)
    #clock.tick(60)
    
    rot = rot + 3
    if(rot > 100):
       rot = 0


    #log to file