Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -rcb5c7321fae3036d7a3641ae49097b4b361270f5 -r070554b23739bf16ea2bf9528ebabda1ce0ffeb3 --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision cb5c7321fae3036d7a3641ae49097b4b361270f5) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 070554b23739bf16ea2bf9528ebabda1ce0ffeb3) @@ -20,9 +20,12 @@ #include "BloodFlow.h" #include "Buttons.h" #include "FPGA.h" +#include "SystemComm.h" #include "WatchdogMgmt.h" #include "TaskPriority.h" +static BOOL uiHasCheckedIn = FALSE; + /************************************************************************* * @brief taskPriority * The taskPriority function handles the scheduled Priority Task interrupt. @@ -33,24 +36,29 @@ *************************************************************************/ void taskPriority( void ) { - // 1st pass for FPGA - execFPGAIn(); + // prevent most processing until UI has started communicating + if ( TRUE == uiHasCheckedIn ) + { + // 1st pass for FPGA + execFPGAIn(); - // monitor and process buttons - execButtons(); + // monitor and process buttons + execButtons(); - // monitor internal ADC channels - execInternalADC(); + // monitor internal ADC channels + execInternalADC(); - // monitor blood pump and flow - execBloodFlowMonitor(); + // monitor blood pump and flow + execBloodFlowMonitor(); - // control blood pump - execBloodFlowController(); + // 2nd pass for FPGA + execFPGAOut(); + } + else + { + uiHasCheckedIn = uiCommunicated(); + } - // 2nd pass for FPGA - execFPGAOut(); - // check in with watchdog manager checkInWithWatchdogMgmt( TASK_PRIORITY );