version 1.1
This commit is contained in:
+9
-9
@@ -29,10 +29,10 @@ void setup() {
|
||||
}
|
||||
|
||||
// set drone motorPins
|
||||
drone.setPinESC(6, MotorPosition::FR);
|
||||
drone.setPinESC(7, MotorPosition::FL);
|
||||
drone.setPinESC(5, MotorPosition::BR);
|
||||
drone.setPinESC(8, MotorPosition::BL);
|
||||
drone.setPinESC(6, MotorPosition::FR, 70); // 1080
|
||||
drone.setPinESC(7, MotorPosition::FL, 120); // 1130
|
||||
drone.setPinESC(5, MotorPosition::BR, 30); // 1040
|
||||
drone.setPinESC(8, MotorPosition::BL, 190); // 1200
|
||||
|
||||
|
||||
lastReceivedMessage = millis();
|
||||
@@ -93,7 +93,7 @@ void loop() {
|
||||
|
||||
|
||||
|
||||
drone.update();
|
||||
// drone.update();
|
||||
|
||||
delay(10);
|
||||
// delay(1000);
|
||||
@@ -109,10 +109,10 @@ void manualMotorSpeed() {
|
||||
}
|
||||
}
|
||||
|
||||
if (val < MOTOR().minSpeed)
|
||||
val = MOTOR().minSpeed;
|
||||
else if (val > MOTOR().maxSpeed)
|
||||
val = MOTOR().maxSpeed;
|
||||
// if (val < MOTOR().getMinSpeed())
|
||||
// val = MOTOR().getMinSpeed();
|
||||
// else if (val > MOTOR().getMaxSpeed())
|
||||
// val = MOTOR().getMaxSpeed();
|
||||
|
||||
if ((millis() - startTime) >= delayTime && gotSerialData == true) {
|
||||
drone.setSpeed(val, MotorPosition::FR);
|
||||
|
||||
Reference in New Issue
Block a user