Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r108abddcbf729f7435073116191cd3903261df8f -r04334ed8d1e927939718b1d62fb01afef0a2b9a9 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 108abddcbf729f7435073116191cd3903261df8f) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 04334ed8d1e927939718b1d62fb01afef0a2b9a9) @@ -126,18 +126,6 @@ static U32 badCRCListIdx = 0; // where next bad message CRC time stamp will go in list static U32 badCRCListCount = 0; // # of bad CRCs in the list -#ifdef CAN_TEST -U08 dbgRcvdCANFrames[2048][8]; -U32 dbgRcvdCANFrameTS[2048]; -U32 dbgRcvdCANFrameCh[2048]; -U32 dbgRcvdCANFrameIdx = 0; -U08 dbgXmitCANFrames[2048][8]; -U32 dbgXmitCANFrameTS[2048]; -U32 dbgXmitCANFrameCh[2048]; -U32 dbgXmitCANFrameIdx = 0; -U32 dbgCANOutIdx = 0; -#endif - // ********** private function prototypes ********** #ifdef DEBUG_ENABLED @@ -336,24 +324,7 @@ { transmitNextUARTPacket(); } -#ifdef CAN_TEST - if ( dbgRcvdCANFrameIdx >= 2000 ) - { -// U32 i = dbgCANOutIdx; -// char debugStr[ 150 ]; -// -// dbgCANOutIdx++; -// if ( dbgCANOutIdx < 2000 ) -// { -// sprintf( debugStr, "%8d %4d %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X %8d %4d %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", -// dbgRcvdCANFrameTS[i], dbgRcvdCANFrameCh[i], dbgRcvdCANFrames[i][0], dbgRcvdCANFrames[i][1], dbgRcvdCANFrames[i][2], dbgRcvdCANFrames[i][3], dbgRcvdCANFrames[i][4], dbgRcvdCANFrames[i][5], dbgRcvdCANFrames[i][6], dbgRcvdCANFrames[i][7], -// dbgXmitCANFrameTS[i], dbgXmitCANFrameCh[i], dbgXmitCANFrames[i][0], dbgXmitCANFrames[i][1], dbgXmitCANFrames[i][2], dbgXmitCANFrames[i][3], dbgXmitCANFrames[i][4], dbgXmitCANFrames[i][5], dbgXmitCANFrames[i][6], dbgXmitCANFrames[i][7]); -// sendDebugData( (U08*)debugStr, strlen(debugStr) ); -// printf(debugStr); -// } - } #endif -#endif } /************************************************************************* @@ -393,19 +364,6 @@ // if packet retrieved, add to buffer if ( result != 0 ) { -#ifdef CAN_TEST - if ( dbgRcvdCANFrameIdx >= 2000 ) - { - result = 99; // Break point here - } - else - { - dbgRcvdCANFrameTS[dbgRcvdCANFrameIdx] = getMSTimerCount(); - dbgRcvdCANFrameCh[dbgRcvdCANFrameIdx] = srcCANBox; - memcpy( &dbgRcvdCANFrames[dbgRcvdCANFrameIdx][0], data, 8); - dbgRcvdCANFrameIdx++; - } -#endif //#ifdef DEBUG_ENABLED // if ( srcCANBox == COMM_BUFFER_IN_CAN_PC ) // { @@ -656,19 +614,6 @@ memcpy( lastCANPacketSent, data, CAN_MESSAGE_PAYLOAD_SIZE ); lastCANPacketSentChannel = mBox; lastCANPacketSentTimeStamp = getMSTimerCount(); -#ifdef CAN_TEST -// if ( dbgXmitCANFrameIdx > 2000 ) -// { -// dataSize = 99; // Break point here -// } -// else -// { -// dbgXmitCANFrameTS[dbgXmitCANFrameIdx] = getMSTimerCount(); -// dbgXmitCANFrameCh[dbgXmitCANFrameIdx] = mBox; -// memcpy( &dbgXmitCANFrames[dbgXmitCANFrameIdx][0], data, 8); -// dbgXmitCANFrameIdx++; -// } -#endif if ( 0 != canTransmit( canREG1, mBox, data ) ) { result = CAN_MESSAGE_PAYLOAD_SIZE; @@ -998,10 +943,6 @@ static void checkTooManyBadMsgCRCs( void ) { U32 listTimeInMS; -#ifdef CAN_TEST - static U32 crcErrorCtr = 0; - crcErrorCtr++; -#endif // replace oldest bad CRC in list with this new one badCRCTimeStamps[ badCRCListIdx ] = getMSTimerCount(); @@ -1014,10 +955,8 @@ if ( ( badCRCListCount >= MAX_COMM_CRC_FAILURES ) && ( listTimeInMS <= MAX_COMM_CRC_FAILURE_WINDOW_MS ) ) { #ifndef DISABLE_CRC_ERROR -#ifndef CAN_TEST activateAlarmNoData( ALARM_ID_COMM_TOO_MANY_BAD_CRCS ); #endif -#endif } } @@ -1173,6 +1112,14 @@ handleUFPauseResumeRequest( message ); break; + case MSG_ID_USER_UF_SETTINGS_CHANGE_REQUEST: + handleChangeUFSettingsRequest( message ); + break; + + case MSG_ID_USER_CONFIRM_UF_SETTINGS_CHANGE: + handleChangeUFSettingsConfirmation( message ); + break; + case MSG_ID_TESTER_LOGIN_REQUEST: handleTesterLogInRequest( message ); break;