Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -r8b73263b38f449dacc0795c67a7cf6240cb79026 -rd54d1067f72e2724f2392f79a5f7ed3f9c604823 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 8b73263b38f449dacc0795c67a7cf6240cb79026) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision d54d1067f72e2724f2392f79a5f7ed3f9c604823) @@ -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