Add _MS to end to indicate units of time. Also, is this a self-test for blood pump occlusion sensor? If so, maybe replace "PRESSURE" with "OCCLUSION" to clarify.
Something to consider, but I think we are too far into development to make a change like that. We have a lot of unit test cases looking for variables as they are currently named. A large refactor would kill our dev testing.
This is the reason why at one of my previous companies we used to name variables with f_ or i_ as first characters to know at a glance the variable type definition. Now worth considering though.
Replace with function that sets these valves. Settings valves can be its own module for the various modes/sates and sub-modes/sub-states. This same concept can be applied to all actuators where in mode/sate or sub-mode/sub-state, the valves, the pumps, etc. are all set. I would like to avoid setting just the valves manually here and again manually set somewhere else. Let's keep all states centralized per mode/sub-mode or state/sub-state.
Delta is between prior reservoir weight (50 ms ago) and current reservoir weight. Both are filtered (moving avg over 800 ms). Looking for load cell interference (maybe somebody bumped the table that the system is sitting on). Want to pause treatment to allow interference to resolve and prevent bad load cell data from getting into ultrafiltration tracking logic (e.g. if load cell jumps up significantly, UF logic might wrongfully determine that we have reached our target UF volume way too early).
Those valve settings might not be of interest to the HD and should stay local to DG. For now, HD is interest in these two valve settings for wet self-tests.