Exemplo n.º 1
0
void ApplicationModeTasks(void)
{
    // Debounce switch presses for rebooting to configuration mode
    if (AppConfig_CheckForConfigurationModeRebootButtonPress())
    {
        CommandHandlers_ResetHandler(true);
    }

    // Hook to perform period tasks
    //time_t currentTime;
    //Creator_GetTime(&currentTime);
    //if ((currentTime - _PrevAppTaskTime) >= APP_TASK_SECONDS)
    //{
    //    _PrevAppTaskTime = currentTime;
    //}

    //Handle device reset request.
    if (CommandHandlers_IsResetPending())
    {
        if (Shutdown())
        {
            AppConfig_SoftwareReset(CommandHandlers_ResetToConfigurationMode());
        }
        else
            CreatorConsole_Puts("Shutdown failed\r\n");
    }
    else
    {
        UIControl_pollInputSensors();
    }
}
Exemplo n.º 2
0
// *****************************************************************************
// *****************************************************************************
// Section: Application Initialization and State Machine
// *****************************************************************************
// *****************************************************************************
void APP_Tasks_InteractiveMode( void )
{

	// Debounce switch presses for rebooting to configuration mode
	if (CheckForConfigurationModeRebootButtonPress())
	{
		CommandHandlers_ResetHandler(true);
	}

}