Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -rc20c77ef196a760a7642d2426e509995e4a98e01 -r3633c7c348e95b11175dfb4a4a183bdb6cd24478 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision c20c77ef196a760a7642d2426e509995e4a98e01) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 3633c7c348e95b11175dfb4a4a183bdb6cd24478) @@ -7,8 +7,8 @@ * * @file OperationModes.c * -* @author (last) Dara Navaei -* @date (last) 03-Aug-2022 +* @author (last) Darren Cox +* @date (last) 25-Aug-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -140,7 +140,7 @@ transitionToNewOperationMode( newMode ); currentMode = newMode; - if ( MODE_TREA == currentMode ) + if ( MODE_TREA == lastMode ) { // If the current mode is treatment but transitioning to another mode has been requested (including transitioning to fault mode) // it means the treatment is done. Get the elapsed time since the beginning of the treatment and convert it to hours to be written