Index: App/Tasks/TaskGeneral.c =================================================================== diff -u -r7d70e839bc71f6fc37da8cd12eecb374841882df -rc91e9da338d92432930d3589a4055ebbb404c6cb --- App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 7d70e839bc71f6fc37da8cd12eecb374841882df) +++ App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision c91e9da338d92432930d3589a4055ebbb404c6cb) @@ -24,7 +24,13 @@ #include "WatchdogMgmt.h" #include "TaskGeneral.h" -static U32 ctr = 0; // test code +// ***************************** TEST CODE ****************************** +// TODO - remove later +#if 1 +#include "CPLD.h" +static BOOL lastUserPress = FALSE; +#endif +// ************************** END TEST CODE ****************************** /************************************************************************* * @brief taskGeneral @@ -39,17 +45,37 @@ *************************************************************************/ void taskGeneral( void ) { - // test code - if ( ++ctr >= 40 ) { sendOffButtonMsgToUI(); ctr = 0; } - // manage system communication - execSystemComm(); +// ***************************** TEST CODE ****************************** +// TODO - remove later +#if 1 + if ( getUserButtonState() == PIN_SIGNAL_LOW ) + { + if ( lastUserPress == FALSE ) + { + lastUserPress = TRUE; + setUserLED( FALSE ); + sendOffButtonMsgToUI(); + } + } + else + { + lastUserPress = FALSE; + } +#endif +// ************************** END TEST CODE ****************************** + // manage data received from other sub-systems + execSystemCommRx(); + // run operation mode state machine execOperationModes(); // control alarm lamp execAlarmLamp(); + // manage data to be transmitted to other sub-systems + execSystemCommTx(); + // check in with watchdog manager checkInWithWatchdogMgmt( TASK_GENERAL );