DFRobot / DFRobot_MultiGasSensor

MIT License
3 stars 4 forks source link

When temperature correction is not possible, do not return zero concentration. Throw an error. #10

Closed theGOTOguy closed 10 months ago

theGOTOguy commented 10 months ago

For instance: https://github.com/DFRobot/DFRobot_MultiGasSensor/blob/606e703f298a7ddd351014bda569ac8d2fec90e1/python/raspberrypi/DFRobot_MultiGasSensor.py#L151

As written, there is no way to tell the difference between "zero concentration" and "it is not possible to determine the concentration because the temperature is out of range." The latter being a potentially dangerous situation, it would be better to throw an error alerting the user to the out-of-normal-operating-range situation than to give a result that we do not know to be correct.

96liuzhixin commented 10 months ago

If you want to implement this function, please contact PM