Skip to content

Commit

Permalink
System.c: Self test will fail if any test fails.
Browse files Browse the repository at this point in the history
Previously the system would start if only the last test passed.
All tests should always run regardless of previous tests, but system should not start up if any fail
  • Loading branch information
ToveRumar committed Apr 5, 2024
1 parent b51c835 commit 28892c7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/modules/src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,33 +222,33 @@ void systemTask(void *arg)
//Test the modules
DEBUG_PRINT("About to run tests in system.c.\n");
if (systemTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("system [FAIL]\n");
}
if (configblockTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("configblock [FAIL]\n");
}
if (storageTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("storage [FAIL]\n");
}
if (commTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("comm [FAIL]\n");
}
if (commanderTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("commander [FAIL]\n");
}
if (stabilizerTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("stabilizer [FAIL]\n");
}

#ifdef CONFIG_ESTIMATOR_KALMAN_ENABLE
if (estimatorKalmanTaskTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("estimatorKalmanTask [FAIL]\n");
}
#endif
Expand All @@ -261,31 +261,31 @@ void systemTask(void *arg)
#endif

if (deckTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("deck [FAIL]\n");
}
if (soundTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("sound [FAIL]\n");
}
if (memTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("mem [FAIL]\n");
}
if (crtpMemTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("CRTP mem [FAIL]\n");
}
if (watchdogNormalStartTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("watchdogNormalStart [FAIL]\n");
}
if (cfAssertNormalStartTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("cfAssertNormalStart [FAIL]\n");
}
if (peerLocalizationTest() == false) {
pass = false;
pass &= false;
DEBUG_PRINT("peerLocalization [FAIL]\n");
}

Expand Down

0 comments on commit 28892c7

Please sign in to comment.