-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible issue with temperature offset logic (and maybe with altitude) #203
Comments
I moved the sensor registration up in I don't see any side effects. Tested with both sensors in CO2 Gadget and looks like it's working fine. melkati@4232934 In Maybe we should do the same for @hpsaturn, I sent the PR #204 directed to master (as there isn't another branch to work on) but I think you can change the branch easily before merging. This way I can keep on working without having at the end only one PR with changes to different things. |
I just sent a PR to fix last commit and (5). #204 I didn't add sen5x to Sensors::getTempOffset() and I don't know how it works and don't have one to test. |
Maybe @roberbike knows about this sensor. |
Yes, I have one sen5x from an ikea device. I will test it in a few days. |
I'm centered today on SCD30 time to stabilize the temperature. For (1), no matter what I do, Sensors are still taking a while to stabilize the temperature. I reviewed the code and looks like the checks are already in place and are working fine (there was a bug comparing the offset saved at the SCD30 with the one in Sensorlib but I already fixed it in 6da7201). I would appreciate a second, or even third, pair of eyes reviewing it. I carefully removed all references to scd30.setTemperatureOffset() in CO2 Gadget, Sensorlib and even Adafruit_SCD30 (commented out code in all three) and sensor is still taking a while to stabilize the temperature. Maybe my SCD30 is malfunctioning? Maybe that is the way this sensor works? I would thank you if you could test it with your SCD30 sensor (if you have one) @hpsaturn @BRKMK @Coscolin... You can use my fork to test: https://github.com/melkati/canairio_sensorlib/tree/fixOffset |
Thanks @melkati |
I did the same tests with an SCD40 sensor and the same thing happened. One tip: the programmer using the library must set the float variable Maybe we should create a method to set this variable before calling I can't find any problem with manually setting the variable, before calling |
Yes, I agree. It is normal in some libraries. If we need that, please do it. |
Are initTOffset(float) and float = getTOffset() good names? It will not check if offset is positive or negative, as some other libraries may need a negative value, although I think we must keep to positives offset to standardize, following the Sensirion path. |
Yes, these names are good. I guess that we should admit the two possibilities, positives and negatives. |
Just sent PR with these two methods. I didn't make tOffset variable private to maintain backward compatibility. Maybe we should do it. |
Thanks @melkati for your contributions and time. Then I'm going to close this issue. Thanks! |
I am very confused with the temperature offsets. I think we have a problem with the logic, in some sensors...
I'm not sure what's going on yet, but something's not right... probably it's a mix of issues...
In my preliminary research I found (unconfirmed, more research is needed) some things to check or fix:
Finally, I would like to point out that I want to implement support for low power sensors, starting with SCD41 (which is already "half supported" and is getting a lot of traction) and will have to be taken into account to make it easier later on.
I would like to invite @hpsaturn, @roberbike and @Coscolin to the discussion.
The text was updated successfully, but these errors were encountered: