Ejemplo n.º 1
0
    def updateLabelsAndValues(self):
        while (True):
            self.labelTankHotMass.setText(str(P.fluidLevelHot))
            self.labelTankMassCold.setText(str(P.fluidLevelCold))
            self.labelTime.setText(AO.getTime())
            self.labelSolarIrradiance.setText(AO.getSolarIrradianceString())
            self.labelTempTankHot.setText(str(round(P.hotTankTemp, 4)))
            self.labelTempTankCold.setText(str(round(P.coldTankTemp, 4)))
            self.labelTempCollector.setText(str(round(P.collectorTemp, 4)))
            self.dial.setMaximum(P.hotTankTemp)
            self.dial.setMinimum(P.coldTankTemp)
            if (P.collectorIsOn):
                BO.startTimeCalculator()
                self.labelInformation.setText(
                    "Collector is running.\nCalculated Time ~" +
                    str(round(P.calcTimeForHeatUp)) + "sec")

            if (P.collectorIsOn and P.hotTankTemp >= 340):
                self.startCollectorButton.setText("Start Collector")
                self.labelInformation.setText(
                    "Collector stoped.\nHot Tank Temp = " +
                    str(round(P.hotTankTemp, 2)) + "K")
                self.freeButtons()
                P.collectorIsOn = False
            AO.setSolarIrradiance()
            AO.getTemperature()
            self.graphicUI.updateGraphics()
            self.emptyTanks()
            self.xmlControll.save()
            time.sleep(5)