Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r3d131237935eb36e56e0d057a713430e31dc6405 -r47c41046beba8affaaaa13a4f222a7b99bd193f1 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 3d131237935eb36e56e0d057a713430e31dc6405) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 47c41046beba8affaaaa13a4f222a7b99bd193f1) @@ -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 } /*********************************************************************//** @@ -1010,6 +986,7 @@ case MSG_ID_REQUEST_FW_VERSIONS: handleFWVersionCmd( message ); + handleDGSerialNumberRequest(); break; case MSG_ID_DG_SWITCH_RESERVOIR_CMD: @@ -1056,6 +1033,14 @@ handleUIClockSyncRequest( message ); break; + case MSG_ID_HD_DG_POST_RESULT_REQUEST: + handleDGPOSTResultRequest( message ); + break; + + case MSG_ID_UI_REQUEST_SERVICE_INFO: + handleDGServiceScheduleRequest( message ); + break; + // NOTE: This case must be last case MSG_ID_DG_TESTER_LOGIN_REQUEST: handleTesterLogInRequest( message ); @@ -1175,6 +1160,14 @@ handleSetDrainPumpDeltaPressureOverrideRequest( message ); break; + case MSG_ID_DG_SWITCHES_STATUS_OVERRIDE: + handleSetSwitchesStatusOverrideRequest( message ); + break; + + case MSG_ID_DG_SWITCHES_PUBLISH_INTERVAL_OVERRIDE: + handleTestSwitchesPublishIntervalOverrideRequest( message ); + break; + case MSG_ID_DG_SOFTWARE_RESET_REQUEST: handleDGSoftwareResetRequest( message ); break; @@ -1275,6 +1268,14 @@ handleSetFluidLeakStateDetectorOverrideRequest( message ); break; + case MSG_ID_DG_OP_MODE_PUBLISH_INTERVAL_OVERRIDE: + handleSetDGOpModeBroadcastIntervalOverrideRequest( message ); + break; + + case MSG_ID_FILTER_FLUSH_TIME_PERIOD_OVERRIDE: + handleFilterFlushTimePeriodOverride(message); + break; + default: // TODO - unrecognized message ID received - ignore break;