diff --git a/Makefile b/Makefile index dcb55416e..e7fb1869a 100644 --- a/Makefile +++ b/Makefile @@ -654,7 +654,7 @@ all_$(1)_clean: $$(addsuffix _clean, $$(filter bu_$(1), $$(BU_TARGETS))) all_$(1)_clean: $$(addsuffix _clean, $$(filter ef_$(1), $$(EF_TARGETS))) endef -ALL_BOARDS := coptercontrol pipxtreme revolution +ALL_BOARDS := coptercontrol pipxtreme revolution simposix # Friendly names of each board (used to find source tree) coptercontrol_friendly := CopterControl @@ -668,6 +668,12 @@ pipxtreme_short := 'pipx' revolution_short := 'revo' simposix_short := 'posx' osd_short := 'osd ' +# +# SimPosix only builds on Linux so drop it from the list for +# all other platforms. +ifneq ($(UNAME), Linux) +ALL_BOARDS := $(filter-out simposix, $(ALL_BOARDS)) +endif # Start out assuming that we'll build fw, bl and bu for all boards FW_BOARDS := $(ALL_BOARDS) diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index 1217ea99f..827b264d2 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -65,7 +65,7 @@ #define STACK_SIZE_BYTES 924 #endif -#define TASK_PRIORITY (tskIDLE_PRIORITY+2) +#define TASK_PRIORITY (tskIDLE_PRIORITY+1) // Private types diff --git a/flight/PiOS/Common/pios_flash_jedec.c b/flight/PiOS/Common/pios_flash_jedec.c index b6f1ec930..997bd5403 100644 --- a/flight/PiOS/Common/pios_flash_jedec.c +++ b/flight/PiOS/Common/pios_flash_jedec.c @@ -329,10 +329,14 @@ int32_t PIOS_Flash_Jedec_EraseChip() PIOS_Flash_Jedec_ReleaseBus(); // Keep polling when bus is busy too + int i = 0; while(PIOS_Flash_Jedec_Busy() != 0) { -#if defined(FLASH_FREERTOS) +#if defined(PIOS_INCLUDE_FREERTOS) vTaskDelay(1); #endif + if ((i++) % 100 == 0) + PIOS_LED_Toggle(PIOS_LED_HEARTBEAT); + } return 0; diff --git a/ground/openpilotgcs/src/plugins/config/configplugin.cpp b/ground/openpilotgcs/src/plugins/config/configplugin.cpp index 622b3db9b..30418094c 100644 --- a/ground/openpilotgcs/src/plugins/config/configplugin.cpp +++ b/ground/openpilotgcs/src/plugins/config/configplugin.cpp @@ -145,7 +145,7 @@ void ConfigPlugin::eraseAllSettings() // based on UAVO meta data objper->setData(data); objper->updated(); - QTimer::singleShot(6000,this,SLOT(eraseFailed())); + QTimer::singleShot(FLASH_ERASE_TIMEOUT_MS,this,SLOT(eraseFailed())); } @@ -163,7 +163,7 @@ void ConfigPlugin::eraseFailed() data.Selection = ObjectPersistence::SELECTION_ALLSETTINGS; objper->setData(data); objper->updated(); - QTimer::singleShot(1500,this,SLOT(eraseFailed())); + QTimer::singleShot(FLASH_ERASE_TIMEOUT_MS,this,SLOT(eraseFailed())); } else { disconnect(objper, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(eraseDone(UAVObject *))); QMessageBox msgBox; @@ -190,7 +190,7 @@ void ConfigPlugin::eraseDone(UAVObject * obj) if (data.Operation == ObjectPersistence::OPERATION_COMPLETED) { settingsErased = true; msgBox.setText(tr("Settings are now erased.")); - msgBox.setInformativeText(tr("Please now power-cycle your board to complete reset.")); + msgBox.setInformativeText(tr("Please wait for the status LED to begin flashing regularly (up to a minute) then power-cycle your board to complete reset.")); } else { msgBox.setText(tr("Error trying to erase settings.")); msgBox.setInformativeText(tr("Power-cycle your board after removing all blades. Settings might be inconsistent.")); diff --git a/ground/openpilotgcs/src/plugins/config/configplugin.h b/ground/openpilotgcs/src/plugins/config/configplugin.h index 7091ad460..d0d6ec09a 100644 --- a/ground/openpilotgcs/src/plugins/config/configplugin.h +++ b/ground/openpilotgcs/src/plugins/config/configplugin.h @@ -65,6 +65,8 @@ private slots: Core::Command* cmd; bool settingsErased; + static const int FLASH_ERASE_TIMEOUT_MS = 45000; + }; #endif // CONFIGPLUGIN_H