1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00

Merge remote-tracking branch 'origin/Brian-PipXtreme-V2' into Brian-PipXtreme-V2

This commit is contained in:
Brian Webb 2012-05-16 19:36:49 -07:00
commit 04e7fef801
4 changed files with 10 additions and 40 deletions

View File

@ -278,7 +278,10 @@ static void comUAVTalkTask(void *parameters)
if (PIOS_COM_UAVTALK) if (PIOS_COM_UAVTALK)
BufferedReadSetCom(f, PIOS_COM_UAVTALK); BufferedReadSetCom(f, PIOS_COM_UAVTALK);
else else
{
vTaskDelay(5); vTaskDelay(5);
continue;
}
} }
// Read the next byte // Read the next byte
@ -627,7 +630,7 @@ static void transparentCommTask(void * parameters)
// Receive data from the com port // Receive data from the com port
uint32_t cur_rx_bytes = PIOS_COM_ReceiveBuffer(PIOS_COM_TRANS_COM, p->data + p->header.data_size, 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? // Do we have an data to send?
p->header.data_size += cur_rx_bytes; p->header.data_size += cur_rx_bytes;
@ -657,8 +660,8 @@ static void transparentCommTask(void * parameters)
// Should we send this packet? // Should we send this packet?
if (send_packet) if (send_packet)
{ {
// Transmit the packet // Queue the packet for transmission.
PHTransmitPacket(pios_packet_handler, p); xQueueSend(data->sendPacketQueue, &p, MAX_PORT_DELAY);
// Reset the timeout // Reset the timeout
timeout = MAX_PORT_DELAY; timeout = MAX_PORT_DELAY;

View File

@ -59,7 +59,7 @@
#define PIOS_INCLUDE_GPIO #define PIOS_INCLUDE_GPIO
#define PIOS_INCLUDE_EXTI #define PIOS_INCLUDE_EXTI
#define PIOS_INCLUDE_RTC #define PIOS_INCLUDE_RTC
//#define PIOS_INCLUDE_WDG #define PIOS_INCLUDE_WDG
#define PIOS_INCLUDE_BL_HELPER #define PIOS_INCLUDE_BL_HELPER
#define PIOS_INCLUDE_FLASH_EEPROM #define PIOS_INCLUDE_FLASH_EEPROM

View File

@ -137,7 +137,7 @@ void ConfigPipXtremeWidget::updateStatus(UAVObject *object)
{ {
// Restart the disconnection timer. // Restart the disconnection timer.
timeOut->start(5000); timeOut->start(10000);
// Request and update of the setting object if we haven't received it yet. // Request and update of the setting object if we haven't received it yet.
if (!settingsUpdated) if (!settingsUpdated)
@ -260,7 +260,6 @@ void ConfigPipXtremeWidget::disconnected()
void ConfigPipXtremeWidget::pairIDToggled(bool checked, quint8 idx) void ConfigPipXtremeWidget::pairIDToggled(bool checked, quint8 idx)
{ {
qDebug() << "Toggled";
if(checked) if(checked)
{ {
PipXStatus *pipxStatus = PipXStatus::GetInstance(getObjectManager()); PipXStatus *pipxStatus = PipXStatus::GetInstance(getObjectManager());

View File

@ -49,8 +49,6 @@ MSG_OPFIRMWARE := ${quote} OPFW ${quote}
MSG_FWINFO := ${quote} FWINFO ${quote} MSG_FWINFO := ${quote} FWINFO ${quote}
MSG_JTAG_PROGRAM := ${quote} JTAG-PGM ${quote} MSG_JTAG_PROGRAM := ${quote} JTAG-PGM ${quote}
MSG_JTAG_WIPE := ${quote} JTAG-WIPE ${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))) toprel = $(subst $(realpath $(TOP))/,,$(abspath $(1)))
@ -203,8 +201,7 @@ endef
# $(1) = Name of binary image to write # $(1) = Name of binary image to write
# $(2) = Base of flash region to write/wipe # $(2) = Base of flash region to write/wipe
# $(3) = Size of flash region to write/wipe # $(3) = Size of flash region to write/wipe
# $(4) = OpenOCD JTAG interface configuration file to use # $(4) = OpenOCD configuration file to use
# $(5) = OpenOCD configuration file to use
define JTAG_TEMPLATE define JTAG_TEMPLATE
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Options for OpenOCD flash-programming # Options for OpenOCD flash-programming
@ -217,7 +214,7 @@ OOCD_EXE ?= openocd
OOCD_JTAG_SETUP = -d0 OOCD_JTAG_SETUP = -d0
# interface and board/target settings (using the OOCD target-library here) # interface and board/target settings (using the OOCD target-library here)
OOCD_JTAG_SETUP += -s $(TOP)/flight/Project/OpenOCD 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 # initialize
OOCD_BOARD_RESET = -c init OOCD_BOARD_RESET = -c init
@ -246,34 +243,5 @@ wipe:
-c "flash erase_address pad $(2) $(3)" \ -c "flash erase_address pad $(2) $(3)" \
-c "reset run" \ -c "reset run" \
-c "shutdown" -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 endef