From 88683a4da3c9b29a4643d69563ee84a4537f4a78 Mon Sep 17 00:00:00 2001 From: JOhn Aughey Date: Wed, 4 May 2016 17:56:58 -0500 Subject: [PATCH 1/2] Setting gyro scale for fake sensors. --- src/main/sensors/initialisation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/sensors/initialisation.c b/src/main/sensors/initialisation.c index 85b5ebb307..7e05f9688a 100755 --- a/src/main/sensors/initialisation.c +++ b/src/main/sensors/initialisation.c @@ -240,6 +240,7 @@ bool fakeGyroDetect(gyro_t *gyro) gyro->init = fakeGyroInit; gyro->read = fakeGyroRead; gyro->temperature = fakeGyroReadTemp; + gyro->scale = 1.0f / 16.4f; return true; } #endif From f46f50c223d80d19818e493b37314047431d548c Mon Sep 17 00:00:00 2001 From: JOhn Aughey Date: Fri, 6 May 2016 10:40:17 -0500 Subject: [PATCH 2/2] Before resetting, clear the reboot schedule flag. --- src/main/io/serial_msp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index d44dc8e9aa..72a47a163d 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -1861,6 +1861,10 @@ void mspProcess(void) waitForSerialPortToFinishTransmitting(candidatePort->port); stopMotors(); handleOneshotFeatureChangeOnRestart(); + // On real flight controllers, systemReset() will do a soft reset of the device, + // reloading the program. But to support offline testing this flag needs to be + // cleared so that the software doesn't continuously attempt to reboot itself. + isRebootScheduled = false; systemReset(); } }