From 3ff965a0c0a9f9a1cc3ed5bbe110f51691179d7f Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 2 Nov 2016 15:34:00 -0200 Subject: [PATCH] DataFlash: remove infinite loop from loop() method Remove the while() loop inside loop() method so the new signal handlers correctly notify the mainloop to exit. This makes SIGTERM/SIGINT work again. --- .../examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp b/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp index 9c5b8faeb9..60bab9ffd5 100644 --- a/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp +++ b/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp @@ -202,10 +202,8 @@ void DataFlashTest_AllTypes::setup(void) void DataFlashTest_AllTypes::loop(void) { - while (true) { - hal.console->printf("all done\n"); - hal.scheduler->delay(1000); - } + hal.console->printf("all done\n"); + hal.scheduler->delay(1000); } static DataFlashTest_AllTypes dataflashtest;