From 2ff0e52558d4a8a4288bc294b999dc0b3dbf162c Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 25 Oct 2020 12:48:23 +0000 Subject: [PATCH] Add M17 BER debug info. --- M17Control.cpp | 6 +++++- Version.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/M17Control.cpp b/M17Control.cpp index 90dbfad..058cb22 100644 --- a/M17Control.cpp +++ b/M17Control.cpp @@ -400,10 +400,14 @@ bool CM17Control::writeModem(unsigned char* data, unsigned int len) // Calculate the BER if (valid) { + unsigned int errors = 0U; for (unsigned int i = 2U; i < (M17_FRAME_LENGTH_BYTES + 2U); i++) - m_rfErrs += countBits(rfData[i] ^ data[i]); + errors += countBits(rfData[i] ^ data[i]); + + LogDebug("M17, FN. %u, errs: %u/384 (%.1f%%)", m_rfFN, errors, float(errors) / 3.84F); m_rfBits += M17_FRAME_LENGTH_BITS; + m_rfErrs += errors; float ber = float(m_rfErrs) / float(m_rfBits); m_display->writeM17BER(ber); diff --git a/Version.h b/Version.h index 7335272..92f4910 100644 --- a/Version.h +++ b/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20201021"; +const char* VERSION = "20201025"; #endif