diff --git a/flight/Modules/RadioComBridge/RadioComBridge.c b/flight/Modules/RadioComBridge/RadioComBridge.c index 54108646a..76c3040a5 100644 --- a/flight/Modules/RadioComBridge/RadioComBridge.c +++ b/flight/Modules/RadioComBridge/RadioComBridge.c @@ -278,7 +278,10 @@ static void comUAVTalkTask(void *parameters) if (PIOS_COM_UAVTALK) BufferedReadSetCom(f, PIOS_COM_UAVTALK); else + { vTaskDelay(5); + continue; + } } // Read the next byte @@ -627,7 +630,7 @@ static void transparentCommTask(void * parameters) // Receive data from the com port uint32_t cur_rx_bytes = PIOS_COM_ReceiveBuffer(PIOS_COM_TRANS_COM, p->data + p->header.data_size, - PH_MAX_DATA - p->header.data_size, timeout); + PH_MAX_DATA - p->header.data_size, timeout); // Do we have an data to send? p->header.data_size += cur_rx_bytes; @@ -657,8 +660,8 @@ static void transparentCommTask(void * parameters) // Should we send this packet? if (send_packet) { - // Transmit the packet - PHTransmitPacket(pios_packet_handler, p); + // Queue the packet for transmission. + xQueueSend(data->sendPacketQueue, &p, MAX_PORT_DELAY); // Reset the timeout timeout = MAX_PORT_DELAY; diff --git a/flight/PipXtreme/System/inc/pios_config.h b/flight/PipXtreme/System/inc/pios_config.h index 07a6f879b..39d51ef1d 100755 --- a/flight/PipXtreme/System/inc/pios_config.h +++ b/flight/PipXtreme/System/inc/pios_config.h @@ -59,7 +59,7 @@ #define PIOS_INCLUDE_GPIO #define PIOS_INCLUDE_EXTI #define PIOS_INCLUDE_RTC -//#define PIOS_INCLUDE_WDG +#define PIOS_INCLUDE_WDG #define PIOS_INCLUDE_BL_HELPER #define PIOS_INCLUDE_FLASH_EEPROM diff --git a/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp b/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp index b782eafb3..a5e934c99 100644 --- a/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp @@ -137,7 +137,7 @@ void ConfigPipXtremeWidget::updateStatus(UAVObject *object) { // Restart the disconnection timer. - timeOut->start(5000); + timeOut->start(10000); // Request and update of the setting object if we haven't received it yet. if (!settingsUpdated) @@ -260,7 +260,6 @@ void ConfigPipXtremeWidget::disconnected() void ConfigPipXtremeWidget::pairIDToggled(bool checked, quint8 idx) { - qDebug() << "Toggled"; if(checked) { PipXStatus *pipxStatus = PipXStatus::GetInstance(getObjectManager()); diff --git a/make/firmware-defs.mk b/make/firmware-defs.mk index 087792b45..b22a66639 100644 --- a/make/firmware-defs.mk +++ b/make/firmware-defs.mk @@ -49,8 +49,6 @@ MSG_OPFIRMWARE := ${quote} OPFW ${quote} MSG_FWINFO := ${quote} FWINFO ${quote} MSG_JTAG_PROGRAM := ${quote} JTAG-PGM ${quote} MSG_JTAG_WIPE := ${quote} JTAG-WIPE ${quote} -MSG_JTAG_RESET := ${quote} JTAG-RST ${quote} -MSG_JTAG_SAFEBOOT := ${quote} JTAG-SAFE ${quote} toprel = $(subst $(realpath $(TOP))/,,$(abspath $(1))) @@ -203,8 +201,7 @@ endef # $(1) = Name of binary image to write # $(2) = Base of flash region to write/wipe # $(3) = Size of flash region to write/wipe -# $(4) = OpenOCD JTAG interface configuration file to use -# $(5) = OpenOCD configuration file to use +# $(4) = OpenOCD configuration file to use define JTAG_TEMPLATE # --------------------------------------------------------------------------- # Options for OpenOCD flash-programming @@ -217,7 +214,7 @@ OOCD_EXE ?= openocd OOCD_JTAG_SETUP = -d0 # interface and board/target settings (using the OOCD target-library here) OOCD_JTAG_SETUP += -s $(TOP)/flight/Project/OpenOCD -OOCD_JTAG_SETUP += -f $(4) -f $(5) +OOCD_JTAG_SETUP += -f foss-jtag.revb.cfg -f $(4) # initialize OOCD_BOARD_RESET = -c init @@ -246,34 +243,5 @@ wipe: -c "flash erase_address pad $(2) $(3)" \ -c "reset run" \ -c "shutdown" - -reset: - @echo $(MSG_JTAG_RESET) resetting device - $(V1) $(OOCD_EXE) \ - $$(OOCD_JTAG_SETUP) \ - $$(OOCD_BOARD_RESET) \ - -c "reset run" \ - -c "shutdown" - -# Enable PWR and BKP clocks (set RCC_APB1ENR[PWREN|BKPEN]) -OOCD_WRITE_BKPDR3 = -c "mww 0x4002101C 0x18000000" -# Enable writes to BKP registers (set PWR_CR[DBP] via bit op alias address) -# -# Direct register access would be: -# mww 0x40007000 0x00000100 -# -# Direct _bit_ access is: -# Bit 8 in 0x40007000 = 0x42000000 + 0x7000 * 32 + 8 * 4 = 420E0020 -OOCD_WRITE_BKPDR3 += -c "mww 0x420E0020 0x00000001" -# Set BR3 to max value to force a safe boot -OOCD_WRITE_BKPDR3 += -c "mwh 0x40006C0C 0xFFFF" -safeboot: - @echo $(MSG_JTAG_SAFEBOOT) forcing boot into safe mode - $(V1) $(OOCD_EXE) \ - $$(OOCD_JTAG_SETUP) \ - $$(OOCD_BOARD_RESET) \ - $$(OOCD_WRITE_BKPDR3) \ - -c "reset run" \ - -c "shutdown" endef