From 7352dc6f2ee81c010a6f0758105dcfdb03ba2abf Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 5 Apr 2016 12:34:40 +0200 Subject: [PATCH] commander: workaround to wait 1s before param save Without this wait, we end up saving the old parameters on Snapdragon. --- src/modules/commander/commander.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 224b0cf75f..b82f022130 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -3621,6 +3621,12 @@ void *commander_low_prio_loop(void *arg) } else if (((int)(cmd.param1)) == 1) { +#ifdef __PX4_QURT + // TODO FIXME: on snapdragon the save happens to early when the params + // are not set yet. We therefore need to wait some time first. + usleep(1000000); +#endif + int ret = param_save_default(); if (ret == OK) {