mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-07-23 22:51:26 +00:00
donezo
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user