Skip to content

Commit

Permalink
Fix LCDProc and buffer sizes for the Nextion. Thanks to Tony G0WFV.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed Feb 6, 2018
1 parent f29c2a9 commit ddb3206
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions LCDproc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016, 2017 by Tony Corbett G0WFV
* Copyright (C) 2016, 2017, 2018 by Tony Corbett G0WFV
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -453,7 +453,7 @@ void CLCDproc::clearP25Int()
{
m_clockDisplayTimer.stop(); // Stop the clock display

socketPrintf(m_socketfd, "widget_set P25 Line3 1 2 15 2 h 3 Listening");
socketPrintf(m_socketfd, "widget_set P25 Line2 1 2 15 2 h 3 Listening");
socketPrintf(m_socketfd, "widget_set P25 Line3 1 3 15 3 h 3 \"\"");
socketPrintf(m_socketfd, "widget_set P25 Line4 1 4 15 4 h 3 \"\"");
socketPrintf(m_socketfd, "output 2"); // Set LED2 color green
Expand Down
20 changes: 10 additions & 10 deletions Nextion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void CNextion::writeDStarRSSIInt(unsigned char rssi)
m_rssiCount1++;

if (m_rssiCount1 == DSTAR_RSSI_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / DSTAR_RSSI_COUNT);
sendCommand(text);
sendCommandAction(47U);
Expand All @@ -224,7 +224,7 @@ void CNextion::writeDStarBERInt(float ber)
m_berCount1++;

if (m_berCount1 == DSTAR_BER_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(DSTAR_BER_COUNT));
sendCommand(text);
sendCommandAction(48U);
Expand Down Expand Up @@ -325,7 +325,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
m_rssiCount1++;

if (m_rssiCount1 == DMR_RSSI_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t4.txt=\"-%udBm\"", m_rssiAccum1 / DMR_RSSI_COUNT);
sendCommand(text);
sendCommandAction(66U);
Expand All @@ -337,7 +337,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
m_rssiCount2++;

if (m_rssiCount2 == DMR_RSSI_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t5.txt=\"-%udBm\"", m_rssiAccum2 / DMR_RSSI_COUNT);
sendCommand(text);
sendCommandAction(74U);
Expand Down Expand Up @@ -407,7 +407,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
m_berCount1++;

if (m_berCount1 == DMR_BER_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t6.txt=\"%.1f%%\"", m_berAccum1 / DMR_BER_COUNT);
sendCommand(text);
sendCommandAction(67U);
Expand All @@ -419,7 +419,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
m_berCount2++;

if (m_berCount2 == DMR_BER_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t7.txt=\"%.1f%%\"", m_berAccum2 / DMR_BER_COUNT);
sendCommand(text);
sendCommandAction(75U);
Expand Down Expand Up @@ -503,7 +503,7 @@ void CNextion::writeFusionRSSIInt(unsigned char rssi)
m_rssiCount1++;

if (m_rssiCount1 == YSF_RSSI_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / YSF_RSSI_COUNT);
sendCommand(text);
sendCommandAction(85U);
Expand All @@ -518,7 +518,7 @@ void CNextion::writeFusionBERInt(float ber)
m_berCount1++;

if (m_berCount1 == YSF_BER_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(YSF_BER_COUNT));
sendCommand(text);
sendCommandAction(86U);
Expand Down Expand Up @@ -574,7 +574,7 @@ void CNextion::writeP25RSSIInt(unsigned char rssi)
m_rssiCount1++;

if (m_rssiCount1 == P25_RSSI_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t2.txt=\"-%udBm\"", m_rssiAccum1 / P25_RSSI_COUNT);
sendCommand(text);
sendCommandAction(104U);
Expand All @@ -589,7 +589,7 @@ void CNextion::writeP25BERInt(float ber)
m_berCount1++;

if (m_berCount1 == P25_BER_COUNT) {
char text[20U];
char text[25U];
::sprintf(text, "t3.txt=\"%.1f%%\"", m_berAccum1 / float(P25_BER_COUNT));
sendCommand(text);
sendCommandAction(105U);
Expand Down

0 comments on commit ddb3206

Please sign in to comment.