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."); } }
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); } }
void QuaduinoFlight::runMotorsFullrange() { runMotorsMax(); delay(500); runMotorsMin(); delay(500); }