v0.6.1 — Alarm-only monitor touch menus

The ECG, SpO₂, ART, CO₂ and NIBP touch menus now edit only lower/upper
alarm limits. Removed ECG lead, signal/sensor, waveform and all NIBP
measurement controls from monitor-side menus. These remain available in
Admin, including manual NIBP measurement and Auto ON/OFF. No physiological
model, alarm evaluation or NIBP startup behavior was changed.
This commit is contained in:
GABRIEL Sebastian 2026-11-12 19:08:11 +01:00
commit 89c1c8f396
9 changed files with 878 additions and 368 deletions

View file

@ -0,0 +1,31 @@
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -136,6 +136,13 @@
window
}
+/// Map an Admin NIBP measurement interval to its dropdown selection.
+/// The touchscreen alarm menus do not expose scheduling controls.
+fn nibp_interval_index(minutes: i32) -> u32 {
+ const INTERVALS: [i32; 7] = [1, 3, 5, 10, 20, 30, 60];
+ INTERVALS.iter().position(|&value| value == minutes).unwrap_or(2) as u32
+}
+
fn create_admin(app: &Application, params: SharedParams,
simulator: Rc<RefCell<Simulator>>,
monitor: &ApplicationWindow,
@@ -837,6 +844,14 @@
assert_eq!(stepped_hr_limit(None, 60, 1), 60);
assert_eq!(stepped_hr_limit(None, 100, -1), 100);
}
+
+ #[test]
+ fn nibp_interval_dropdown_supports_every_admin_interval() {
+ for (index, minutes) in [1, 3, 5, 10, 20, 30, 60].into_iter().enumerate() {
+ assert_eq!(nibp_interval_index(minutes), index as u32);
+ }
+ assert_eq!(nibp_interval_index(999), 2); // 5-minute fallback
+ }
}
/// Touchscreen alarm controls for a numerical value. The two bounds are