int main (){ unsigned int iMainLoopCtr; KeyboardInit(); Led_Init(); DetectorInit(); Timer1Interrupts_Init(250000,&Automat); while(1){ iMainLoopCtr++; } }
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; } } }
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); }
void Servo_Init(unsigned int uiServoFrequency) { Led_Init(); DetectorInit(); Timer1Interrupts_Init(uiServoFrequency,&Automat); }