Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -raeb1dea9ea10fcc70ae66023a87b565f29924c07 -r766708fceb0bdf1af8c7897df29d4f5036bfd3db --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision aeb1dea9ea10fcc70ae66023a87b565f29924c07) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 766708fceb0bdf1af8c7897df29d4f5036bfd3db) @@ -30,12 +30,6 @@ #include "TaskGeneral.h" #include "RTC.h" -#ifdef RM46_EVAL_BOARD_TARGET - #include "CPLD.h" - #include "SystemCommMessages.h" - static BOOL lastUserPress = FALSE; -#endif - /** * @addtogroup TaskGeneral * @{ @@ -55,73 +49,54 @@ void taskGeneral( void ) { #ifdef TASK_TIMING_OUTPUT_ENABLED - // set GPIO high to indicate general task has begun executing + // Set GPIO high to indicate general task has begun executing setCPLDLampGreen( PIN_SIGNAL_HIGH ); #endif - // check in with watchdog manager - checkInWithWatchdogMgmt( TASK_GENERAL ); // do this first to keep timing consistent with watchdog management + // Check in with watchdog manager + checkInWithWatchdogMgmt( TASK_GENERAL ); // Do this first to keep timing consistent with watchdog management - // manage data received from other sub-systems + // Manage data received from other sub-systems execSystemCommRx(); - // prevent most processing until UI has started communicating + // Prevent most processing until UI has started communicating #ifndef SIMULATE_UI if ( TRUE == uiCommunicated() ) #endif - { - // monitor DG interface + { + // Monitor DG execDGInterfaceMonitor(); - // monitor pressure/occlusion sensors + // Monitor pressure/occlusion sensors execPresOccl(); - // run operation mode state machine + // Run operation mode state machine execOperationModes(); - // control air trap valve + // Control air trap valve execAirTrapController(); - // control blood pump + // Control blood pump execBloodFlowController(); - // control dialysate inlet pump + // Control dialysate inlet pump execDialInFlowController(); - // control dialysate outlet pump + // Control dialysate outlet pump execDialOutFlowController(); - // manage RTC + // Manage RTC execRTC(); - // manage alarm state + // Manage alarm state execAlarmMgmt(); - // control alarm lamp - execAlarmLamp(); - -#ifdef RM46_EVAL_BOARD_TARGET - if ( getUserButtonState() == PIN_SIGNAL_LOW ) - { - if ( lastUserPress == FALSE ) - { - lastUserPress = TRUE; - setUserLED( FALSE ); - sendOffButtonMsgToUI(TRUE); - } - } - else - { - lastUserPress = FALSE; - } -#endif - - // manage data to be transmitted to other sub-systems + // Manage data to be transmitted to other sub-systems execSystemCommTx(); } #ifdef TASK_TIMING_OUTPUT_ENABLED - // set GPIO low to indicate general task has finished executing + // Set GPIO low to indicate general task has finished executing setCPLDLampGreen( PIN_SIGNAL_LOW ); #endif }