Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r663c6ccbe24d0adf734ca0684510eef70884cdee -rdcbd821e41803adc6e582d909207bc97f85ff939 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 663c6ccbe24d0adf734ca0684510eef70884cdee) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision dcbd821e41803adc6e582d909207bc97f85ff939) @@ -20,7 +20,6 @@ #include "Common.h" #include "AlarmLamp.h" -#include "Buttons.h" #include "MsgQueues.h" #include "WatchdogMgmt.h" #include "SystemCommMessages.h" @@ -97,57 +96,9 @@ // ********************* MSG_ID_OFF_BUTTON_PRESS ************************* // *********************************************************************** -/************************************************************************* - * @brief sendOffButtonMsgToUI - * The sendOffButtonMsgToUI function constructs an off button msg to the UI \n - * and queues the msg for transmit on the appropriate CAN channel. - * @details - * Inputs : none - * Outputs : Off button msg constructed and queued. - * @param none - * @return TRUE if msg successfully queued for transmit, FALSE if not - *************************************************************************/ -BOOL sendOffButtonMsgToUI( void ) -{ - BOOL result; - MESSAGE_T msg; - U32 msgSize; - U08 data[sizeof(MESSAGE_WRAPPER_T)+1+CAN_MESSAGE_PAYLOAD_SIZE]; // must hold full (wrapped) message + sync + any CAN padding - // create a message record - blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_OFF_BUTTON_PRESS; - msg.hdr.payloadLen = 0; - // serialize the message (w/ sync, CRC, and appropriate CAN padding) - msgSize = serializeMessage( msg, data ); - - // add serialized message data to appropriate comm buffer - result = addToCommBuffer( COMM_BUFFER_OUT_CAN_DG_2_HD, data, msgSize ); - - return result; -} - /************************************************************************* - * @brief handleOffButtonConfirmMsgFromUI - * The handleOffButtonConfirmMsgFromUI function handles a response to an \n - * off button message to the UI. - * @details - * Inputs : none - * Outputs : message handled - * @param message : a pointer to the message to handle - * @return none - *************************************************************************/ -void handleOffButtonConfirmMsgFromUI( MESSAGE_T *message ) -{ - OFF_BUTTON_MESSAGE_FROM_UI_PAYLOAD_T payload; - - memcpy( &payload, message->payload, sizeof(OFF_BUTTON_MESSAGE_FROM_UI_PAYLOAD_T) ); - userConfirmOffButton( payload.confirmed ); -} - - -/************************************************************************* * @brief handleDGFillStartStopMessages * The handleDGFillStartStopMessages function handles a response to the * start and stop messages thru the CAN bus. @@ -326,72 +277,6 @@ } /************************************************************************* - * @brief handleTestOffButtonStateOverrideRequest - * The handleTestOffButtonStateOverrideRequest function handles a request to \n - * override the state of the off button. - * @details - * Inputs : none - * Outputs : message handled - * @param message : a pointer to the message to handle - * @return none - *************************************************************************/ -void handleTestOffButtonStateOverrideRequest( MESSAGE_T *message ) -{ - TEST_OVERRIDE_PAYLOAD_T payload; - BOOL result = FALSE; - - // verify payload length - if ( sizeof(TEST_OVERRIDE_PAYLOAD_T) == message->hdr.payloadLen ) - { - memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); - - if ( FALSE == payload.reset ) - { - result = testSetOffButtonStateOverride( (BUTTON_STATE_T)(payload.state) ); - } - else - { - result = testResetOffButtonStateOverride(); - } - } - // respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); -} - -/************************************************************************* - * @brief handleTestStopButtonStateOverrideRequest - * The handleTestStopButtonStateOverrideRequest function handles a request to \n - * override the stop button state. - * @details - * Inputs : none - * Outputs : message handled - * @param message : a pointer to the message to handle - * @return none - *************************************************************************/ -void handleTestStopButtonStateOverrideRequest( MESSAGE_T *message ) -{ - TEST_OVERRIDE_PAYLOAD_T payload; - BOOL result = FALSE; - - // verify payload length - if ( sizeof(TEST_OVERRIDE_PAYLOAD_T) == message->hdr.payloadLen ) - { - memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); - - if ( FALSE == payload.reset ) - { - result = testSetStopButtonStateOverride( (BUTTON_STATE_T)(payload.state) ); - } - else - { - result = testResetStopButtonStateOverride(); - } - } - // respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); -} - -/************************************************************************* * @brief handleTestAlarmLampPatternOverrideRequest * The handleTestAlarmLampPatternOverrideRequest function handles a request to \n * override the alarm lamp pattern.