From e8d8fc18062d4a539081c90b64abe74e8251a13b Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sun, 8 Jul 2018 13:18:33 +0200 Subject: [PATCH 1/4] Prevent from writing the whole font when a char is missing (i.e. special chars) --- radio/src/gui/480x272/bitmapbuffer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/480x272/bitmapbuffer.cpp b/radio/src/gui/480x272/bitmapbuffer.cpp index 204249e99..509730af4 100644 --- a/radio/src/gui/480x272/bitmapbuffer.cpp +++ b/radio/src/gui/480x272/bitmapbuffer.cpp @@ -296,7 +296,8 @@ uint8_t BitmapBuffer::drawCharWithoutCache(coord_t x, coord_t y, const uint8_t * { coord_t offset = spec[index]; coord_t width = spec[index+1] - offset; - if (width > 0) drawBitmapPattern(x, y, font, flags, offset, width); + if (width > 0) + drawBitmapPattern(x, y, font, flags, offset, width); return width; } @@ -304,7 +305,8 @@ uint8_t BitmapBuffer::drawCharWithCache(coord_t x, coord_t y, const BitmapBuffer { coord_t offset = spec[index]; coord_t width = spec[index+1] - offset; - drawBitmap(x, y, font, offset, 0, width); + if (width > 0) + drawBitmap(x, y, font, offset, 0, width); return width; } From 9904d6deb097b209dcef04546f5e5179c87090da Mon Sep 17 00:00:00 2001 From: Kilrah Date: Sun, 8 Jul 2018 15:09:50 +0200 Subject: [PATCH 2/4] Fix typo --- radio/src/pulses/pulses_arm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/pulses/pulses_arm.h b/radio/src/pulses/pulses_arm.h index 66be5bae0..53c509902 100644 --- a/radio/src/pulses/pulses_arm.h +++ b/radio/src/pulses/pulses_arm.h @@ -105,7 +105,7 @@ PACK(struct PxxUartPulsesData { #define MULTIMODULE_BAUDRATE 100000 #define MULTIMODULE_PERIOD 7 /*ms*/ -#if !defined(EXTMODULE_USART) || !defined(EXTMODULE_USART) +#if !defined(INTMODULE_USART) || !defined(EXTMODULE_USART) /* PXX uses 20 bytes (as of Rev 1.1 document) with 8 changes per byte + stop bit ~= 162 max pulses */ /* DSM2 uses 2 header + 12 channel bytes, with max 10 changes (8n2) per byte + 16 bits trailer ~= 156 max pulses */ /* Multimodule uses 3 bytes header + 22 channel bytes with max 11 changes per byte (8e2) + 16 bits trailer ~= 291 max pulses */ From 1383afb36fd5447af6235a78b07851f3c13a1324 Mon Sep 17 00:00:00 2001 From: Kilrah Date: Mon, 18 Jun 2018 09:42:38 +0200 Subject: [PATCH 3/4] Use BT detection on X-Lite too (current prod has no module, preprod has one, future batches unknown) --- radio/src/bluetooth.h | 2 +- radio/src/targets/common/arm/stm32/bluetooth_driver.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/radio/src/bluetooth.h b/radio/src/bluetooth.h index 0c3d8dddd..f0201e431 100644 --- a/radio/src/bluetooth.h +++ b/radio/src/bluetooth.h @@ -44,7 +44,7 @@ enum BluetoothStates { #define LEN_BLUETOOTH_ADDR 16 -#if defined(PCBX7) +#if (defined(PCBX7) || defined(PCBXLITE)) && !defined(SIMU) extern uint8_t btChipPresent; #define IS_BLUETOOTH_CHIP_PRESENT() (btChipPresent) #else diff --git a/radio/src/targets/common/arm/stm32/bluetooth_driver.cpp b/radio/src/targets/common/arm/stm32/bluetooth_driver.cpp index 7cbf06438..985b7b6f0 100644 --- a/radio/src/targets/common/arm/stm32/bluetooth_driver.cpp +++ b/radio/src/targets/common/arm/stm32/bluetooth_driver.cpp @@ -23,7 +23,7 @@ Fifo btTxFifo; Fifo btRxFifo; -#if defined(PCBX7) +#if defined(PCBX7) || defined(PCBXLITE) uint8_t btChipPresent = 0; #endif @@ -109,9 +109,9 @@ extern "C" void BT_USART_IRQHandler(void) USART_ClearITPendingBit(BT_USART, USART_IT_RXNE); uint8_t byte = USART_ReceiveData(BT_USART); btRxFifo.push(byte); -#if defined(PCBX7) +#if defined(PCBX7) || defined(PCBXLITE) if (!btChipPresent) { - // This is to differentiate X7 and X7S + // This is to differentiate X7 and X7S and X-Lite with/without BT btChipPresent = 1; bluetoothDone(); } From e916c6dc9a3363b61180b57ea5ed44788b1c2484 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 1 Jul 2018 13:34:40 +0200 Subject: [PATCH 4/4] fixed GPS coords precision in telemetry simulator when loaded from CSV log --- companion/src/simulation/telemetrysimu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion/src/simulation/telemetrysimu.cpp b/companion/src/simulation/telemetrysimu.cpp index 2d5d8f7a4..0c6294d9f 100644 --- a/companion/src/simulation/telemetrysimu.cpp +++ b/companion/src/simulation/telemetrysimu.cpp @@ -912,7 +912,7 @@ QString TelemetrySimulator::LogPlaybackController::convertGPS(QString input) lon = convertDegMin(lonLat[0]); lat = convertDegMin(lonLat[1]); } - return QString::number(lat) + ", " + QString::number(lon); + return QString::number(lat, 'f', 6) + ", " + QString::number(lon, 'f', 6); } void TelemetrySimulator::LogPlaybackController::updatePositionLabel(int32_t percentage)