Getting ready for the final test

This commit is contained in:
Valère Plantevin
2026-05-12 13:24:03 -04:00
parent 5d2552efb5
commit 20d59ed0ba
6 changed files with 198 additions and 12 deletions

View File

@@ -4,7 +4,7 @@
//! ```text
//! components.rs ── per-sensor components + per-type threshold table
//! resources.rs ── SensorRegistry, DiagnosticsState, ExportSampleState
//! systems.rs ── ingest / fault_injection / simulation / export / diagnostics
//! systems.rs ── ingest / simulation / export / diagnostics
//! tests.rs ── unit tests (#[cfg(test)] only)
//! ```
//!
@@ -39,9 +39,7 @@ impl Plugin for WorldPlugin {
.init_resource::<resources::ExportSampleState>()
.add_systems(
PreUpdate,
(systems::fault_injection_system, systems::ingest_system)
.chain()
.run_if(in_state(ServerState::Started)),
systems::ingest_system.run_if(in_state(ServerState::Started)),
)
.add_systems(Update, systems::simulation_system)
.add_systems(

View File

@@ -4,7 +4,7 @@
//!
//! | Schedule | Systems |
//! |-----------|--------------------------------------|
//! | PreUpdate | fault_injection → ingest |
//! | PreUpdate | ingest |
//! | Update | simulation |
//! | PostUpdate| export → diagnostics |
@@ -144,8 +144,6 @@ fn upsert_reading(
registry.map.insert(key, entity);
}
/// Stub — M6 inserts loss/delay here for benchmark scenarios.
pub(super) fn fault_injection_system() {}
/// Per-sensor digital-twin transform. Pulls each entity's latest
/// `RawSensorData` into a sliding-window mean (`SmoothedValue`), and emits