Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -ra6f54c63d4484f0e71bd27eca7e804f997ab5999 -r9a3cb86829b39a5c7ac4475b8601ebee2b622cd5 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision a6f54c63d4484f0e71bd27eca7e804f997ab5999) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 9a3cb86829b39a5c7ac4475b8601ebee2b622cd5) @@ -564,6 +564,8 @@ { MESSAGE_T msg; DG_SYSTEM_RECORD_T system; + U08 i; + U08 localTopLevelSN[ MAX_TOP_LEVEL_SN_CHARS ]; // Get the system's record. There are no arrays of system to check and also, raise no alarm since the system record // has been already checked in POST @@ -578,8 +580,15 @@ // Add 1 byte for null terminator msg.hdr.payloadLen = MAX_TOP_LEVEL_SN_CHARS + 1; + for ( i = 0; i < MAX_TOP_LEVEL_SN_CHARS; i++ ) + { + // NOTE: a local variable was created to avoid system.topLevelSN in the messages list + // NOTE: for loop was used instead of memcpy to ensure it is not parsed in the messages list script + localTopLevelSN[ i ] = system.topLevelSN[ i ]; + } + // Fill message payload - memcpy( payloadPtr, &system.topLevelSN, sizeof( U08 ) * MAX_TOP_LEVEL_SN_CHARS ); + memcpy( payloadPtr, &localTopLevelSN, sizeof( localTopLevelSN ) ); payloadPtr += MAX_TOP_LEVEL_SN_CHARS; *payloadPtr = 0; @@ -613,10 +622,12 @@ if ( 0 == message->hdr.payloadLen ) { - memcpy( payloadPtr, &service.lastServiceEpochDate, sizeof( U32 ) ); + U32 lastServiceEpochDate = service.lastServiceEpochDate; + U32 serviceIntervalSeconds = ( 0 == service.lastServiceEpochDate ? 0 : service.serviceIntervalSeconds ); + + memcpy( payloadPtr, &lastServiceEpochDate, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); - service.serviceIntervalSeconds = ( 0 == service.lastServiceEpochDate ? 0 : service.serviceIntervalSeconds ); - memcpy( payloadPtr, &service.serviceIntervalSeconds, sizeof( U32 ) ); + memcpy( payloadPtr, &serviceIntervalSeconds, sizeof( U32 ) ); } // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer