Exemple #1
0
 def __init__(self, taskid=0, mData=readHSR.HSRData()):
     threading.Thread.__init__(self)
     self.taskid = taskid
     self._stopevent = threading.Event()
     self.mData = mData
     self.buffer = 0.0
     self.tempo = 1
Exemple #2
0
    def __init__(self, taskid = 0, mData = readHSR.HSRData()): 
        threading.Thread.__init__(self) 
        self.taskid = taskid
        self._stopevent = threading.Event( ) 
	self.mData = mData
	self.tempo = 0.5
	#mutex to protect concurrent access to chipset 
	self.lok = threading.Lock()
	self.pbassinelle = 0.0
	self.ratio = PIROK_RATIO
 def __init__(self, taskid=0, mData=readHSR.HSRData()):
     threading.Thread.__init__(self)
     self.taskid = taskid
     self._stopevent = threading.Event()
     self.mData = mData
     self.p = 0
     self.cht = 0
     self.previousT = time.time()
     self.interval = 0.5
     self.Tlast = self.Tnow = self.Tmax = self.Tmin = 0
     self.T_dif_now = self.T_dif_last = 0
     self.TminLoopCount = 0
     self.TmaxLoopCount = 0
     self.isBTNOK = 1
     self.tempo = 1
Exemple #4
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)
task3 = multithreadHX711.TaskPrintWeight(2, poidsData)
task4 = multithreadHum.TaskPrintHum(3, dhtData)
task5 = multithreadRange.TaskPrintRange(4, hsrData)
Exemple #5
0
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)
#**** PID setup: *****
#maximT1 is the group temperature (for boost algorithm), maximT4SPI is the boiler temp sensor, default target value = 115C
temptarget=115
task6PID = multithreadPID.TaskControlPID(6,maximT1,maximT4SPI,temptarget)
consigneSpecialePID = 0