Add more types related to BME690
This commit is contained in:
1 parent
a5d1ed0560
commit
8ffb2384aa
2 files changed
+17
No files matched your search
@@ -67,6 +67,8 @@ class GasSweepPoint(BaseModel):
|
||||
resistance_norm: Optional[float] = None # baseline normalized, set by daemon
|
||||
adc_gas_res: Optional[int] = None # raw 10-bit gas ADC from BME690
|
||||
gas_range: Optional[int] = None # gas range 0-15 (affects resistance calc)
|
||||
res_heat: Optional[int] = None # heater resistance register (DAC target)
|
||||
idac: Optional[int] = None # initial heater DAC drive
|
||||
heater_stable: bool
|
||||
valid: bool
|
||||
|
||||
@@ -127,6 +129,11 @@ class SweepBaseline(BaseModel):
|
||||
humidity_ref: Optional[float] = None
|
||||
temp_ref: Optional[float] = None
|
||||
co2_ref: Optional[float] = None
|
||||
# Mean (BME.temp_c - SCD43.temp_c) across the baseline window.
|
||||
# BME runs hot from hotplate self-heating; this is a stable
|
||||
# per-enclosure offset, recomputed every baseline refresh. None when
|
||||
# SCD43 was unavailable during baseline establishment.
|
||||
bme_temp_offset: Optional[float] = None
|
||||
|
||||
|
||||
# ── Anomaly ───────────────────────────────────────────────────────────────
|
||||
@@ -166,6 +173,7 @@ class STM32Payload(BaseModel):
|
||||
co2: Optional[CO2Reading] = None
|
||||
health: SensorHealth
|
||||
baseline: SweepBaseline
|
||||
burn_in: bool = True # !baseline.established — skip fingerprinting
|
||||
sweep: list[GasSweepPoint]
|
||||
|
||||
@model_validator(mode='after')
|
||||
@@ -207,6 +215,7 @@ class EnvPayload(BaseModel):
|
||||
sweep: list[GasSweepPoint]
|
||||
zone_scores: ZoneScores = Field(default_factory=ZoneScores)
|
||||
baseline: SweepBaseline
|
||||
burn_in: bool = True # !baseline.established — skip fingerprinting
|
||||
health: SensorHealth
|
||||
anomalies: list[EnvAnomaly] = Field(default_factory=list)
|
||||
|
||||
|
||||
Reference in new issue
Block a user