mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 07:06:51 +00:00
Merge branch '31-avionics-integration-test' of gitlab.com:lander-team/lander-cpp into 31-avionics-integration-test
This commit is contained in:
commit
62d8a37517
@ -80,7 +80,7 @@ void init_Vehicle(Vehicle &State) {
|
|||||||
State.momentArm = 0.145; // [m]
|
State.momentArm = 0.145; // [m]
|
||||||
|
|
||||||
// Sim Step Size
|
// Sim Step Size
|
||||||
State.stepSize = 20.0; // [ms]
|
State.stepSize = 5.0; // [ms]
|
||||||
|
|
||||||
// Other Properties
|
// Other Properties
|
||||||
State.massPropellant = 0.06; // [kg]
|
State.massPropellant = 0.06; // [kg]
|
||||||
|
@ -18,7 +18,6 @@ File dataFile;
|
|||||||
|
|
||||||
void testGimbal(PWMServo &servo1, PWMServo &servo2) {
|
void testGimbal(PWMServo &servo1, PWMServo &servo2) {
|
||||||
int servoTest = 0;
|
int servoTest = 0;
|
||||||
;
|
|
||||||
|
|
||||||
servo1.write(servoTest);
|
servo1.write(servoTest);
|
||||||
servo2.write(servoTest);
|
servo2.write(servoTest);
|
||||||
@ -45,6 +44,20 @@ void testGimbal(PWMServo &servo1, PWMServo &servo2) {
|
|||||||
delay(30);
|
delay(30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delay(1000);
|
||||||
|
|
||||||
|
// Servo 1 & 2 Test
|
||||||
|
for (servoTest = 0; servoTest < 7; servoTest += 1) {
|
||||||
|
servo1.write(servoTest);
|
||||||
|
servo2.write(servoTest);
|
||||||
|
delay(30);
|
||||||
|
}
|
||||||
|
for (servoTest = 7; servoTest >= 1; servoTest -= 1) {
|
||||||
|
servo1.write(servoTest);
|
||||||
|
servo2.write(servoTest);
|
||||||
|
delay(30);
|
||||||
|
}
|
||||||
|
|
||||||
delay(30);
|
delay(30);
|
||||||
servo1.write(0);
|
servo1.write(0);
|
||||||
servo2.write(0);
|
servo2.write(0);
|
||||||
|
@ -105,17 +105,18 @@ void loop() {
|
|||||||
|
|
||||||
if ((State.z < 0.0) && (State.thrustFiring == 2)) {
|
if ((State.z < 0.0) && (State.thrustFiring == 2)) {
|
||||||
printSimResults(State);
|
printSimResults(State);
|
||||||
Serial.println("Run duration:" + String(micros() - initTime) + " us");
|
Serial.println("Run duration:" + String((micros() - initTime) / 1000000.0) +
|
||||||
|
" seconds");
|
||||||
|
|
||||||
closeFile();
|
closeFile();
|
||||||
delay(3000);
|
delay(3000);
|
||||||
|
|
||||||
Serial.println("SUCCESS");
|
Serial.println("SUCCESS");
|
||||||
Serial.println("Aborting Sim");
|
Serial.println("Exiting Sim");
|
||||||
teensyAbort();
|
teensyAbort();
|
||||||
}
|
}
|
||||||
|
|
||||||
delay(20.0 - ((micros() - last) / 1000.0));
|
delay(State.stepSize - ((micros() - last) / 1000.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_loadCells() {
|
void init_loadCells() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user