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 needed
main
YohanHadji 2022-04-09 12:56:11 +02:00
rodzic 9ce225c42a
commit 1f99eaeb50
3 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -95,7 +95,6 @@ void ready_steady() {
if (I_WANT_TO_FLY) { if (I_WANT_TO_FLY) {
flight_mode = 5; flight_mode = 5;
} }
} }
} }

Wyświetl plik

@ -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>

Wyświetl plik

@ -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;
} }