kopia lustrzana https://github.com/YohanHadji/R2Home
Ready ready ready
Even servo X is tested-ish I simulated a separation event and then datalog shows the the servo signal moved from 2000 to 1000 as neededmain
rodzic
9ce225c42a
commit
1f99eaeb50
|
@ -95,7 +95,6 @@ void ready_steady() {
|
||||||
if (I_WANT_TO_FLY) {
|
if (I_WANT_TO_FLY) {
|
||||||
flight_mode = 5;
|
flight_mode = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// This code is V3.03
|
// This code is V3.03
|
||||||
// Updated on April 9th
|
// Updated AND tested on April 9th
|
||||||
// Ready for flight, godspeed lil' robot :)
|
// Ready for flight, godspeed lil' robot :)
|
||||||
|
|
||||||
#include <movingAvg.h>
|
#include <movingAvg.h>
|
||||||
|
|
|
@ -136,11 +136,13 @@ servo_cmd cmpt_servo(uint16_t channels[16], int autopilot, int flight_mode, bool
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
case 6:
|
case 6:
|
||||||
case 7:
|
case 7:
|
||||||
|
// Deployment Servo
|
||||||
if (deployed == true) {
|
if (deployed == true) {
|
||||||
steering_cmpt.aux = 1000;
|
steering_cmpt.aux = 1000;
|
||||||
}
|
}
|
||||||
|
@ -150,17 +152,15 @@ servo_cmd cmpt_servo(uint16_t channels[16], int autopilot, int flight_mode, bool
|
||||||
}
|
}
|
||||||
else { steering_cmpt.aux = sw; }
|
else { steering_cmpt.aux = sw; }
|
||||||
}
|
}
|
||||||
steering_cmpt.aux_deploy = 2000;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
// Separation Servo
|
||||||
if (separation == true) {
|
if (separation == true) {
|
||||||
steering_cmpt.aux_deploy = 1000;
|
steering_cmpt.aux_deploy = 1000;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
steering_cmpt.aux_deploy = 2000;
|
steering_cmpt.aux_deploy = 2000;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
steering_cmpt.aux = aux;
|
steering_cmpt.aux = aux;
|
||||||
|
@ -172,7 +172,8 @@ servo_cmd cmpt_servo(uint16_t channels[16], int autopilot, int flight_mode, bool
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
steering_cmpt.aux = 1000;
|
steering_cmpt.aux = 1000;
|
||||||
|
steering_cmpt.aux_deploy = 2000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue