Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -rc67def50892f9a7c2f1f22985b5351465a8f6773 -r30f049651877229042e3f8700c8596e5b9a1e0f4 --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision c67def50892f9a7c2f1f22985b5351465a8f6773) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 30f049651877229042e3f8700c8596e5b9a1e0f4) @@ -29,12 +29,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 * @{ @@ -54,70 +48,51 @@ 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 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 }