mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 15:17:23 +00:00
wait for ignition before simulation
This commit is contained in:
parent
e3ab9da8e9
commit
2249417045
@ -230,7 +230,21 @@ void thrustInfo(Vehicle &State) {
|
|||||||
State.burnStart = State.time;
|
State.burnStart = State.time;
|
||||||
State.burnElapsed = 0.0;
|
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);
|
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;
|
State.thrustFiring = 1;
|
||||||
|
|
||||||
} else if (State.thrustFiring == 1) {
|
} else if (State.thrustFiring == 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user