Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -ra9315539f527b92523b1598ff91e47db4d71dae2 -r264d5853c97ab9550878609c9302e87464078734 --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision a9315539f527b92523b1598ff91e47db4d71dae2) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision 264d5853c97ab9550878609c9302e87464078734) @@ -46,7 +46,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_DOORS_AND_CAPS ]; ///< Switches status array. +static SWITCH_STATUS_T switchesStatus[ NUM_OF_CAPS ]; ///< Switches status array. // ********** private function prototypes ********** @@ -66,7 +66,7 @@ switchesDataPublicationCounter = DATA_PUBLISH_COUNTER_START_COUNT; // Initialize all the switches - for ( i = 0; i < NUM_OF_DOORS_AND_CAPS; i++ ) + for ( i = 0; i < NUM_OF_CAPS; i++ ) { switchesStatus[ i ].status.data = (U32)STATE_CLOSED; switchesStatus[ i ].status.ovData = (U32)STATE_CLOSED; @@ -89,7 +89,7 @@ U08 currentSwitchStatus = 0; - for ( i = 0; i < NUM_OF_DOORS_AND_CAPS; i++ ) + for ( i = 0; i < NUM_OF_CAPS; i++ ) { // Get the current switch status switch ( i ) @@ -102,10 +102,6 @@ currentSwitchStatus = ( getFPGADialysateCapStatus() != 0 ? STATE_OPEN : STATE_CLOSED ); break; - case FLUID_DOOR: - currentSwitchStatus = ( getFPGAGFluidDoorStatus() != 0 ? STATE_OPEN : STATE_CLOSED ); - break; - // NOTE: the default case was removed since this switch case is executed using a for loop so the default // case is never called. The default case is unreachable in development testing. } @@ -146,7 +142,7 @@ { U32 status = 0; - if ( switchId < NUM_OF_DOORS_AND_CAPS ) + if ( switchId < NUM_OF_CAPS ) { // Assume there is no override status = switchesStatus[ switchId ].status.data; @@ -182,7 +178,6 @@ data.concentrateCap = (U32)getSwitchStatus( CONCENTRATE_CAP ); data.dialysateCap = (U32)getSwitchStatus( DIALYSATE_CAP ); - data.fluidDoor = (U32)getSwitchStatus( FLUID_DOOR ); switchesDataPublicationCounter = 0; @@ -257,7 +252,7 @@ { BOOL result = FALSE; - if ( switchId < NUM_OF_DOORS_AND_CAPS ) + if ( switchId < NUM_OF_CAPS ) { if ( TRUE == isTestingActivated() ) { @@ -283,7 +278,7 @@ { BOOL result = FALSE; - if ( switchId < NUM_OF_DOORS_AND_CAPS ) + if ( switchId < NUM_OF_CAPS ) { if ( TRUE == isTestingActivated() ) {