set-forced-recalibration-factor

wayland/scd30-co2-rh-temp/set-forced-recalibration-factor

Forced recalibration (FRC) is used to compensate for sensor drifts when a reference value of the CO2 concentration of the air surrounding the SCD30 is available. For best results, the sensor has to be run in a stable environment in continuous mode at a measurement rateof 2s for at least two minutes before triggering this node. Setting a reference CO2 concentration using this node will always supersede corrections from set-auto-self-calibration and vice-versa. The reference CO2 concentration has to be within the range 400 to 2000 ppm.
set-forced-recalibration-factor
@/set-forced-recalibration-factor
Forced recalibration (FRC) is used to compensate for sensor drifts when a reference value of the CO2 concentration of the air surrounding the SCD30 is available. For best results, the sensor has to be run in a stable environment in continuous mode at a measurement rateof 2s for at least two minutes before triggering this node. Setting a reference CO2 concentration using this node will always supersede corrections from set-auto-self-calibration and vice-versa. The reference CO2 concentration has to be within the range 400 to 2000 ppm.
DEV@/scd30-device
An SCD30 device.
CONCnumber
Reference carbon dioxide concentration (ppm). Should be in the range 400 to 2000 ppm.
UPDpulse
Update. Triggers set forced recalibration.
set-forced-recalibration-factor
DEV
CONC
UPD
DONE
DONEpulse
Pulses on completion.
To use the node in your project you should have the wayland/scd30-co2-rh-temp library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
        // The node responds only if there is an input pulse
    if (!isInputDirty<input_UPD>(ctx))
        return;

    // Get a pointer to the `SCD30` class instance
    auto airSensor = getValue<input_DEV>(ctx);

    airSensor->setForcedRecalibrationFactor(getValue<input_CONC>(ctx));
    emitValue<output_DONE>(ctx,1);

}