mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 16:55:52 +08:00
Added Layout 3 & 4, displaying GPS data, README files and HMI examples
This commit is contained in:
178
Nextion.cpp
178
Nextion.cpp
@@ -84,6 +84,7 @@ bool CNextion::open()
|
||||
m_ipaddress = (char*)info;
|
||||
|
||||
sendCommand("bkcmd=0");
|
||||
sendCommandAction(0,0);
|
||||
|
||||
setIdle();
|
||||
|
||||
@@ -94,6 +95,7 @@ bool CNextion::open()
|
||||
void CNextion::setIdleInt()
|
||||
{
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
|
||||
char command[30U];
|
||||
::sprintf(command, "dim=%u", m_idleBrightness);
|
||||
@@ -101,14 +103,14 @@ void CNextion::setIdleInt()
|
||||
|
||||
::sprintf(command, "t0.txt=\"%s/%u\"", m_callsign.c_str(), m_dmrid);
|
||||
sendCommand(command);
|
||||
sendCommandAction(0,0);
|
||||
sendCommandAction(0,17U);
|
||||
|
||||
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
||||
sendCommandAction(1U,1U);
|
||||
sendCommandAction(1U,11U);
|
||||
|
||||
::sprintf(command, "t3.txt=\"%s\"", m_ipaddress.c_str());
|
||||
sendCommand(command);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,16U);
|
||||
|
||||
m_clockDisplayTimer.start();
|
||||
|
||||
@@ -120,17 +122,18 @@ void CNextion::setErrorInt(const char* text)
|
||||
assert(text != NULL);
|
||||
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
|
||||
char command[20];
|
||||
::sprintf(command, "dim=%u", m_brightness);
|
||||
sendCommand(command);
|
||||
|
||||
::sprintf(command, "t0.txt=\"%s\"", text);
|
||||
sendCommandAction(0,0);
|
||||
sendCommandAction(0,13U);
|
||||
|
||||
sendCommand(command);
|
||||
sendCommand("t1.txt=\"ERROR\"");
|
||||
sendCommandAction(1U,3U);
|
||||
sendCommandAction(1U,14U);
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
|
||||
@@ -140,13 +143,14 @@ void CNextion::setErrorInt(const char* text)
|
||||
void CNextion::setLockoutInt()
|
||||
{
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
|
||||
char command[20];
|
||||
::sprintf(command, "dim=%u", m_brightness);
|
||||
sendCommand(command);
|
||||
|
||||
sendCommand("t0.txt=\"LOCKOUT\"");
|
||||
sendCommandAction(0,4U);
|
||||
sendCommandAction(0,15U);
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
|
||||
@@ -161,8 +165,10 @@ void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your,
|
||||
assert(type != NULL);
|
||||
assert(reflector != NULL);
|
||||
|
||||
if (m_mode != MODE_DSTAR)
|
||||
if (m_mode != MODE_DSTAR) {
|
||||
sendCommand("page DStar");
|
||||
sendCommandAction(0,2U);
|
||||
}
|
||||
|
||||
char text[30U];
|
||||
::sprintf(text, "dim=%u", m_brightness);
|
||||
@@ -170,16 +176,16 @@ void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your,
|
||||
|
||||
::sprintf(text, "t0.txt=\"%s %.8s/%4.4s\"", type, my1, my2);
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,0);
|
||||
sendCommandAction(0,22U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%.8s\"", your);
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,0);
|
||||
sendCommandAction(1U,23U);
|
||||
|
||||
if (::strcmp(reflector, " ") != 0) {
|
||||
::sprintf(text, "t2.txt=\"via %.8s\"", reflector);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,0);
|
||||
sendCommandAction(2U,24U);
|
||||
}
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
@@ -197,7 +203,7 @@ void CNextion::writeDStarRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,25U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -209,7 +215,7 @@ void CNextion::writeDStarRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / DSTAR_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,25U);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -221,7 +227,7 @@ void CNextion::writeDStarBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,0);
|
||||
sendCommandAction(4U,26U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -233,7 +239,7 @@ void CNextion::writeDStarBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(DSTAR_BER_COUNT));
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,0);
|
||||
sendCommandAction(4U,26U);
|
||||
m_berAccum1 = 0.0F;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -242,7 +248,7 @@ void CNextion::writeDStarBERInt(float ber)
|
||||
void CNextion::clearDStarInt()
|
||||
{
|
||||
sendCommand("t0.txt=\"Listening\"");
|
||||
sendCommandAction(0,11U);
|
||||
sendCommandAction(0,21U);
|
||||
sendCommand("t1.txt=\"\"");
|
||||
sendCommand("t2.txt=\"\"");
|
||||
sendCommand("t3.txt=\"\"");
|
||||
@@ -255,6 +261,8 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
|
||||
if (m_mode != MODE_DMR) {
|
||||
sendCommand("page DMR");
|
||||
sendCommandAction(0,3U);
|
||||
|
||||
|
||||
if (slotNo == 1U) {
|
||||
if (m_screenLayout == 2U) {
|
||||
@@ -263,7 +271,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand("t2.txt=\"2 Listening\"");
|
||||
sendCommandAction(2U,11U);
|
||||
sendCommandAction(2U,31U);
|
||||
} else {
|
||||
if (m_screenLayout == 2U) {
|
||||
sendCommand("t0.pco=0");
|
||||
@@ -271,7 +279,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand("t0.txt=\"1 Listening\"");
|
||||
sendCommandAction(0,11U);
|
||||
sendCommandAction(0,31U);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,11 +296,11 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,12U);
|
||||
sendCommandAction(0,32U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,0);
|
||||
sendCommandAction(1U,36U);
|
||||
} else {
|
||||
::sprintf(text, "t2.txt=\"2 %s %s\"", type, src.c_str());
|
||||
|
||||
@@ -302,11 +310,11 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,12U);
|
||||
sendCommandAction(2U,32U);
|
||||
|
||||
::sprintf(text, "t3.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,36U);
|
||||
}
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
@@ -329,7 +337,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,0);
|
||||
sendCommandAction(4U,37U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -341,7 +349,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"-%udBm\"", m_rssiAccum1 / DMR_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,0);
|
||||
sendCommandAction(4U,37U);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -349,7 +357,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
|
||||
if (m_rssiCount2 == 0U) {
|
||||
char text[20U];
|
||||
::sprintf(text, "t5.txt=\"-%udBm\"", rssi);
|
||||
sendCommandAction(5U,0);
|
||||
sendCommandAction(5U,37U);
|
||||
sendCommand(text);
|
||||
m_rssiCount2 = 1U;
|
||||
return;
|
||||
@@ -362,7 +370,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t5.txt=\"-%udBm\"", m_rssiAccum2 / DMR_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(5U,0);
|
||||
sendCommandAction(5U,37U);
|
||||
m_rssiAccum2 = 0U;
|
||||
m_rssiCount2 = 1U;
|
||||
}
|
||||
@@ -377,10 +385,10 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
|
||||
if (type[0] == ' ') {
|
||||
if (slotNo == 1U) {
|
||||
if (m_screenLayout == 2U) sendCommand("t0.pco=33808");
|
||||
sendCommandAction(0,14U);
|
||||
sendCommandAction(0,34U);
|
||||
} else {
|
||||
if (m_screenLayout == 2U) sendCommand("t2.pco=33808");
|
||||
sendCommandAction(2,14U);
|
||||
sendCommandAction(2,34U);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -400,7 +408,7 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
|
||||
sendCommand("t0.pco=1024");
|
||||
}
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,13U);
|
||||
sendCommandAction(0,33U);
|
||||
} else {
|
||||
char text[40U];
|
||||
::sprintf(text, "t2.txt=\"2 %s %s\"", type, talkerAlias);
|
||||
@@ -416,7 +424,61 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
|
||||
sendCommand("t2.pco=1024");
|
||||
}
|
||||
sendCommand(text);
|
||||
sendCommandAction(2,13U);
|
||||
sendCommandAction(2U,33U);
|
||||
}
|
||||
}
|
||||
|
||||
void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitude, unsigned char positionError)
|
||||
{
|
||||
char Lat,Lon,text[40];
|
||||
|
||||
if (m_screenLayout < 2U)
|
||||
return;
|
||||
|
||||
if (latitude<0) {
|
||||
latitude=-latitude;
|
||||
Lat='S';
|
||||
} else {
|
||||
Lat='N';
|
||||
}
|
||||
if (longitude<0) {
|
||||
longitude=-longitude;
|
||||
Lon='W';
|
||||
} else {
|
||||
Lon='E';
|
||||
}
|
||||
int degreeLat = (int)latitude;
|
||||
int minutesLat = (int)((latitude - (float)degreeLat) * 60.0);
|
||||
float secondsLat = (float)((latitude - (float)degreeLat - (float)minutesLat / 60.0) * 60.0 * 60.0);
|
||||
int degreeLon = (int)longitude;
|
||||
int minutesLon = (int)((longitude - (float)degreeLon) * 60.0);
|
||||
float secondsLon = (float)((longitude - (float)degreeLon - (float)minutesLon / 60.0) * 60.0 * 60.0);
|
||||
|
||||
::sprintf(text, "%d°%d'%.2f\"%c %d°%d'%.2f\"%c",degreeLat,minutesLat,secondsLat,Lat,degreeLon,minutesLon,secondsLon,Lon);
|
||||
|
||||
if (slotNo == 1U) {
|
||||
sendCommand(text);
|
||||
sendCommandAction(9U,35U);
|
||||
|
||||
::sprintf(text, "t8.txt=\"%f %f\"", latitude, longitude);
|
||||
sendCommand(text);
|
||||
sendCommandAction(8U,35U);
|
||||
|
||||
::sprintf(text, "t12.txt=\"%d\"", positionError);
|
||||
sendCommand(text);
|
||||
sendCommandAction(12U,35U);
|
||||
}
|
||||
if (slotNo == 2U) {
|
||||
sendCommand(text);
|
||||
sendCommandAction(11U,35U);
|
||||
|
||||
::sprintf(text, "t10.txt=\"%f %f\"", latitude, longitude);
|
||||
sendCommand(text);
|
||||
sendCommandAction(10U,35U);
|
||||
|
||||
::sprintf(text, "t13.txt=\"%d\"", positionError);
|
||||
sendCommand(text);
|
||||
sendCommandAction(13U,35U);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,7 +489,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t6.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(6U,0);
|
||||
sendCommandAction(6U,38U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -439,7 +501,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t6.txt=\"%.1f%%\"", m_berAccum1 / DMR_BER_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(6U,0);
|
||||
sendCommandAction(6U,38U);
|
||||
m_berAccum1 = 0U;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -448,7 +510,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t7.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(7U,0);
|
||||
sendCommandAction(7U,38U);
|
||||
m_berCount2 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -460,7 +522,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t7.txt=\"%.1f%%\"", m_berAccum2 / DMR_BER_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(7U,0);
|
||||
sendCommandAction(7U,38U);
|
||||
m_berAccum2 = 0U;
|
||||
m_berCount2 = 1U;
|
||||
}
|
||||
@@ -471,7 +533,7 @@ void CNextion::clearDMRInt(unsigned int slotNo)
|
||||
{
|
||||
if (slotNo == 1U) {
|
||||
sendCommand("t0.txt=\"1 Listening\"");
|
||||
sendCommandAction(0,11U);
|
||||
sendCommandAction(0,31U);
|
||||
|
||||
if (m_screenLayout == 2U) {
|
||||
sendCommand("t0.pco=0");
|
||||
@@ -483,7 +545,7 @@ void CNextion::clearDMRInt(unsigned int slotNo)
|
||||
sendCommand("t6.txt=\"\"");
|
||||
} else {
|
||||
sendCommand("t2.txt=\"2 Listening\"");
|
||||
sendCommandAction(2U,11U);
|
||||
sendCommandAction(2U,31U);
|
||||
|
||||
if (m_screenLayout == 2U) {
|
||||
sendCommand("t2.pco=0");
|
||||
@@ -503,8 +565,11 @@ void CNextion::writeFusionInt(const char* source, const char* dest, const char*
|
||||
assert(type != NULL);
|
||||
assert(origin != NULL);
|
||||
|
||||
if (m_mode != MODE_YSF)
|
||||
if (m_mode != MODE_YSF) {
|
||||
sendCommand("page YSF");
|
||||
sendCommandAction(0,4U);
|
||||
}
|
||||
|
||||
|
||||
char text[30U];
|
||||
::sprintf(text, "dim=%u", m_brightness);
|
||||
@@ -512,15 +577,15 @@ void CNextion::writeFusionInt(const char* source, const char* dest, const char*
|
||||
|
||||
::sprintf(text, "t0.txt=\"%s %.10s\"", type, source);
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,0);
|
||||
sendCommandAction(0,42U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%.10s\"", dest);
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,0);
|
||||
sendCommandAction(1U,43U);
|
||||
if (::strcmp(origin, " ") != 0) {
|
||||
::sprintf(text, "t2.txt=\"at %.10s\"", origin);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,0);
|
||||
sendCommandAction(2U,44U);
|
||||
}
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
@@ -538,7 +603,7 @@ void CNextion::writeFusionRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,45U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -550,7 +615,7 @@ void CNextion::writeFusionRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / YSF_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,45U);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -562,7 +627,7 @@ void CNextion::writeFusionBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,0);
|
||||
sendCommandAction(4U,46U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -574,7 +639,7 @@ void CNextion::writeFusionBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(YSF_BER_COUNT));
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,0);
|
||||
sendCommandAction(4U,46U);
|
||||
m_berAccum1 = 0.0F;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -583,7 +648,7 @@ void CNextion::writeFusionBERInt(float ber)
|
||||
void CNextion::clearFusionInt()
|
||||
{
|
||||
sendCommand("t0.txt=\"Listening\"");
|
||||
sendCommandAction(0,11U);
|
||||
sendCommandAction(0,41U);
|
||||
sendCommand("t1.txt=\"\"");
|
||||
sendCommand("t2.txt=\"\"");
|
||||
sendCommand("t3.txt=\"\"");
|
||||
@@ -595,8 +660,10 @@ void CNextion::writeP25Int(const char* source, bool group, unsigned int dest, co
|
||||
assert(source != NULL);
|
||||
assert(type != NULL);
|
||||
|
||||
if (m_mode != MODE_P25)
|
||||
if (m_mode != MODE_P25) {
|
||||
sendCommand("page P25");
|
||||
sendCommandAction(0,5U);
|
||||
}
|
||||
|
||||
char text[30U];
|
||||
::sprintf(text, "dim=%u", m_brightness);
|
||||
@@ -604,11 +671,11 @@ void CNextion::writeP25Int(const char* source, bool group, unsigned int dest, co
|
||||
|
||||
::sprintf(text, "t0.txt=\"%s %.10s\"", type, source);
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,0);
|
||||
sendCommandAction(0,52U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%s%u\"", group ? "TG" : "", dest);
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,0);
|
||||
sendCommandAction(1U,53U);
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
|
||||
@@ -625,7 +692,7 @@ void CNextion::writeP25RSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t2.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,0);
|
||||
sendCommandAction(2U,54U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -637,7 +704,7 @@ void CNextion::writeP25RSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t2.txt=\"-%udBm\"", m_rssiAccum1 / P25_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,0);
|
||||
sendCommandAction(2U,54);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -649,7 +716,7 @@ void CNextion::writeP25BERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,55U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -661,7 +728,7 @@ void CNextion::writeP25BERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"%.1f%%\"", m_berAccum1 / float(P25_BER_COUNT));
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,0);
|
||||
sendCommandAction(3U,55U);
|
||||
m_berAccum1 = 0.0F;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -670,7 +737,7 @@ void CNextion::writeP25BERInt(float ber)
|
||||
void CNextion::clearP25Int()
|
||||
{
|
||||
sendCommand("t0.txt=\"Listening\"");
|
||||
sendCommandAction(0,11U);
|
||||
sendCommandAction(0,51U);
|
||||
sendCommand("t1.txt=\"\"");
|
||||
sendCommand("t2.txt=\"\"");
|
||||
sendCommand("t3.txt=\"\"");
|
||||
@@ -679,7 +746,7 @@ void CNextion::clearP25Int()
|
||||
void CNextion::writeCWInt()
|
||||
{
|
||||
sendCommand("t1.txt=\"Sending CW Ident\"");
|
||||
sendCommandAction(1,2U);
|
||||
sendCommandAction(1U,12U);
|
||||
m_clockDisplayTimer.start();
|
||||
|
||||
m_mode = MODE_CW;
|
||||
@@ -688,7 +755,7 @@ void CNextion::writeCWInt()
|
||||
void CNextion::clearCWInt()
|
||||
{
|
||||
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
||||
sendCommandAction(1U,1U);
|
||||
sendCommandAction(1U,11U);
|
||||
}
|
||||
|
||||
void CNextion::clockInt(unsigned int ms)
|
||||
@@ -717,8 +784,9 @@ void CNextion::clockInt(unsigned int ms)
|
||||
void CNextion::close()
|
||||
{
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
sendCommand("t1.txt=\"MMDVM STOPPED\"");
|
||||
sendCommandAction(1U,5U);
|
||||
sendCommandAction(1U,19U);
|
||||
m_serial->close();
|
||||
delete m_serial;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user