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() ) { Index: firmware/App/Controllers/Switches.h =================================================================== diff -u -r2e56d2d983becc4b15bd296d583e046e061a5719 -r69b93e39861c5493d273f25d9e43cacd0b5819e2 --- firmware/App/Controllers/Switches.h (.../Switches.h) (revision 2e56d2d983becc4b15bd296d583e046e061a5719) +++ firmware/App/Controllers/Switches.h (.../Switches.h) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) @@ -19,8 +19,8 @@ typedef enum switches_names { FRONT_DOOR = 0, ///< Front door - CARTRDIGE_LATCH, ///< Cartridge latch switch - NUM_OF_DOORS_AND_CAPS ///< Number of doors and caps + PUMP_TRACK_SWITCH, ///< Pump track switch + NUM_OF_DOORS_AND_SWITCHES ///< Number of doors and switches } SWITCH_T; /// DG doors and caps data publish structure Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r632bbd302a9ae48df66e40a6faadc3db0c164671 -r69b93e39861c5493d273f25d9e43cacd0b5819e2 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 632bbd302a9ae48df66e40a6faadc3db0c164671) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) @@ -23,6 +23,7 @@ #include "CPLD.h" #include "DialInFlow.h" #include "FPGA.h" +#include "Integrity.h" #include "ModeInitPOST.h" #include "NVDataMgmt.h" #include "OperationModes.h" @@ -123,7 +124,7 @@ break; case POST_STATE_FW_INTEGRITY: - //testStatus = execIntegrityTest(); TODO what happened to this module? + testStatus = execIntegrityTest(); testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r2e56d2d983becc4b15bd296d583e046e061a5719 -r69b93e39861c5493d273f25d9e43cacd0b5819e2 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 2e56d2d983becc4b15bd296d583e046e061a5719) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) @@ -101,7 +101,7 @@ #define FPGA_ALARM_AUDIO_VOLUME_SHIFT 3 ///< Shift alarm audio volume 3 bits to left before writing to register. #define FRONT_DOOR_SWITCH_MASK 0x0010 ///< Front door switch bit mask. -#define FPGA_POWER_OUT_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< FPGA power out timeout in milliseconds. +#define PUMP_TRACK_SWITCH_MASK 0x0020 ///< Pump track switch bit mask. // FPGA Sensors Record #pragma pack(push,1) @@ -2326,13 +2326,13 @@ /*********************************************************************//** * @brief - * The getFPGACartridgeLatchStatus function returns the FPGA cartridge latch - * status bit. + * The getFPGAPumpTrackSwitchStatus function returns the FPGA pump track + * switch status bit. * @details Inputs: none * @details Outputs: fpgaSensorReadings * @return cartridge latch FPGA status bit *************************************************************************/ -U16 getFPGACartridgeLatchStatus( void ) +U16 getFPGAPumpTrackSwitchStatus( void ) { // TODO fill up return 0; Index: firmware/App/Services/FPGA.h =================================================================== diff -u -r2e56d2d983becc4b15bd296d583e046e061a5719 -r69b93e39861c5493d273f25d9e43cacd0b5819e2 --- firmware/App/Services/FPGA.h (.../FPGA.h) (revision 2e56d2d983becc4b15bd296d583e046e061a5719) +++ firmware/App/Services/FPGA.h (.../FPGA.h) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) @@ -151,7 +151,7 @@ U16 getFPGAValveBloodArterialCurrentCounts( void ); U16 getFPGAFrontDoorStatus( void ); -U16 getFPGACartridgeLatchStatus( void ); +U16 getFPGAPumpTrackSwitchStatus( void ); // The PWM functions are only used during debugging #ifdef DEBUG_ENABLED Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -r632bbd302a9ae48df66e40a6faadc3db0c164671 -r69b93e39861c5493d273f25d9e43cacd0b5819e2 --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 632bbd302a9ae48df66e40a6faadc3db0c164671) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) @@ -61,9 +61,6 @@ // Manage data received from other sub-systems execSystemCommRx(); - - // Manage RTC - execRTC(); // Prevent most processing until UI has started communicating #ifndef SIMULATE_UI @@ -84,6 +81,10 @@ execOperationModes(); #ifndef BOARD_WITH_NO_HARDWARE + + // Manage RTC + execRTC(); + // Control air trap valve execAirTrapController();