コード例 #1
0
ファイル: main-wo-nimbus.py プロジェクト: r0bin-fr/pirok
    buf2 = buf2 + "%"
    stext = fontSmall.render(buf2,False,GREY)
    screen.blit(stext,(650,285))

    #affiche les jauges
    t1 = maximT1.getTemp()
#    t2 = maximT2.getTemp()
#    t3 = maximT3.getTemp()
    t4,h4 = dhtData.getTempHum()
    r5 = hsrData.getRange()
    t6 = maximT4SPI.getTemp()
    oldfl = fl
    fl = getFlow() / FLOWAJUST 
    scl,isScaleHere = scaleData.getTempHum()

    mygauge.drawGauge("Groupe E61",chr(176), 100,400, t1,-10,100,False,False,PLOT1) 
#    mygauge.drawGauge("TuyauHx", chr(176),250,400, (t2+t3)/2,-10,100,False,False,PLOT2)  
    if(isScaleHere == 1):
	    mygauge.drawGauge("Poids", "g.",250,400, scl-scloffset ,0,60,False,False,PLOT2)  
    else:
	    mygauge.drawGauge("Poids (offline)", "g.",250,400, 99 ,0,60,False,False,PLOT2)  
    mygauge.drawGauge("Chaudiere",chr(176),400,400, t6,-10,100,False,False,PLOT3) 
    buf = "Humidite (Temp=%d" % t4 
    buf = buf +chr(176)+")"
    mygauge.drawGauge(buf,"%", 550,400, h4,20,150,False,False,WHITE) 
#    mygauge.drawGauge("Flow"," ml",  700,400, fl ,0,60,False,False,WHITE) 

    #affiche la jauge niveau d'eau
    mywatergauge.drawRGauge(500+10,85,240,24,r5,224.0,50.0)

    #gestion du chrono
コード例 #2
0
ファイル: main.py プロジェクト: r0bin-fr/pirok
    buf2 = "  %d" % cPIDload
    buf2 = buf2 + "%"
    stext = fontSmall.render(buf2,False,GREY)
    screen.blit(stext,(650,285))

    #affiche les jauges
    t1 = maximT1.getTemp()
    t2 = maximT2.getTemp()
    t3 = maximT3.getTemp()
    t4,h4 = dhtData.getTempHum()
    r5 = hsrData.getRange()
    t6 = maximT4SPI.getTemp()
    oldfl = fl
    fl = getFlow() / FLOWAJUST 

    mygauge.drawGauge("Groupe E61",chr(176), 100,400, t1,-10,100,False,False,PLOT1) 
    mygauge.drawGauge("TuyauHx", chr(176),250,400, (t2+t3)/2,-10,100,False,False,PLOT2)  
    mygauge.drawGauge("Chaudiere",chr(176),400,400, t6,-10,100,False,False,PLOT3) 
    buf = "Humidite (Temp=%d" % t4 
    buf = buf + chr(176) +")"
    mygauge.drawGauge(buf,chr(176), 550,400, h4,20,150,False,False,WHITE) 
#    mygauge.drawGauge("Flow"," ml",  700,400, fl ,0,60,False,False,WHITE) 

    #affiche la jauge niveau d'eau
    mywatergauge.drawRGauge(500+10,85,240,24,r5,224.0,50.0)

    #gestion du chrono
    if(fl > oldfl):
	startChrono(oldfl)
	flLastTs = timestamp
    #on attend au moins 2 secondes avant d'arreter le chrono (on a des valeurs nulles parfois en pleine extraction)