From 262fff1031dd85d3b40eb8bc4d446359a5d30d92 Mon Sep 17 00:00:00 2001 From: Wolfgang Hoenig Date: Mon, 25 Mar 2019 13:30:18 -0700 Subject: [PATCH] Add status messages in stabilizer for sensor calibration 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. --- src/modules/src/stabilizer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/src/stabilizer.c b/src/modules/src/stabilizer.c index 28d42ef260..6963c774fa 100644 --- a/src/modules/src/stabilizer.c +++ b/src/modules/src/stabilizer.c @@ -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()) { @@ -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();