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() 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; 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. 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); 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