I'm looking at a bug reported by a user (https://github.com/melkati/CO2-Gadget/issues/155) and after a while of looking it seems that the error is in the way sensorlib handles the setTempOffset(tempOffset) function.
It seems that in the case of the SCD30 it passes tempOffset directly to the Adafruit library but the library expects the value of tempOffset in hundredths of a degree (1015 => 10.15 degrees C).
Sensorlib setTempOffset(tempOffset) seems to want to work in degrees and not in hundredths, because for example the SCD40 does get it correctly.
I think this is not the way sensorlib is expected to work, in order to abstract the sensors,
I recently switched from the old version of sensorlib to the new one and I don't remember this happening before (and I swear I used setTempOffset() often myself).
I'm looking at a bug reported by a user (https://github.com/melkati/CO2-Gadget/issues/155) and after a while of looking it seems that the error is in the way sensorlib handles the setTempOffset(tempOffset) function.
It seems that in the case of the SCD30 it passes tempOffset directly to the Adafruit library but the library expects the value of tempOffset in hundredths of a degree (1015 => 10.15 degrees C).
Sensorlib setTempOffset(tempOffset) seems to want to work in degrees and not in hundredths, because for example the SCD40 does get it correctly.
I think this is not the way sensorlib is expected to work, in order to abstract the sensors,
I recently switched from the old version of sensorlib to the new one and I don't remember this happening before (and I swear I used setTempOffset() often myself).
https://github.com/kike-canaries/canairio_sensorlib/blob/681d542d56c7eb15989e72c6eeafc8d4e9bd8fbe/src/Sensors.cpp#L386-L391