When we choose something from the 3 dot prescription menu we first check if parameters are validated. If so then we do the doCancel to notify FW and then go back to the re-validate state which sets everything to be editable for any option chosen.
For the actualIndex i see the confusion but that was to offset teh index when the 'Edit Rx' is removed from the model. I updated to compare the text of the model activated so we no longer have to monitor the index. This works regardless of what model is present
Do we need to code this controller for multiple rinse pumps? I guess we've done it in some of the others, so I'm not against doing it this way. But if we do, we need to validate pumpID in a bunch of functions and trigger a s/w fault if it's invalid.
Similar code is in other monitoring functions. monitorTemperatureSensors, monitorPressureSensors iterate over their list of sensors using U08. monitorThermistors iterates over thermistors using typedef THERMISTORS_TEMP_SENSORS_T. Changed load cells to use U08 to be consistent with temperature and pressure monitoring.
Should probably change temperature, pressure and load cells to use correct typedef.
Also, it looks like why the typedefs weren't used was in order to set the initial value of the iterator to 0 (i.e, the first sensor in the list). Seems like there should be a value that is the first item in the list, i.e. TEMPSENSORS_FIRST_SENSOR.
Setting first iterator to 0 seems safer (in case somebody adds a new enum before what used to be the first enum). Could also create a redundant 0 enum like below and use the "first" enum to initialize a loop iterator safely: enum list { FIRST_TEMP_SENSOR = 0, TPI_SENSOR = FIRST_TEMP_SENSOR, TPO_SENSOR, TD1_SENSOR, .... } RESOLVED in CODE WALKTHROUGH.