1
0
mirror of https://gitlab.com/lander-team/lander-cpp.git synced 2025-06-16 07:06:51 +00:00

wait for ignition before simulation

This commit is contained in:
Anson Biggs 2021-11-30 11:47:51 -07:00
parent e3ab9da8e9
commit 2249417045

View File

@ -230,7 +230,21 @@ void thrustInfo(Vehicle &State) {
State.burnStart = State.time;
State.burnElapsed = 0.0;
// Save load cell values before ignition
double lc_val = State.lc0_processed + State.lc1_processed +
State.lc2_processed + State.lc3_processed;
// CONTACT
Serial.println("CONTACT");
digitalWrite(pin_igniter, HIGH);
// Wait for motor to start burning
Serial.println("waiting for motor to start.");
while (lc_val * 1.5 < State.lc0_processed + State.lc1_processed +
State.lc2_processed + State.lc3_processed) {
;
}
State.thrustFiring = 1;
} else if (State.thrustFiring == 1) {