From 202437f7f6807792e25c321b2f65b9dbe4cf433a Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 20 May 2016 06:15:42 +0100 Subject: [PATCH] Correct the order of the YSF display argumemts. --- .gitignore | 2 ++ YSFControl.cpp | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 082aa4d..f1260a1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ MMDVMHost *.zip *.exe *.user +*.VC.db .vs +*.ambe diff --git a/YSFControl.cpp b/YSFControl.cpp index bcdc9b3..5bdbcbd 100644 --- a/YSFControl.cpp +++ b/YSFControl.cpp @@ -121,16 +121,16 @@ bool CYSFControl::writeModem(unsigned char *data) } if (m_rfSource != NULL && m_rfDest != NULL) { - m_display->writeFusion((char*)m_rfSource, (char*)m_rfDest, " ", "R"); + m_display->writeFusion((char*)m_rfSource, (char*)m_rfDest, "R", " "); LogMessage("YSF, received RF header from %10.10s to %10.10s", m_rfSource, m_rfDest); } else if (m_rfSource == NULL && m_rfDest != NULL) { - m_display->writeFusion("??????????", (char*)m_rfDest, " ", "R"); + m_display->writeFusion("??????????", (char*)m_rfDest, "R", " "); LogMessage("YSF, received RF header from ?????????? to %10.10s", m_rfDest); } else if (m_rfSource != NULL && m_rfDest == NULL) { - m_display->writeFusion((char*)m_rfSource, "??????????", " ", "R"); + m_display->writeFusion((char*)m_rfSource, "??????????", "R", " "); LogMessage("YSF, received RF header from %10.10s to ??????????", m_rfSource); } else { - m_display->writeFusion("??????????", "??????????", " ", "R"); + m_display->writeFusion("??????????", "??????????", "R", " "); LogMessage("YSF, received RF header from ?????????? to ??????????"); } @@ -235,15 +235,15 @@ bool CYSFControl::writeModem(unsigned char *data) if (change) { if (m_rfSource != NULL && m_rfDest != NULL) { - m_display->writeFusion((char*)m_rfSource, (char*)m_rfDest, " ", "R"); + m_display->writeFusion((char*)m_rfSource, (char*)m_rfDest, "R", " "); LogMessage("YSF, received RF data from %10.10s to %10.10s", m_rfSource, m_rfDest); } if (m_rfSource != NULL && m_rfDest == NULL) { - m_display->writeFusion((char*)m_rfSource, "??????????", " ", "R"); + m_display->writeFusion((char*)m_rfSource, "??????????", "R", " "); LogMessage("YSF, received RF data from %10.10s to ??????????", m_rfSource); } if (m_rfSource == NULL && m_rfDest != NULL) { - m_display->writeFusion("??????????", (char*)m_rfDest, " ", "R"); + m_display->writeFusion("??????????", (char*)m_rfDest, "R", " "); LogMessage("YSF, received RF data from ?????????? to %10.10s", m_rfDest); } } @@ -361,7 +361,7 @@ void CYSFControl::writeNetwork() else ::memcpy(m_netDest, "??????????", YSF_CALLSIGN_LENGTH); - m_display->writeFusion((char*)m_netSource, (char*)m_netDest, (char*)(data + 4U), "N"); + m_display->writeFusion((char*)m_netSource, (char*)m_netDest, "N", (char*)(data + 4U)); LogMessage("YSF, received network data from %10.10s to %10.10s at %10.10s", m_netSource, m_netDest, data + 4U); m_netTimeoutTimer.start(); @@ -382,7 +382,7 @@ void CYSFControl::writeNetwork() } if (changed) { - m_display->writeFusion((char*)m_netSource, (char*)m_netDest, (char*)(data + 4U), "N"); + m_display->writeFusion((char*)m_netSource, (char*)m_netDest, "N", (char*)(data + 4U)); LogMessage("YSF, received network data from %10.10s to %10.10s from %10.10s", m_netSource, m_netDest, data + 4U); } }