示例#1
0
int main (){
	unsigned int iMainLoopCtr;
	KeyboardInit(); 
	Led_Init(); 
  DetectorInit(); 
  Timer1Interrupts_Init(250000,&Automat); 
	
	while(1){
	 	iMainLoopCtr++;
	}
}
示例#2
0
int main (){
	unsigned int iMainLoopCtr;
	KeyboardInit(); 
  Led_Init(); 
  DetectorInit(); 
	sServo.eState=CALLIB; 
	Timer1Interrupts_Init(60000,&Automat); 
	
	while(1){
	 	 iMainLoopCtr++;
			switch(eKeyboard_Read()){
			case BUTTON_1:sServo.eState=CALLIB; break;
			case BUTTON_2:sServo.uiDesiredPosition=50; break;
			case BUTTON_3:sServo.uiDesiredPosition=100; break;
			case BUTTON_4:sServo.uiDesiredPosition=150; break;
			default: break;
		}
	 }
}
示例#3
0
void
DetectorConfig(Int_t tag)
{

  printf(">>>>> DetectorConfig: %s \n", DetectorName[tag]);

  switch (tag) {

    // kDetectorDefault
  case kDetectorDefault:
  case kDetectorPhosOnly:
    DetectorDefault();
    break;
    
    // kDetectorMuon
  case kDetectorMuon:
    DetectorMuon();
    break;
    
    // kDetectorNoZDC
  case kDetectorNoZDC:
    DetectorDefault();
    iZDC = 0;
    break;
    
    // kDetectorCustom
  case kDetectorCustom:
    if ((gROOT->LoadMacro("DetectorCustom.C")) != 0) {
      printf("ERROR: cannot find DetectorCustom.C\n");
      abort();
      return;
    }
    DetectorCustom();
    break;
    
  }

  DetectorInit(tag);
  
}
示例#4
0
void Servo_Init(unsigned int uiServoFrequency)
{
    Led_Init();
    DetectorInit();
    Timer1Interrupts_Init(uiServoFrequency,&Automat);
}