1. How are we syncing times between UI RTC and HD RTC? 2. Does not the UI APP know some of these times (like start time) to compute the other times by itself instead of HD FW passing them to the UI APP?
Consider moving this assignment to declaration above. Also, readings in comment above should be singular. Also, consider renaming "state" to something like noFluidLeakDetected.
since you are setting the bottom margin we need to think about the object that are showing up on the bottom of the screen and since the mainMenu comes on top then it's height may not be relevant to the bottom of the screen area. Could be better to use notificationHeight which is used for the notifications that are showing up at the bottom.
Add more constraints. Should not accept start treatment request if we haven't completed all pre-treatment steps through to patient connection at the end.
Not fully clear what the sub-modes of service mode will be. At this time, I don't know what, if anything, should happen if the user presses the stop/pause button while in service mode. For now, there is nothing to stop so we are ignoring.