Index: firmware/App/Controllers/Switches.c =================================================================== diff -u -r2e56d2d983becc4b15bd296d583e046e061a5719 -r69b93e39861c5493d273f25d9e43cacd0b5819e2 --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision 2e56d2d983becc4b15bd296d583e046e061a5719) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) @@ -27,7 +27,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_DOORS_AND_SWITCHES ]; ///< Switches status array. // ********** private function prototypes ********** @@ -48,7 +48,7 @@ switchesDataPublicationCounter = 0; // Initialize all the switches - for ( i = 0; i < NUM_OF_DOORS_AND_CAPS; i++ ) + for ( i = 0; i < NUM_OF_DOORS_AND_SWITCHES; i++ ) { switchesStatus[ i ].status.data = (U32)STATE_CLOSED; switchesStatus[ i ].status.ovData = (U32)STATE_CLOSED; @@ -71,7 +71,7 @@ U16 currentSwitchStatus = 0; - for ( i = 0; i < NUM_OF_DOORS_AND_CAPS; i++ ) + for ( i = 0; i < NUM_OF_DOORS_AND_SWITCHES; i++ ) { // Get the current switch status switch ( i ) @@ -80,8 +80,8 @@ currentSwitchStatus = getFPGAFrontDoorStatus(); break; - case CARTRDIGE_LATCH: - currentSwitchStatus = getFPGACartridgeLatchStatus(); + case PUMP_TRACK_SWITCH: + currentSwitchStatus = getFPGAPumpTrackSwitchStatus(); break; default: @@ -125,7 +125,7 @@ { U32 status; - if ( switchId < NUM_OF_DOORS_AND_CAPS ) + if ( switchId < NUM_OF_DOORS_AND_SWITCHES ) { if ( OVERRIDE_KEY == switchesStatus[ switchId ].status.override ) { @@ -161,7 +161,7 @@ SWITCHES_DATA_T data; data.frontDoor = (U32)getSwitchStatus( FRONT_DOOR ); - data.cartrdigeLatch = (U32)getSwitchStatus( CARTRDIGE_LATCH ); + data.cartrdigeLatch = (U32)getSwitchStatus( PUMP_TRACK_SWITCH ); switchesDataPublicationCounter = 0; @@ -256,7 +256,7 @@ { BOOL result = FALSE; - if ( switchId < NUM_OF_DOORS_AND_CAPS ) + if ( switchId < NUM_OF_DOORS_AND_SWITCHES ) { if ( isTestingActivated() ) { @@ -282,7 +282,7 @@ { BOOL result = FALSE; - if ( switchId < NUM_OF_DOORS_AND_CAPS ) + if ( switchId < NUM_OF_DOORS_AND_SWITCHES ) { if ( isTestingActivated() ) {