Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rc55d371408bdf962de525a47bc8541d5b43414a3 -ra79db345deaaeef0f1b619dc49d031fdae22d7e6 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision c55d371408bdf962de525a47bc8541d5b43414a3) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision a79db345deaaeef0f1b619dc49d031fdae22d7e6) @@ -249,14 +249,6 @@ { canTransmit( canREG1, lastCANPacketSentChannel, lastCANPacketSent ); } -#ifdef DEBUG_ENABLED - { - char debugStr[100]; - strcpy( debugStr, "SystemComm-DG resend Last Frame.\n" ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); - } -#endif } // we must be only node on CAN bus - nobody is ACKing our transmitted frames else @@ -265,11 +257,6 @@ canXmitRetryCtr = MAX_XMIT_RETRIES; signalCANXmitsCompleted(); // clear pending xmit flag clearCANXmitBuffers(); // clear xmit buffers - nothing is going out right now -#ifdef DEBUG_ENABLED - char debugStr[100]; - strcpy( debugStr, "SystemComm-DG is only node.\n" ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); -#endif } // end - are we retrying xmit or are we alone on CAN bus } // end - pending xmit timeout? } // end - transmit in progress or not @@ -567,13 +554,12 @@ else { signalCANXmitsCompleted(); - // TODO - shouldn't get here, but let's see if we do - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, (U32)mBox ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_CAN_TX_FAULT, (U32)mBox ) } } else - { // TODO - shouldn't get here - just testing - set first data to new s/w fault enum later - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, (U32)buffer, (U32)dataSize ) + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_CAN_MESSAGE_SIZE, (U32)dataSize ) } } @@ -839,9 +825,7 @@ if ( TRUE == didTimeout( timeOfLastHDCheckIn, HD_COMM_TIMEOUT_IN_MS ) ) { hdIsCommunicating = FALSE; -#ifndef DEBUG_ENABLED - activateAlarmNoData( ALARM_ID_HD_COMM_TIMEOUT ); // TODO - add this alarm if we're in middle of a treatment? or if in a mode that comm loss would impact badly? -#endif + activateAlarmNoData( ALARM_ID_HD_COMM_TIMEOUT ); } } @@ -860,14 +844,6 @@ { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_COMM_TOO_MANY_BAD_CRCS, 2 ); // 2 for DG } -#ifdef DEBUG_ENABLED - { - char debugStr[100]; - - strcpy( debugStr, "SystemComm-DG-Bad Msg CRC.\n" ); - sendDebugDataToUI( (U08*)debugStr ); - } -#endif } /*********************************************************************//** @@ -1057,6 +1033,10 @@ handleUIClockSyncRequest( message ); break; + case MSG_ID_HD_DG_POST_RESULT_REQUEST: + handleDGPOSTResultRequest( message ); + break; + case MSG_ID_UI_REQUEST_SERVICE_INFO: handleDGServiceScheduleRequest( message ); break; @@ -1288,6 +1268,10 @@ handleSetFluidLeakStateDetectorOverrideRequest( message ); break; + case MSG_ID_FILTER_FLUSH_TIME_PERIOD_OVERRIDE: + handleFilterFlushTimePeriodOverride(message); + break; + default: // TODO - unrecognized message ID received - ignore break;