Changelog¶
What changed in each release of the driver.
[Unreleased]¶
Breaking¶
ReadProductIdentifier()andReadScaleOffsetUnit()(and soStartContinuous()) returnDriverError::BusReadinstead ofNoDatawhen the command reply is NACKed (SFM4300 datasheet sections 4.3.6 and 4.3.9). Result-buffer reads still returnNoData.StartContinuous()returnsDriverError::UnexpectedUnitand does not start when the scaling reply has scale factor 0, or a unit other than0x0148on a known SF06 part (section 4.3.6). It used to start and convert every reading to 0 or to the wrong unit.GasFromStatusNibble(Family::Sf06, n)maps 6, 7, 8 to the air/O2, N2O/O2, CO2/O2 mixtures (section 4.3.2 Table 5). It mapped 4, 5, 6; 4 and 5 are reserved and now decode asGas::Air.GasandVarianthave new enumerators (appended, values unchanged): aswitchwithoutdefaultover them now warns with-Wswitch.Stop()waits 1 ms after the stop command (section 4.3.4: idle after up to 0.5 ms).
Added¶
- CI workflow that builds and runs the host unit tests with GCC and Clang.
Variantvalues for the SFM3003-300-CL / -CE, SFM3013-300-CL / -CLM, SFM3019 and SFM3119-240-CL, decoded from their product numbers; their gas tables inSupportsGas()andFullScaleSlm().addr::kSfm3003Ce(0x2D).Gas::HeOxandGas::HeOxO2Mixfor the SFM3013-300-CLM, and aGasFromStatusNibble(Variant, nibble)overload that decodes them.StatusNibbleIsKnown(family, nibble)andtiming::kStopToIdleMs.- CMake install rules: headers under
include/hf_sfm, exportedhf::sfm,find_package(hf_sfm); a CTest test that installs and builds a consumer.
Fixed¶
StartContinuous()while this driver's measurement is running sendsStop()first; the sensor accepts no other command while measuring (section 4.3.4), so switching gas used to fail.- The
sfm_flow_demoexample configured averaging after the start, which the sensor refuses (averaging is idle-only, section 4.3.5); it now configures it first. Same order fix in thesfm_driver.hppexample.
Changed¶
- Documentation moved to the HardFOC MkDocs platform: new page set (quickstart, hardware, architecture, I2C
protocol, measurement and averaging, gases and part families, API guide, configuration, porting, testing), code
snippets compiled by the host build from
tests/docs/, Doxygen under/api/, versioned with mike. The Jekyll site files and the vendored doxygen-awesome stylesheet are gone. - The host tests are built from
tests/CMakeLists.txt(still-DHF_SFM_BUILD_TESTS=ON), which also compiles the documentation snippets.
1.0.0 (version in the build settings; not tagged)¶
- SF06 command set (SFM4300 datasheet section 4): continuous measurement per gas and O2 mixture, measurement and flow-only reads, averaging, concentration update, scale / offset / unit, sleep, product identifier, general-call reset, CRC-8 on every word.
- SFx6000 family (SFM6000D) beside SF06, with family-safe gas start codes.
- Host unit tests and ESP32-S3 examples.