Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc75eec67d9af099ca27555bb9dd8d7187d9a0169 -rbf484bf7b9c8a964582061328d8cbfb773927c38 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c75eec67d9af099ca27555bb9dd8d7187d9a0169) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision bf484bf7b9c8a964582061328d8cbfb773927c38) @@ -8,7 +8,7 @@ * @file SystemCommMessages.c * * @author (last) Dara Navaei -* @date (last) 10-May-2024 +* @date (last) 27-Aug-2024 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -1829,6 +1829,7 @@ MESSAGE_T msg; DG_HEAT_DISINFECTION_MODE_CMD_T cmd; + // Start command cmd.start = start; // Create a message record @@ -3439,16 +3440,26 @@ void handleHDUsageInfoRequest( MESSAGE_T *message ) { MESSAGE_T msg; - U32 payload = 0; // TODO update this one implemented + HD_USAGE_INFO_RECORD_T usageRecord; U08 *payloadPtr = msg.payload; + getNVRecord2Driver( GET_USAGE_RECORD, (U08*)&usageRecord, sizeof( HD_USAGE_INFO_RECORD_T ), 0, ALARM_ID_NO_ALARM ); + // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_USAGE_DATA; - msg.hdr.payloadLen = sizeof( U32 ); + msg.hdr.msgID = MSG_ID_HD_USAGE_DATA; + msg.hdr.payloadLen = sizeof( HD_USAGE_INFO_RECORD_T ); // Fill message payload - memcpy( payloadPtr, &payload, sizeof( U32 ) ); + memcpy( payloadPtr, &usageRecord.txTimeTotalHrs, sizeof( F32 ) ); + payloadPtr += sizeof( F32 ); + memcpy( payloadPtr, &usageRecord.txTimeSinceLastSrvcHrs, sizeof( F32 ) ); + payloadPtr += sizeof( F32 ); + memcpy( payloadPtr, &usageRecord.txLastStartTimeEpoch, sizeof( U32 ) ); + payloadPtr += sizeof( U32 ); + memcpy( payloadPtr, &usageRecord.lastResetTimeEpoch, sizeof( U32 ) ); + payloadPtr += sizeof( U32 ); + memcpy( payloadPtr, 0, sizeof( U16 ) ); // The UI has exceptionally been set to get the CRC as well. A 0 is sent to satisfy the CRC length. // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED ); @@ -3729,7 +3740,7 @@ * request to start or stop nocturnal heat disinfect. * @details Inputs: none * @details Outputs: none - * @param message a pointer to the message to handle + * @param start TRUE indicates start heat disinfect mode * @return none *************************************************************************/ BOOL sendDGStartHeatDisinfectPassiveCoolModeCommand( BOOL start ) @@ -3738,6 +3749,7 @@ MESSAGE_T msg; DG_HEAT_DISINFECTION_MODE_CMD_T cmd; + // Start command cmd.start = start; // Create a message record