13 Commits
Author SHA1 Message Date
Robin Mueller db906565c8 MGT handler 2026-09-24 16:23:31 +02:00
Robin Mueller 782f6c3936 periodic HK support for MGMs 2026-09-24 15:41:48 +02:00
Robin Mueller 1aee1b8513 simplify minisim 2026-09-24 15:26:48 +02:00
Robin Mueller 7a2a317d58 Add MGM1 to simulator 2026-09-24 11:44:52 +02:00
Robin Mueller 7b74bee581 FDIR extensions and improvements for MGM device handler
- try power cycling now instead of going to faulty immediately
- after too many power cycles in a short time frame, go to faulty
- new FDIR/recovery helper which is generic
- new failure variants for fault injection: transient failures to test
  that a power cycles could fix the issue
2026-09-23 18:55:52 +02:00
Robin Mueller 919f1aa65d add granular event management control 2026-09-23 15:31:35 +02:00
Robin Mueller 86d8528d21 feat: add FDIR fault counter and wire it into the MGM device handler
Add satrs::fdir::FaultCounter, an FSFW-style error threshold counter:
counts faults, decrements over time when faults stop, and reports
when a threshold is exceeded. Two variants for now, mirroring the
hk.rs helper pattern:
- FaultCounterStd, backed by std::time::Instant
- FaultCounterEmbassy, backed by embassy_time::Instant (embassy-time
  feature), with an optional defmt::Format impl gated on the defmt
  feature

Add satrs::health::HealthTableMapSync::default() for easy construction
of a shared, global health table.

Wire both into the example app's MGM device handler as the first real
FDIR use case:
- the minisim MGM model gains SpiFaultMode (None/AllZeros/AllOnes) and
  a SetSpiFault request, so a stuck SPI bus can be injected for testing,
  independent of switch state
- MgmHandlerLis3Mdl::poll_sensor checks the SPI transfer result: a
  comm timeout or an all-1s stuck-bus reply (the same pattern the sim
  already uses for "device off") counts as a fault. Above threshold,
  the component is marked Faulty in a HealthTableMapSync shared from
  main.rs. This logic lives in the device handler, not the SPI comm
  layer, since deciding what a failed transfer means for FDIR is a
  handler concern.
- an all-0s reply is deliberately not treated as a fault, since it
  collides with a legitimate zero-field reading
2026-09-16 13:56:47 +02:00
Robin Mueller f6a87cff28 continue subsystem integration 2026-08-25 16:57:34 +02:00
Robin MuellerandClaude Sonnet 5 5fffcc011f Rename example models crates to types
- satrs-example/models (package "models") -> satrs-example/types ("types")
- embedded-examples/models (package "embedded-models") -> embedded-examples/types ("embedded-types")

Updates all path dependencies and use/models:: references accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 14:13:02 +02:00
Robin Mueller 3f0937de83 start adding ACS subsystem 2026-07-28 17:00:26 +02:00
Robin Mueller ae4d26b8bd re-work ACS 2026-03-17 15:56:25 +01:00
Robin Mueller df517af85b probably need to re-work the mode model.. 2026-03-12 12:00:24 +01:00
muellerr 1e15e3d501 move to CCSDS + serde for sat-rs example 2026-03-10 11:45:11 +01:00