refactor: move firmware workspace under firmware
This commit is contained in:
1 parent
153b0bf262
commit
f03fc119a4
222 files changed
+56
-13
No files matched your search
@@ -0,0 +1,35 @@
|
||||
//! Persisted, restart-only runtime-observability policy.
|
||||
|
||||
use kaptan_config::ConfigValidate;
|
||||
|
||||
/// Candidate-only observability policy. It deliberately controls only optional
|
||||
/// detail; error-level records are never suppressible configuration fields.
|
||||
#[derive(Clone, Copy, ConfigValidate)]
|
||||
pub(super) struct ObservabilityCandidate {
|
||||
#[config(
|
||||
id = 24,
|
||||
key = "observability.maximum_log_level",
|
||||
unit = "mav_severity",
|
||||
default = 6,
|
||||
range(min = 3, max = 7)
|
||||
)]
|
||||
pub(super) maximum_log_level: u32,
|
||||
}
|
||||
|
||||
/// Immutable boot-active best-effort observability policy.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub struct ObservabilitySettings {
|
||||
maximum_log_level: u32,
|
||||
}
|
||||
|
||||
impl ObservabilitySettings {
|
||||
pub(crate) const fn new(maximum_log_level: u32) -> Self {
|
||||
Self { maximum_log_level }
|
||||
}
|
||||
|
||||
/// Maximum best-effort MAVLink severity: Error (3) through Debug (7).
|
||||
/// This never filters error-level records.
|
||||
pub const fn maximum_log_level(self) -> u32 {
|
||||
self.maximum_log_level
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user