Exemplo n.º 1
0
void QuaduinoFlight::killMotors(unsigned long *currentFrame, unsigned long startSeconds) {
  unsigned long startFrame = startSeconds*74;
  if(*currentFrame >= startFrame && allowAutonomy) {
    runMotorsMin();
    allowAutonomy = false;
    motorsActive = false;
    Serial.println("Killing motors. I hope you're on the ground.");
  }
}
Exemplo n.º 2
0
void QuaduinoFlight::runMotorsFullrangeGradual() {
	int range = minPulseWidth;
	bool increase = true;

	runMotorsMin();

	while(range <= maxPulseWidth && range >= minPulseWidth) {
		if(increase) {
			range++;
		} else if (increase && range == maxPulseWidth) {
			range--;
			increase = false;
		} else if(!increase) {
			range--;
		} else if(!increase && range == minPulseWidth) {
			runMotorsAt(0);
			break;
		}

		runMotorsAt(range);
	}
}
Exemplo n.º 3
0
void QuaduinoFlight::runMotorsFullrange() {
    runMotorsMax();
    delay(500);
    runMotorsMin();
    delay(500);
}