|
HF-FDO2 Driver 0.1.0-dev
UART driver for PyroScience FDO2-G2 (data sheet v5 §4: #MOXY, #MRAW, #VERS)
|
FDO2-G2 UART types, scaling, and status decoding (PyroScience data sheet v5). More...
#include <cmath>#include <cstdint>#include <string_view>Go to the source code of this file.
Classes | |
| struct | fdo2::DriverResult< T > |
| struct | fdo2::DriverResult< void > |
| struct | fdo2::VersionInfo |
#VERS D N R S fields (FDO2-G2 data sheet §4.3). More... | |
| struct | fdo2::MoxyReading |
Decoded #MOXY O T S sample (data sheet §4.3). More... | |
| struct | fdo2::MrawReading |
Decoded #MRAW O T S D I A P H (data sheet §4.3). More... | |
Namespaces | |
| namespace | fdo2 |
| namespace | fdo2::moxy_status |
Enumerations | |
| enum class | fdo2::DriverError : uint8_t { fdo2::None = 0 , fdo2::InvalidParameter , fdo2::Timeout , fdo2::BufferOverflow , fdo2::ProtocolError , fdo2::DeviceError } |
| Driver-level error codes (stable for logging / telemetry). More... | |
Functions | |
| constexpr std::string_view | fdo2::ToString (DriverError e) noexcept |
| constexpr double | fdo2::FirmwareRevisionToDouble (int32_t r) noexcept |
| constexpr bool | fdo2::MoxyStatusOkForOxygen (uint32_t s) noexcept |
| Data sheet: normal operation implies S is 0 or 1 only. | |
| MoxyReading | fdo2::DecodeMoxy (int32_t o_raw, int32_t t_raw, uint32_t s) noexcept |
| MrawReading | fdo2::DecodeMraw (int32_t o_raw, int32_t t_raw, uint32_t s, int32_t d_raw, int32_t i_raw, int32_t a_raw, int32_t p_raw, int32_t h_raw) noexcept |
| double | fdo2::VolumePercentO2 (double p_o2_hpa, double p_air_mbar) noexcept |
| Volume % O₂ when p_air at the sensing membrane equals back-side pressure P. | |
Variables | |
| constexpr uint32_t | fdo2::kFdo2G2DefaultBaud = 19200U |
| Default UART speed after power-up per FDO2-G2 data sheet §4. | |
| constexpr uint32_t | fdo2::kFdo2G2PowerUpSettleMs = 1100U |
| Typical boot delay before the module accepts commands (data sheet: ~1 s). | |
| constexpr uint32_t | fdo2::moxy_status::kWarnAutoAmpReduced = 1U << 0 |
| constexpr uint32_t | fdo2::moxy_status::kFatalSignalTooLow = 1U << 1 |
| constexpr uint32_t | fdo2::moxy_status::kFatalSignalTooHigh = 1U << 2 |
| constexpr uint32_t | fdo2::moxy_status::kFatalRefTooLow = 1U << 3 |
| constexpr uint32_t | fdo2::moxy_status::kFatalRefTooHigh = 1U << 4 |
| constexpr uint32_t | fdo2::moxy_status::kFatalTempSensor = 1U << 5 |
| constexpr uint32_t | fdo2::moxy_status::kWarnHumidityHigh = 1U << 7 |
| constexpr uint32_t | fdo2::moxy_status::kErrPressureSensor = 1U << 9 |
| constexpr uint32_t | fdo2::moxy_status::kErrHumiditySensor = 1U << 10 |
FDO2-G2 UART types, scaling, and status decoding (PyroScience data sheet v5).
Numeric scaling and command names follow the FDO2-G2 data sheet (document version v5, 03/2026), §4 Communication Interface. This is distinct from the broader “PyroScience Unified Protocol” used on laboratory / multi-channel instruments (MEA, eighteen-word results, etc.).