Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r19a8bf98a7154e24c35da25225d4b55bf70ddd09 -r837ce5b9b64a6ccdb006af5fcc62a540fe14dfb7 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 19a8bf98a7154e24c35da25225d4b55bf70ddd09) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 837ce5b9b64a6ccdb006af5fcc62a540fe14dfb7) @@ -191,6 +191,7 @@ case POST_STATE_BLOOD_FLOW: testStatus = execBloodFlowTest(); postState = handlePOSTStatus( testStatus ); + sendUIRequestPOSTFinalResult(); // request UI POST final result here so we have it before UI test below break; case POST_STATE_DIALYSATE_INLET_FLOW: Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rb36fc8801adfc9d2f402450abffe721e71f9a5e5 -r837ce5b9b64a6ccdb006af5fcc62a540fe14dfb7 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision b36fc8801adfc9d2f402450abffe721e71f9a5e5) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 837ce5b9b64a6ccdb006af5fcc62a540fe14dfb7) @@ -2227,7 +2227,7 @@ memcpy( payloadPtr, &passed, sizeof( BOOL ) ); // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer - result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_BROADCAST, ACK_NOT_REQUIRED ); // TODO - make ack required when UI ready + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_BROADCAST, ACK_REQUIRED ); return result; } @@ -2258,6 +2258,33 @@ /*********************************************************************//** * @brief + * The sendUIRequestPOSTFinalResult function constructs a reqeust for UI POST + * final result message and queues the msg for transmit on the appropriate + * CAN channel. + * @details Inputs: none + * @details Outputs: request for UI POST final result msg constructed and queued. + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL sendUIRequestPOSTFinalResult( void ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_HD_REQUEST_UI_FINAL_POST_RESULT; + msg.hdr.payloadLen = 0; + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED ); + + return result; + +} + +/*********************************************************************//** + * @brief * The handleUIPOSTFinalResult function handles a UI POST final result message. * @details Inputs: none * @details Outputs: UI POST final result delivered to InitPOST mode. @@ -2272,8 +2299,7 @@ BOOL passed; memcpy( &passed, payloadPtr, sizeof( BOOL ) ); - - // TODO - handle UI POST final result + signalUIPOSTFinalResult( passed ); } else { Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -rbb5280946ac08388b456c7c1848d7797c4a28038 -r837ce5b9b64a6ccdb006af5fcc62a540fe14dfb7 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision bb5280946ac08388b456c7c1848d7797c4a28038) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 837ce5b9b64a6ccdb006af5fcc62a540fe14dfb7) @@ -135,6 +135,9 @@ // MSG_ID_DG_POST_FINAL_TEST_RESULT void handleDGPOSTFinalResult( MESSAGE_T *message ); +// MSG_ID_HD_REQUEST_UI_FINAL_POST_RESULT +BOOL sendUIRequestPOSTFinalResult( void ); + // MSG_ID_UI_POST_FINAL_TEST_RESULT void handleUIPOSTFinalResult( MESSAGE_T *message );