Skip to content
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

Don't multiply the measurement interval by 2 for SCD30 #110

Merged
merged 1 commit into from
Dec 13, 2021
Merged

Don't multiply the measurement interval by 2 for SCD30 #110

merged 1 commit into from
Dec 13, 2021

Conversation

melkati
Copy link
Contributor

@melkati melkati commented Dec 13, 2021

Description

Note: This modification only affects Sensirion's SCD30 sensor.

When modifying measurement interval (by calling method void Sensors::setSampleTime(int seconds)), library multiplied time by 2 in an intent to reduce power consumption.
Now it 's modified so what is does coincide with function name.
This optimization to reduce power consumption., if needed , should be done by function caller as, for example:

Change:

sensors.setSampleTime(seconds)

To:

if(getMainDeviceSelected().equals("SCD30")){
        sensorssensors.setSampleTime(seconds * 2);
    }

Related Issues

Warning: SCD30 sensors should be calibrated again after modifying measurement interval, so you should do it or modify the function caller at the same time you upgrade the library.

Tests

  • Tested OK in CO2 Gadget

@hpsaturn hpsaturn changed the base branch from master to devel December 13, 2021 19:43
@hpsaturn hpsaturn merged commit c7e78fb into kike-canaries:devel Dec 13, 2021
@hpsaturn hpsaturn mentioned this pull request Dec 13, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants