From 8c0f05c04bd229201117d004de8a9cd464ce8806 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 22 Dec 2016 10:29:39 +0000 Subject: [PATCH 1/5] Type correction. --- RSSIInterpolator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RSSIInterpolator.cpp b/RSSIInterpolator.cpp index 3d6eb06..b277fbc 100644 --- a/RSSIInterpolator.cpp +++ b/RSSIInterpolator.cpp @@ -78,12 +78,12 @@ int CRSSIInterpolator::interpolate(uint16_t val) const if (it == m_map.begin()) return it->second; - unsigned int x2 = it->first; - int y2 = it->second; + uint16_t x2 = it->first; + int y2 = it->second; --it; - unsigned int x1 = it->first; - int y1 = it->second; + uint16_t x1 = it->first; + int y1 = it->second; float p = float(val - x1) / float(x2 - x1); From 15dd390fb5208911ead354413e5ae7e224ad29d9 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 22 Dec 2016 11:10:08 +0000 Subject: [PATCH 2/5] Small cleanup of the RSSI code. --- DMRSlot.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DMRSlot.cpp b/DMRSlot.cpp index 3afa497..26237fa 100644 --- a/DMRSlot.cpp +++ b/DMRSlot.cpp @@ -123,9 +123,13 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len) uint16_t raw = 0U; raw |= (data[35U] << 8) & 0xFF00U; raw |= (data[36U] << 0) & 0x00FFU; + + // Convert the raw RSSI to dBm int rssi = m_rssiMapper->interpolate(raw); + LogDebug("DMR Slot %u, raw RSSI: %u, reported RSSI: %d dBm", m_slotNo, raw, rssi); + + // RSSI is always reported as positive m_rssi = (rssi >= 0) ? rssi : -rssi; - LogDebug("DMR Slot %u, raw RSSI: %u, reported RSSI: -%u dBm", m_slotNo, raw, m_rssi); } bool dataSync = (data[1U] & DMR_SYNC_DATA) == DMR_SYNC_DATA; From bdb764c8e69e626eb3ac4b4bbbb26aeee455fe88 Mon Sep 17 00:00:00 2001 From: cookieBerlin Date: Mon, 26 Dec 2016 00:51:30 +0100 Subject: [PATCH 3/5] Fix README.HD44780 Backlight Power Supply see http://wiringpi.com/dev-lib/lcd-library/ or https://de.wikipedia.org/wiki/HD44780 --- README.HD44780 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.HD44780 b/README.HD44780 index 308f0ee..35c2dea 100644 --- a/README.HD44780 +++ b/README.HD44780 @@ -32,8 +32,8 @@ The wiring ist as follows: D5 12 -------- 12 GPIO1 (1) D6 13 -------- 13 GPIO2 (2) D7 14 -------- 15 GPIO3 (3) - GND 15 -------- 6 GND - VCC 16 -------- 2 +5V + VCC 15 -------- 2 +5V + GND 16 -------- 6 GND The relevant part in the MMDVM.ini is like outlined below. From 781f9856bce9f73e82ab94e6566438c26e37da6f Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 28 Dec 2016 17:40:32 +0000 Subject: [PATCH 4/5] Allow for multi block non LC embedded data. --- DMREmbeddedLC.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DMREmbeddedLC.cpp b/DMREmbeddedLC.cpp index 3180923..2163bd4 100644 --- a/DMREmbeddedLC.cpp +++ b/DMREmbeddedLC.cpp @@ -30,7 +30,8 @@ CDMREmbeddedLC::CDMREmbeddedLC() : m_rawLC(NULL), m_state(LCS_NONE) { - m_rawLC = new bool[128U]; + // Allow for multi-block non embedded LC data + m_rawLC = new bool[300U]; } CDMREmbeddedLC::~CDMREmbeddedLC() From e34d83f8c2e508d312a54fda36fcfde817dc95b5 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 30 Dec 2016 11:36:53 +0000 Subject: [PATCH 5/5] Bump the version date. --- Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version.h b/Version.h index 3bce33e..7918d73 100644 --- a/Version.h +++ b/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20161124"; +const char* VERSION = "20161230"; #endif