Manual
www.nexusrobot.com Robot Kits manual
117
if(Omni.getCarStat()!=Omni4WD::STAT_LEFT) Omni.setCarSlow2Stop(300);
Omni.setCarLeft(0);
Omni.setCarSpeedMMPS(speedMMPS, 300);
}
void turnRight(unsigned int speedMMPS){
if(Omni.getCarStat()!=Omni4WD::STAT_RIGHT) Omni.setCarSlow2Stop(300);
Omni.setCarRight(0);
Omni.setCarSpeedMMPS(speedMMPS, 300);
}
void rotateRight(unsigned int speedMMPS){
if(Omni.getCarStat()!=Omni4WD::STAT_ROTATERIGHT) Omni.setCarSlow2Stop(300);
Omni.setCarRotateRight(0);
Omni.setCarSpeedMMPS(speedMMPS, 300);
}
void rotateLeft(unsigned int speedMMPS){
if(Omni.getCarStat()!=Omni4WD::STAT_ROTATELEFT) Omni.setCarSlow2Stop(300);
Omni.setCarRotateLeft(0);
Omni.setCarSpeedMMPS(speedMMPS, 300);
}
void allStop(unsigned int speedMMPS){
if(Omni.getCarStat()!=Omni4WD::STAT_STOP) Omni.setCarSlow2Stop(300);
Omni.setCarStop();
}
void backOff(unsigned int speedMMPS){
}
//void(*motion[8])(unsigned int speedMMPS) = {goAhead, turnLeft, rotateRight, rotateLeft,
//turnRight, goAhead, rotateRight, backOff};
void(*motion[16])(unsigned int speedMMPS) = {goAhead, turnRight, goAhead, turnRight,
turnLeft, goAhead, turnLeft, goAhead,
rotateRight, rotateRight, turnRight, turnRight,