Skip to content

Commit

Permalink
Add status messages in stabilizer for sensor calibration
Browse files Browse the repository at this point in the history
This helps debug cases where the CF is not taking off, because
the sensors were not (yet) successfully calibrated without the need
of analyzing the blinking pattern of the LEDs.
  • Loading branch information
whoenig committed Mar 25, 2019
1 parent 76251a2 commit 262fff1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/src/stabilizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ static void stabilizerTask(void* param)
//Wait for the system to be fully started to start stabilization loop
systemWaitStart();

DEBUG_PRINT("Wait for sensor calibration...\n");

// Wait for sensors to be calibrated
lastWakeTime = xTaskGetTickCount ();
while(!sensorsAreCalibrated()) {
Expand All @@ -149,6 +151,8 @@ static void stabilizerTask(void* param)
// Initialize tick to something else then 0
tick = 1;

DEBUG_PRINT("Ready to fly.\n");

while(1) {
// The sensor should unlock at 1kHz
sensorsWaitDataReady();
Expand Down

0 comments on commit 262fff1

Please sign in to comment.