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

Merge branch 'main' into '27-fix-simulation-on-teensy'

# Conflicts:
#   src/main.cpp
This commit is contained in:
Brendan McGeeney 2021-11-12 19:23:05 +00:00
commit 1e4ee942e2
2 changed files with 9 additions and 6 deletions

View File

@ -214,5 +214,9 @@ void closeFile() {
void teensyAbort() { void teensyAbort() {
while (1) { while (1) {
digitalWrite(BUILTIN_LED, HIGH);
delay(1000);
digitalWrite(BUILTIN_LED, LOW);
delay(1000);
} }
} }

View File

@ -11,6 +11,7 @@
#elif defined(TEENSY) #elif defined(TEENSY)
#include <Arduino.h> #include <Arduino.h>
int BUILTIN_LED = 13;
unsigned long last; unsigned long last;
#endif #endif
@ -90,16 +91,14 @@ void loop() {
if ((State.z < 0.0) && (State.thrustFiring == 2)) { if ((State.z < 0.0) && (State.thrustFiring == 2)) {
printSimResults(State); printSimResults(State);
init_Vehicle(State); Serial.println("Run duration:" + String(millis() - last) + " ms");
delay(1000);
Serial.println("Last run duration:" + String(millis() - last) + " ms");
closeFile(); closeFile();
delay(20000); delay(20000);
Serial.println("Restarting Sim"); Serial.println("SUCCESS");
Serial.println( Serial.println("Aborting Sim");
"==============================================================="); teensyAbort();
} }
} }
#endif #endif