Exemple #1
0
#hide mouse cursor
#pygame.mouse.set_visible( False )

# Loop until the user clicks the close button.
done = False
 
# Used to manage how fast the screen updates
clock = pygame.time.Clock()
 
# value for test
rot = -10
lasttct = 0

# global values for data handling
maximT1 = readMaxim.MaximData(0)
maximT2 = readMaxim.MaximData(0)
maximT3 = readMaxim.MaximData(0)
maximT4SPI = readMaxim.MaximData(0)
dhtData = readMaxim.MaximData(0)
hsrData = readHSR.HSRData(0)
scaleData = readMaxim.MaximData(0)

#launch thread to update the temp values and other (hum, range etc)
task1 = multithreadTemp.TaskPrintTemp(0,maximT1)
#task2 = multithreadTemp.TaskPrintTemp(1,maximT2)
#task3 = multithreadTemp.TaskPrintTemp(2,maximT3)
task4 = multithreadHum.TaskPrintHum(3,dhtData)
task5 = multithreadRange.TaskPrintRange(4,hsrData)
task7 = multithreadTemp.TaskPrintTemp(5,maximT4SPI)
task8 = multithreadScale.TaskPrintScale(7,scaleData)
Exemple #2
0
WG_RANGE_MIN = 224.0
WG_RANGE_MAX = 50.0

#Parametres font / couleur
cNoir = 0  #4 #254
cBlanc = OLED_WHITE_STD  #254 #4
cB1 = cB2 = cB3 = 63
cBleu = 82  #70 #0x32 #2
cRouge = 0xC4  #224
cVert = 28
cGris = cBleu  #76
fBig = 200
fSmall = 201

#global values
maximT1 = readMaxim.MaximData(0)
maximT2 = readMaxim.MaximData(0)
dhtData = readMaxim.MaximData(0)
hsrData = readHSR.HSRData(0)
barData = readHSR.HSRData(0)
flowData = readFlow.FlowData()
pumpPTarget = DEFAULTPUMPVAL
poidsData = readHSR.HSRData(0)
poidsBTData = readHSR.HSRData(0)

#plotly data
myplot = myplotly.MyPlotly(0)

#tasks
task1 = multithreadTemp.TaskPrintTemp(0, maximT1)
task2 = multithreadTemp.TaskPrintTemp(1, maximT2)
Exemple #3
0
 def __init__(self, taskid=0, mData=readMaxim.MaximData()):
     threading.Thread.__init__(self)
     self.taskid = taskid
     self._stopevent = threading.Event()
     self.mData = mData
     self.lastTemp = 0.0