BOOL armUp(int color, int index) { BOOL result; if (color) { result = armDriver2012Up(index); } else { result = armDriver2012Up(index); } delaymSec(500); setReadyForNextMotion(TRUE); return result; }
void homologation5_Totem(int color) { unsigned int index = getMotionInstructionIndex(); switch (index) { case 1: armDriver2012Down(ARM_LEFT); armDriver2012Down(ARM_RIGHT); delaymSec(1000); setReadyForNextMotion(TRUE); break; case 2: motionDriverForward(500.0f); break; case 3: armDriver2012Up(ARM_LEFT); armDriver2012Up(ARM_RIGHT); break; } }
BOOL isEnd() { if (doNotEnd) { return FALSE; } if (!matchStarted) { appendString(getOutputStreamLogger(ERROR), "You must call startMatch before"); } BOOL result = currentTimeInSecond >= MATCH_DURATION; if (result) { // If END armDriver2012Up(0); } return result; }
bool isEnd(void) { if (doNotEnd) { return false; } if (!matchStarted) { appendString(getErrorOutputStreamLogger(), "You must call startMatch before"); } bool result = currentTimeInSecond >= MATCH_DURATION; if (result) { // If END // TODO : Provide a callback in the Interface and not in the endMatchDetectorDevice ! armDriver2012Up(0); } return result; }