#include "system_control.h"
#include "timer.h"
#include "spb_system.h"
#include "environment.h"
#include "spb_processing.h"

extern unsigned int LastResponseStatusID;
extern unsigned int StatusRequestID;

void System_Control_Init(void)
{
	InitProcessingResultData();
}

void System_Control_Process(void)
{
	unsigned int gie;
	if (ProcessingData.ProcessingMode == PROCESSING_MODE_INSPECTION)
	{
		if (LastResponseStatusID != StatusRequestID)
		{
			MakeProcessingResultData();
//			gie = IRQ_globalDisable();
			LastResponseStatusID = StatusRequestID;
//			IRQ_globalRestore(gie);

		}/* sjm del For RunTime
		else
		{
			//MakeProcessingResultData();
		}*/
	}
	else if (ProcessingData.ProcessingMode == PROCESSING_MODE_STUDY)
	{
		MakeStudyResultData();
	}
}

