diff --git a/CalRSSI.cpp b/CalRSSI.cpp
index 4703bea..175975f 100644
--- a/CalRSSI.cpp
+++ b/CalRSSI.cpp
@@ -24,8 +24,8 @@
CCalRSSI::CCalRSSI() :
m_count(0U),
m_accum(0U),
-m_min(0xFFFFFFU),
-m_max(0x000000U)
+m_min(0xFFFFU),
+m_max(0x0000U)
{
}
@@ -57,8 +57,8 @@ void CCalRSSI::samples(const uint16_t* rssi, uint8_t length)
m_count = 0U;
m_accum = 0U;
- m_min = 0xFFFFFFU;
- m_max = 0x000000U;
+ m_min = 0xFFFFU;
+ m_max = 0x0000U;
}
}
}
diff --git a/DMRDMORX.cpp b/DMRDMORX.cpp
index 506e3f6..1dab3dd 100644
--- a/DMRDMORX.cpp
+++ b/DMRDMORX.cpp
@@ -88,8 +88,6 @@ void CDMRDMORX::samples(const q15_t* samples, const uint16_t* rssi, uint8_t leng
bool CDMRDMORX::processSample(q15_t sample, uint16_t rssi)
{
- uint16_t rssi_avg;
-
m_buffer[m_dataPtr] = sample;
m_rssi[m_dataPtr] = rssi;
@@ -194,7 +192,7 @@ bool CDMRDMORX::processSample(q15_t sample, uint16_t rssi)
// Send RSSI data approximately every second
if (m_rssiCount == 2U) {
// Calculate RSSI average over a burst period. We don't take into account 2.5 ms at the beginning and 2.5 ms at the end
- rssi_avg = avgRSSI(m_startPtr + DMR_SYNC_LENGTH_SAMPLES / 2U, DMR_FRAME_LENGTH_SAMPLES - DMR_SYNC_LENGTH_SAMPLES);
+ uint16_t rssi_avg = avgRSSI(m_startPtr + DMR_SYNC_LENGTH_SAMPLES / 2U, DMR_FRAME_LENGTH_SAMPLES - DMR_SYNC_LENGTH_SAMPLES);
frame[34U] = (rssi_avg >> 8) & 0xFFU;
frame[35U] = (rssi_avg >> 0) & 0xFFU;
serial.writeDMRData(true, frame, DMR_FRAME_LENGTH_BYTES + 3U);
diff --git a/DMRSlotRX.cpp b/DMRSlotRX.cpp
index 944d072..d126ab1 100644
--- a/DMRSlotRX.cpp
+++ b/DMRSlotRX.cpp
@@ -96,8 +96,6 @@ void CDMRSlotRX::reset()
bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
{
- uint16_t rssi_avg;
-
m_delayPtr++;
if (m_delayPtr < m_delay)
return m_state != DMRRXS_NONE;
@@ -199,7 +197,7 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
// Send RSSI data approximately every second
if (m_rssiCount == 2U) {
// Calculate RSSI average over a burst period. We don't take into account 2.5 ms at the beginning and 2.5 ms at the end
- rssi_avg = avgRSSI(m_startPtr + DMR_SYNC_LENGTH_SAMPLES / 2U, DMR_FRAME_LENGTH_SAMPLES - DMR_SYNC_LENGTH_SAMPLES);
+ uint16_t rssi_avg = avgRSSI(m_startPtr + DMR_SYNC_LENGTH_SAMPLES / 2U, DMR_FRAME_LENGTH_SAMPLES - DMR_SYNC_LENGTH_SAMPLES);
frame[34U] = (rssi_avg >> 8) & 0xFFU;
frame[35U] = (rssi_avg >> 0) & 0xFFU;
serial.writeDMRData(m_slot, frame, DMR_FRAME_LENGTH_BYTES + 3U);
diff --git a/MMDVM_STM32F4xx.coproj b/MMDVM_STM32F4xx.coproj
index 30657cc..ccb0fbd 100644
--- a/MMDVM_STM32F4xx.coproj
+++ b/MMDVM_STM32F4xx.coproj
@@ -239,6 +239,7 @@
+
@@ -261,6 +262,7 @@
+