mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 07:06:51 +00:00
Merge branch '26-simulation-abort-indication' into 'main'
Resolve "Simulation Abort Indication" Closes #26 See merge request lander-team/lander-cpp!22
This commit is contained in:
commit
851edaa361
@ -232,5 +232,9 @@ void closeFile() {
|
||||
|
||||
void teensyAbort() {
|
||||
while (1) {
|
||||
digitalWrite(BUILTIN_LED, HIGH);
|
||||
delay(1000);
|
||||
digitalWrite(BUILTIN_LED, LOW);
|
||||
delay(1000);
|
||||
}
|
||||
}
|
14
src/main.cpp
14
src/main.cpp
@ -11,6 +11,7 @@
|
||||
#elif defined(TEENSY)
|
||||
#include <Arduino.h>
|
||||
|
||||
int BUILTIN_LED = 13;
|
||||
unsigned long last;
|
||||
#endif
|
||||
|
||||
@ -36,6 +37,8 @@ void setup() {
|
||||
}
|
||||
#elif defined(TEENSY)
|
||||
void setup() {
|
||||
pinMode(BUILTIN_LED, OUTPUT);
|
||||
digitalWrite(BUILTIN_LED, HIGH);
|
||||
delay(1000);
|
||||
init_Vehicle(State);
|
||||
Serial.println("Simulated Vehicle Initalized");
|
||||
@ -91,16 +94,13 @@ void loop() {
|
||||
|
||||
if (State.z < 0.0) {
|
||||
printSimResults(State);
|
||||
init_Vehicle(State);
|
||||
delay(1000);
|
||||
Serial.println("Last run duration:" + String(millis() - last) + " ms");
|
||||
Serial.println("Run duration:" + String(millis() - last) + " ms");
|
||||
|
||||
closeFile();
|
||||
delay(10000);
|
||||
|
||||
Serial.println("Restarting Sim");
|
||||
Serial.println(
|
||||
"===============================================================");
|
||||
Serial.println("SUCCESS");
|
||||
Serial.println("Aborting Sim");
|
||||
teensyAbort();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user