Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -r22176ce95e49213c48454f34ddf5d29b8109f2cb -r5fb0cfdde0e308edfa027fc10981655c329abf4a --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision 22176ce95e49213c48454f34ddf5d29b8109f2cb) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision 5fb0cfdde0e308edfa027fc10981655c329abf4a) @@ -45,7 +45,7 @@ static U32 switchesDataPublicationCounter; ///< Switches data publication counter. static OVERRIDE_U32_T switchesDataPublishInterval = { SWITCHES_DATA_PUB_INTERVAL, SWITCHES_DATA_PUB_INTERVAL, 0, 0 }; ///< Interval (in ms) at which to publish switches data to CAN bus. -static SWITCH_STATUS_T switchesStatus[ NUM_OF_CAPS ]; ///< Switches status array. +static SWITCH_STATUS_T switchesStatus[ NUM_OF_CAPS ]; ///< Switches status array. // ********** private function prototypes ********** @@ -115,6 +115,16 @@ // If the debounce time has been elapsed, update the switch status to the new status else if ( TRUE == didTimeout( switchesStatus[ i ].debounceStartTime, SWITCHES_DEBOUNCE_TIME_MS ) ) { + if (CONCENTRATE_CAP == i) + { + SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_CONCENTRATECAP_SWITCH_CHANGE, + (U32)switchesStatus[ i ].status.data, (U32)currentSwitchStatus ); + } + else if (DIALYSATE_CAP == i) + { + SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_DIALYSATECAP_SWITCH_CHANGE, + (U32)switchesStatus[ i ].status.data, (U32)currentSwitchStatus ); + } switchesStatus[ i ].debounceStartTime = 0; switchesStatus[ i ].status.data = currentSwitchStatus; } @@ -183,7 +193,6 @@ } } - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/ Index: firmware/App/Controllers/Switches.h =================================================================== diff -u -r22176ce95e49213c48454f34ddf5d29b8109f2cb -r5fb0cfdde0e308edfa027fc10981655c329abf4a --- firmware/App/Controllers/Switches.h (.../Switches.h) (revision 22176ce95e49213c48454f34ddf5d29b8109f2cb) +++ firmware/App/Controllers/Switches.h (.../Switches.h) (revision 5fb0cfdde0e308edfa027fc10981655c329abf4a) @@ -60,4 +60,6 @@ BOOL testSetSwitchesStatusOverride( U32 switchId, U32 status ); BOOL testResetSwitchesStatusOverride( U32 switchId ); -#endif /* APP_CONTROLLERS_SWITCHES_H_ */ +/**@}*/ + +#endif