Index: firmware/App/Modes/ModePrescription.c =================================================================== diff -u -reb877ae36c28eb83553ee11ccccf42e2c4a5b4d2 -r3c45b8930e1bbd1ff5757ec6d9e37e3d7a464fc3 --- firmware/App/Modes/ModePrescription.c (.../ModePrescription.c) (revision eb877ae36c28eb83553ee11ccccf42e2c4a5b4d2) +++ firmware/App/Modes/ModePrescription.c (.../ModePrescription.c) (revision 3c45b8930e1bbd1ff5757ec6d9e37e3d7a464fc3) @@ -1,6 +1,6 @@ /************************************************************************** * - * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. @@ -14,11 +14,17 @@ * **************************************************************************/ -#include -#include -#include "Common.h" +#include "AlarmLamp.h" +#include "BloodFlow.h" +#include "DialInFlow.h" +#include "DialOutFlow.h" +#include "Buttons.h" #include "OperationModes.h" #include "ModePrescription.h" +#ifdef RM46_EVAL_BOARD_TARGET + #include "Timers.h" + static U32 start; +#endif // ********** private data ********** @@ -49,8 +55,17 @@ *************************************************************************/ void transitionToPrescriptionMode( void ) { - // temporary test code - alarm lamp Off - requestAlarmLampPattern( LAMP_PATTERN_OFF ); + // temporary test code. TODO - remove later +#ifndef UF_TEST_ENABLED + setBloodPumpTargetFlowRate( 300, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + setDialInPumpTargetFlowRate( 400, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); + setDialOutPumpTargetRate( 425, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); +#else +#endif +#ifdef RM46_EVAL_BOARD_TARGET + // TODO - temporary test code for eval board + start = getMSTimerCount(); +#endif } /************************************************************************* @@ -66,9 +81,18 @@ { BOOL stop = isStopButtonPressed(); +#ifndef UF_TEST_ENABLED if ( TRUE == stop ) +#endif { requestNewOperationMode( MODE_OPAR ); } +#ifdef RM46_EVAL_BOARD_TARGET + // TODO - temporary test code for eval board - move to next mode after 5 sec + if ( TRUE == didTimeout( start, 5000U ) ) + { + requestNewOperationMode( MODE_OPAR ); + } +#endif }