2571030793b0686f22e333bb4375dcd04651066e,Software/Python/easygopigo3.py,DHTSensor,read_temperature,#DHTSensor#,2556

Before Change



        from di_sensors import DHT

        self.acquire()
        temp = DHT.dht(self.sensor_type)[0]
        self.release()

        if temp == -2:

After Change



        from di_sensors import DHT

        if self.use_mutex is True:
            self.acquire()
        temp = DHT.dht(self.sensor_type)[0]
        if self.use_mutex is True:
            self.release()

        if temp == -2:
            return "Bad reading, trying again"
        elif temp == -3:
            return "Run the program as sudo"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

Instances


Project Name: DexterInd/GoPiGo3
Commit Name: 2571030793b0686f22e333bb4375dcd04651066e
Time: 2017-08-09
Author: robert.lucian.chiriac@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DHTSensor
Method Name: read_temperature


Project Name: DexterInd/GoPiGo3
Commit Name: 2571030793b0686f22e333bb4375dcd04651066e
Time: 2017-08-09
Author: robert.lucian.chiriac@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DHTSensor
Method Name: _readingValues


Project Name: DexterInd/GoPiGo3
Commit Name: 2571030793b0686f22e333bb4375dcd04651066e
Time: 2017-08-09
Author: robert.lucian.chiriac@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DHTSensor
Method Name: read_humidity


Project Name: DexterInd/GoPiGo3
Commit Name: 2571030793b0686f22e333bb4375dcd04651066e
Time: 2017-08-09
Author: robert.lucian.chiriac@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DHTSensor
Method Name: read_dht


Project Name: DexterInd/GoPiGo3
Commit Name: 2571030793b0686f22e333bb4375dcd04651066e
Time: 2017-08-09
Author: robert.lucian.chiriac@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DistanceSensor
Method Name: read_mm