Index: firmware/App/Controllers/DialOutFlow.h =================================================================== diff -u -r4fc093ea280a0bdb47c20d25efb7c840b9f9867a -r5c7b301b677c60519a9d89f4624c6020958de752 --- firmware/App/Controllers/DialOutFlow.h (.../DialOutFlow.h) (revision 4fc093ea280a0bdb47c20d25efb7c840b9f9867a) +++ firmware/App/Controllers/DialOutFlow.h (.../DialOutFlow.h) (revision 5c7b301b677c60519a9d89f4624c6020958de752) @@ -7,8 +7,8 @@ * * @file DialOutFlow.h * -* @author (last) Darren Cox -* @date (last) 10-Mar-2022 +* @author (last) Michael Garthwaite +* @date (last) 20-Sep-2022 * * @author (original) Sean * @date (original) 24-Jan-2020 @@ -90,6 +90,7 @@ BOOL testResetMeasuredDialOutPumpMCSpeedOverride( void ); BOOL testSetMeasuredDialOutPumpMCCurrentOverride( F32 value ); BOOL testResetMeasuredDialOutPumpMCCurrentOverride( void ); +BOOL testSetDialOutPumpTargetDutyCycle( F32 value ); /**@}*/ Index: firmware/App/HDCommon.h =================================================================== diff -u -r8a44631f96048e201b1a9a7953530d8b60156e24 -r5c7b301b677c60519a9d89f4624c6020958de752 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 8a44631f96048e201b1a9a7953530d8b60156e24) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 5c7b301b677c60519a9d89f4624c6020958de752) @@ -42,12 +42,9 @@ // #define READ_FPGA_ASYNC_DATA 1 // Test build reads non-priority register page every other time // #define DISABLE_FPGA_COUNTER_CHECKS 1 // Disable alarms associated with FPGA read/error counters // #define EMC_TEST_BUILD 1 // EMC test build - HD/DG run separately but connected, HD pumps toggle on/off w/ stop button - #define DISABLE_WD_AND_SFTY_POST_TESTS 1 // Disable watchdog and safety shutdown POST tests -// #define DISABLE_UI_POST_TEST 1 // Disable the UI POST +// #define DISABLE_WD_AND_SFTY_POST_TESTS 1 // Disable watchdog and safety shutdown POST tests + #define DISABLE_UI_POST_TEST 1 // Disable the UI POST - // TODO stays as a build switch until the calibration structure is updated with the build - #define SKIP_CAL_CHECK 1 // Implement software configuration - #include #include #endif Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r402885eda2ed755a079c854d1228ac5f76cbec7c -r5c7b301b677c60519a9d89f4624c6020958de752 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 402885eda2ed755a079c854d1228ac5f76cbec7c) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 5c7b301b677c60519a9d89f4624c6020958de752) @@ -7,8 +7,8 @@ * * @file SystemComm.c * -* @author (last) Dong Nguyen -* @date (last) 27-Sep-2022 +* @author (last) Michael Garthwaite +* @date (last) 12-Oct-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -1668,6 +1668,18 @@ handleTestCurrentTreamtmentParametersRequest( message ); break; + case MSG_ID_HD_BLOOD_PUMP_SET_PWM: + handleTestBloodPumpSetPWM( message ); + break; + + case MSG_ID_HD_DIAL_IN_SET_PWM: + handleTestDialInSetPWM( message ); + break; + + case MSG_ID_HD_DIAL_OUT_SET_PWM: + handleTestDialOutSetPWM( message ); + break; + // The default cannot be reached in VectorCAST since the cases are run in a for loop default: // Unrecognized message ID received - ignore Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r402885eda2ed755a079c854d1228ac5f76cbec7c -r5c7b301b677c60519a9d89f4624c6020958de752 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 402885eda2ed755a079c854d1228ac5f76cbec7c) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 5c7b301b677c60519a9d89f4624c6020958de752) @@ -7,8 +7,8 @@ * * @file SystemCommMessages.c * -* @author (last) Dong Nguyen -* @date (last) 27-Sep-2022 +* @author (last) Michael Garthwaite +* @date (last) 12-Oct-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -7435,4 +7435,85 @@ return result; } +/*********************************************************************//** +* @brief +* The handleTestBloodPumpSetPWM function handles a request to override +* the Blood pumps duty cycle. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestBloodPumpSetPWM( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( sizeof( F32 ) == message->hdr.payloadLen ) + { + F32 payLoad; + + memcpy( &payLoad, message->payload, sizeof( F32 ) ); + + result = testSetBloodPumpTargetDutyCycle( payLoad ); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** +* @brief +* The handleTestDialInSetPWM function handles a request to override +* the Dialysate Inlet pumps duty cycle. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestDialInSetPWM( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( sizeof( F32 ) == message->hdr.payloadLen ) + { + F32 payLoad; + + memcpy( &payLoad, message->payload, sizeof( F32 ) ); + + result = testSetDialInPumpTargetDutyCycle( payLoad ); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** +* @brief +* The handleTestDialOutSetPWM function handles a request to override +* the Dialysate Outlet pumps duty cycle. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestDialOutSetPWM( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( sizeof( F32 ) == message->hdr.payloadLen ) + { + F32 payLoad; + + memcpy( &payLoad, message->payload, sizeof( F32 ) ); + + result = testSetDialOutPumpTargetDutyCycle( payLoad ); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/ Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r402885eda2ed755a079c854d1228ac5f76cbec7c -r5c7b301b677c60519a9d89f4624c6020958de752 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 402885eda2ed755a079c854d1228ac5f76cbec7c) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 5c7b301b677c60519a9d89f4624c6020958de752) @@ -7,8 +7,8 @@ * * @file SystemCommMessages.h * -* @author (last) Dara Navaei -* @date (last) 22-Sep-2022 +* @author (last) Michael Garthwaite +* @date (last) 28-Sep-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -828,6 +828,15 @@ // MSG_ID_HD_SEND_ALARMS_COMMAND void handleResendAllAlarmsCommand( MESSAGE_T* message ); +// MSG_ID_HD_BLOOD_PUMP_SET_PWM +void handleTestBloodPumpSetPWM( MESSAGE_T* message ); + +// MSG_ID_HD_DIAL_IN_SET_PWM +void handleTestDialInSetPWM( MESSAGE_T* message ); + +// MSG_ID_HD_DIAL_OUT_SET_PWM +void handleTestDialOutSetPWM( MESSAGE_T* message ); + /**@}*/ #endif