mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
removed GPS form Layout 2
changed status codes and ommitted cmd code new example display layouts
This commit is contained in:
135
Nextion.cpp
135
Nextion.cpp
@@ -84,7 +84,7 @@ bool CNextion::open()
|
||||
m_ipaddress = (char*)info;
|
||||
|
||||
sendCommand("bkcmd=0");
|
||||
sendCommandAction(0,0);
|
||||
sendCommandAction(0);
|
||||
|
||||
setIdle();
|
||||
|
||||
@@ -95,7 +95,7 @@ bool CNextion::open()
|
||||
void CNextion::setIdleInt()
|
||||
{
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
sendCommandAction(1U);
|
||||
|
||||
char command[30U];
|
||||
::sprintf(command, "dim=%u", m_idleBrightness);
|
||||
@@ -109,14 +109,14 @@ void CNextion::setIdleInt()
|
||||
::sprintf(command, "t5.txt=\"%u\"", m_dmrid);
|
||||
sendCommand(command);
|
||||
}
|
||||
sendCommandAction(0,17U);
|
||||
sendCommandAction(17U);
|
||||
|
||||
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
||||
sendCommandAction(1U,11U);
|
||||
sendCommandAction(11U);
|
||||
|
||||
::sprintf(command, "t3.txt=\"%s\"", m_ipaddress.c_str());
|
||||
sendCommand(command);
|
||||
sendCommandAction(3U,16U);
|
||||
sendCommandAction(16U);
|
||||
|
||||
m_clockDisplayTimer.start();
|
||||
|
||||
@@ -128,18 +128,18 @@ void CNextion::setErrorInt(const char* text)
|
||||
assert(text != NULL);
|
||||
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
sendCommandAction(1U);
|
||||
|
||||
char command[20];
|
||||
::sprintf(command, "dim=%u", m_brightness);
|
||||
sendCommand(command);
|
||||
|
||||
::sprintf(command, "t0.txt=\"%s\"", text);
|
||||
sendCommandAction(0,13U);
|
||||
sendCommandAction(13U);
|
||||
|
||||
sendCommand(command);
|
||||
sendCommand("t1.txt=\"ERROR\"");
|
||||
sendCommandAction(1U,14U);
|
||||
sendCommandAction(14U);
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
|
||||
@@ -149,14 +149,14 @@ void CNextion::setErrorInt(const char* text)
|
||||
void CNextion::setLockoutInt()
|
||||
{
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
sendCommandAction(1U);
|
||||
|
||||
char command[20];
|
||||
::sprintf(command, "dim=%u", m_brightness);
|
||||
sendCommand(command);
|
||||
|
||||
sendCommand("t0.txt=\"LOCKOUT\"");
|
||||
sendCommandAction(0,15U);
|
||||
sendCommandAction(15U);
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
|
||||
@@ -173,7 +173,7 @@ void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your,
|
||||
|
||||
if (m_mode != MODE_DSTAR) {
|
||||
sendCommand("page DStar");
|
||||
sendCommandAction(0,2U);
|
||||
sendCommandAction(2U);
|
||||
}
|
||||
|
||||
char text[30U];
|
||||
@@ -182,16 +182,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,22U);
|
||||
sendCommandAction(42U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%.8s\"", your);
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,23U);
|
||||
sendCommandAction(45U);
|
||||
|
||||
if (::strcmp(reflector, " ") != 0) {
|
||||
::sprintf(text, "t2.txt=\"via %.8s\"", reflector);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,24U);
|
||||
sendCommandAction(46U);
|
||||
}
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
@@ -209,7 +209,7 @@ void CNextion::writeDStarRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,25U);
|
||||
sendCommandAction(47U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -221,7 +221,7 @@ void CNextion::writeDStarRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / DSTAR_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,25U);
|
||||
sendCommandAction(47U);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -233,7 +233,7 @@ void CNextion::writeDStarBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,26U);
|
||||
sendCommandAction(48U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ void CNextion::writeDStarBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(DSTAR_BER_COUNT));
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,26U);
|
||||
sendCommandAction(48U);
|
||||
m_berAccum1 = 0.0F;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -254,7 +254,7 @@ void CNextion::writeDStarBERInt(float ber)
|
||||
void CNextion::clearDStarInt()
|
||||
{
|
||||
sendCommand("t0.txt=\"Listening\"");
|
||||
sendCommandAction(0,21U);
|
||||
sendCommandAction(41U);
|
||||
sendCommand("t1.txt=\"\"");
|
||||
sendCommand("t2.txt=\"\"");
|
||||
sendCommand("t3.txt=\"\"");
|
||||
@@ -267,7 +267,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
|
||||
if (m_mode != MODE_DMR) {
|
||||
sendCommand("page DMR");
|
||||
sendCommandAction(0,3U);
|
||||
sendCommandAction(3U);
|
||||
|
||||
|
||||
if (slotNo == 1U) {
|
||||
@@ -277,7 +277,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand("t2.txt=\"2 Listening\"");
|
||||
sendCommandAction(2U,31U);
|
||||
sendCommandAction(69U);
|
||||
} else {
|
||||
if (m_screenLayout == 2U) {
|
||||
sendCommand("t0.pco=0");
|
||||
@@ -285,7 +285,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand("t0.txt=\"1 Listening\"");
|
||||
sendCommandAction(0,31U);
|
||||
sendCommandAction(61U);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,11 +302,11 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,32U);
|
||||
sendCommandAction(62U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,36U);
|
||||
sendCommandAction(65U);
|
||||
} else {
|
||||
::sprintf(text, "t2.txt=\"2 %s %s\"", type, src.c_str());
|
||||
|
||||
@@ -316,11 +316,11 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
|
||||
}
|
||||
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,32U);
|
||||
sendCommandAction(70U);
|
||||
|
||||
::sprintf(text, "t3.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,36U);
|
||||
sendCommandAction(73U);
|
||||
}
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
@@ -343,7 +343,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,37U);
|
||||
sendCommandAction(66U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -355,7 +355,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,37U);
|
||||
sendCommandAction(66U);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -363,7 +363,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,37U);
|
||||
sendCommandAction(74U);
|
||||
sendCommand(text);
|
||||
m_rssiCount2 = 1U;
|
||||
return;
|
||||
@@ -376,7 +376,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,37U);
|
||||
sendCommandAction(74U);
|
||||
m_rssiAccum2 = 0U;
|
||||
m_rssiCount2 = 1U;
|
||||
}
|
||||
@@ -391,10 +391,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,34U);
|
||||
sendCommandAction(64U);
|
||||
} else {
|
||||
if (m_screenLayout == 2U) sendCommand("t2.pco=33808");
|
||||
sendCommandAction(2,34U);
|
||||
sendCommandAction(72U);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -414,7 +414,7 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
|
||||
sendCommand("t0.pco=1024");
|
||||
}
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,33U);
|
||||
sendCommandAction(63U);
|
||||
} else {
|
||||
char text[40U];
|
||||
::sprintf(text, "t2.txt=\"2 %s %s\"", type, talkerAlias);
|
||||
@@ -430,7 +430,7 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
|
||||
sendCommand("t2.pco=1024");
|
||||
}
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,33U);
|
||||
sendCommandAction(71U);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
|
||||
{
|
||||
char Lat,Lon,text[40];
|
||||
|
||||
if (m_screenLayout < 2U)
|
||||
if (m_screenLayout < 3U)
|
||||
return;
|
||||
|
||||
if (latitude<0) {
|
||||
@@ -460,7 +460,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
|
||||
int minutesLon = (int)((longitude - (float)degreeLon) * 60.0);
|
||||
float secondsLon = (float)((longitude - (float)degreeLon - (float)minutesLon / 60.0) * 60.0 * 60.0);
|
||||
|
||||
::sprintf(text, "t%d.txt=\"%d%c%d'%.2f\\\" %c %d%c%d'%.2f\\\" %c\"",2*slotNo+7,degreeLat,176U,minutesLat,secondsLat,Lat,degreeLon,176U,minutesLon,secondsLon,Lon);
|
||||
::sprintf(text, "t%d.txt=\"%d%c%d'%.2f\\\" %c %d%c%d'%.2f\\\" %c\"",2U*slotNo+7U,degreeLat,176U,minutesLat,secondsLat,Lat,degreeLon,176U,minutesLon,secondsLon,Lon);
|
||||
|
||||
if (slotNo == 1U) {
|
||||
sendCommand(text);
|
||||
@@ -470,7 +470,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
|
||||
|
||||
::sprintf(text, "t12.txt=\"%d\"", positionError);
|
||||
sendCommand(text);
|
||||
sendCommandAction(8U,35U);
|
||||
sendCommandAction(76U);
|
||||
}
|
||||
if (slotNo == 2U) {
|
||||
sendCommand(text);
|
||||
@@ -480,7 +480,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
|
||||
|
||||
::sprintf(text, "t13.txt=\"%d\"", positionError);
|
||||
sendCommand(text);
|
||||
sendCommandAction(10U,35U);
|
||||
sendCommandAction(77U);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t6.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(6U,38U);
|
||||
sendCommandAction(67U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -503,7 +503,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,38U);
|
||||
sendCommandAction(67U);
|
||||
m_berAccum1 = 0U;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t7.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(7U,38U);
|
||||
sendCommandAction(75U);
|
||||
m_berCount2 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -524,7 +524,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,38U);
|
||||
sendCommandAction(75U);
|
||||
m_berAccum2 = 0U;
|
||||
m_berCount2 = 1U;
|
||||
}
|
||||
@@ -535,7 +535,7 @@ void CNextion::clearDMRInt(unsigned int slotNo)
|
||||
{
|
||||
if (slotNo == 1U) {
|
||||
sendCommand("t0.txt=\"1 Listening\"");
|
||||
sendCommandAction(0,31U);
|
||||
sendCommandAction(61U);
|
||||
|
||||
if (m_screenLayout == 2U) {
|
||||
sendCommand("t0.pco=0");
|
||||
@@ -547,7 +547,7 @@ void CNextion::clearDMRInt(unsigned int slotNo)
|
||||
sendCommand("t6.txt=\"\"");
|
||||
} else {
|
||||
sendCommand("t2.txt=\"2 Listening\"");
|
||||
sendCommandAction(2U,31U);
|
||||
sendCommandAction(69U);
|
||||
|
||||
if (m_screenLayout == 2U) {
|
||||
sendCommand("t2.pco=0");
|
||||
@@ -569,7 +569,7 @@ void CNextion::writeFusionInt(const char* source, const char* dest, const char*
|
||||
|
||||
if (m_mode != MODE_YSF) {
|
||||
sendCommand("page YSF");
|
||||
sendCommandAction(0,4U);
|
||||
sendCommandAction(4U);
|
||||
}
|
||||
|
||||
|
||||
@@ -579,15 +579,15 @@ void CNextion::writeFusionInt(const char* source, const char* dest, const char*
|
||||
|
||||
::sprintf(text, "t0.txt=\"%s %.10s\"", type, source);
|
||||
sendCommand(text);
|
||||
sendCommandAction(0,42U);
|
||||
sendCommandAction(82U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%.10s\"", dest);
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,43U);
|
||||
sendCommandAction(83U);
|
||||
if (::strcmp(origin, " ") != 0) {
|
||||
::sprintf(text, "t2.txt=\"at %.10s\"", origin);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,44U);
|
||||
sendCommandAction(84U);
|
||||
}
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
@@ -605,7 +605,7 @@ void CNextion::writeFusionRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,45U);
|
||||
sendCommandAction(85U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -617,7 +617,7 @@ void CNextion::writeFusionRSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / YSF_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,45U);
|
||||
sendCommandAction(85U);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -629,7 +629,7 @@ void CNextion::writeFusionBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,46U);
|
||||
sendCommandAction(86U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -641,7 +641,7 @@ void CNextion::writeFusionBERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(YSF_BER_COUNT));
|
||||
sendCommand(text);
|
||||
sendCommandAction(4U,46U);
|
||||
sendCommandAction(86U);
|
||||
m_berAccum1 = 0.0F;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -650,7 +650,7 @@ void CNextion::writeFusionBERInt(float ber)
|
||||
void CNextion::clearFusionInt()
|
||||
{
|
||||
sendCommand("t0.txt=\"Listening\"");
|
||||
sendCommandAction(0,41U);
|
||||
sendCommandAction(81U);
|
||||
sendCommand("t1.txt=\"\"");
|
||||
sendCommand("t2.txt=\"\"");
|
||||
sendCommand("t3.txt=\"\"");
|
||||
@@ -664,7 +664,7 @@ void CNextion::writeP25Int(const char* source, bool group, unsigned int dest, co
|
||||
|
||||
if (m_mode != MODE_P25) {
|
||||
sendCommand("page P25");
|
||||
sendCommandAction(0,5U);
|
||||
sendCommandAction(5U);
|
||||
}
|
||||
|
||||
char text[30U];
|
||||
@@ -673,11 +673,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,52U);
|
||||
sendCommandAction(102U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%s%u\"", group ? "TG" : "", dest);
|
||||
sendCommand(text);
|
||||
sendCommandAction(1U,53U);
|
||||
sendCommandAction(103U);
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
|
||||
@@ -694,7 +694,7 @@ void CNextion::writeP25RSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t2.txt=\"-%udBm\"", rssi);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,54U);
|
||||
sendCommandAction(104U);
|
||||
m_rssiCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -706,7 +706,7 @@ void CNextion::writeP25RSSIInt(unsigned char rssi)
|
||||
char text[20U];
|
||||
::sprintf(text, "t2.txt=\"-%udBm\"", m_rssiAccum1 / P25_RSSI_COUNT);
|
||||
sendCommand(text);
|
||||
sendCommandAction(2U,54U);
|
||||
sendCommandAction(104U);
|
||||
m_rssiAccum1 = 0U;
|
||||
m_rssiCount1 = 1U;
|
||||
}
|
||||
@@ -718,7 +718,7 @@ void CNextion::writeP25BERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"%.1f%%\"", ber);
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,55U);
|
||||
sendCommandAction(105U);
|
||||
m_berCount1 = 1U;
|
||||
return;
|
||||
}
|
||||
@@ -730,7 +730,7 @@ void CNextion::writeP25BERInt(float ber)
|
||||
char text[20U];
|
||||
::sprintf(text, "t3.txt=\"%.1f%%\"", m_berAccum1 / float(P25_BER_COUNT));
|
||||
sendCommand(text);
|
||||
sendCommandAction(3U,55U);
|
||||
sendCommandAction(105U);
|
||||
m_berAccum1 = 0.0F;
|
||||
m_berCount1 = 1U;
|
||||
}
|
||||
@@ -739,7 +739,7 @@ void CNextion::writeP25BERInt(float ber)
|
||||
void CNextion::clearP25Int()
|
||||
{
|
||||
sendCommand("t0.txt=\"Listening\"");
|
||||
sendCommandAction(0,51U);
|
||||
sendCommandAction(101U);
|
||||
sendCommand("t1.txt=\"\"");
|
||||
sendCommand("t2.txt=\"\"");
|
||||
sendCommand("t3.txt=\"\"");
|
||||
@@ -748,7 +748,7 @@ void CNextion::clearP25Int()
|
||||
void CNextion::writeCWInt()
|
||||
{
|
||||
sendCommand("t1.txt=\"Sending CW Ident\"");
|
||||
sendCommandAction(1U,12U);
|
||||
sendCommandAction(12U);
|
||||
m_clockDisplayTimer.start();
|
||||
|
||||
m_mode = MODE_CW;
|
||||
@@ -757,7 +757,7 @@ void CNextion::writeCWInt()
|
||||
void CNextion::clearCWInt()
|
||||
{
|
||||
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
||||
sendCommandAction(1U,11U);
|
||||
sendCommandAction(11U);
|
||||
}
|
||||
|
||||
void CNextion::clockInt(unsigned int ms)
|
||||
@@ -786,21 +786,18 @@ void CNextion::clockInt(unsigned int ms)
|
||||
void CNextion::close()
|
||||
{
|
||||
sendCommand("page MMDVM");
|
||||
sendCommandAction(0,1U);
|
||||
sendCommandAction(1U);
|
||||
sendCommand("t1.txt=\"MMDVM STOPPED\"");
|
||||
sendCommandAction(1U,19U);
|
||||
sendCommandAction(19U);
|
||||
m_serial->close();
|
||||
delete m_serial;
|
||||
}
|
||||
|
||||
void CNextion::sendCommandAction(unsigned int field, unsigned int status)
|
||||
void CNextion::sendCommandAction(unsigned int status)
|
||||
{
|
||||
if (m_screenLayout<3U) return;
|
||||
|
||||
char text[30U];
|
||||
|
||||
::sprintf(text, "MMDVM.cmd.val=%d", field);
|
||||
sendCommand(text);
|
||||
::sprintf(text, "MMDVM.status.val=%d", status);
|
||||
sendCommand(text);
|
||||
sendCommand("click S0,1");
|
||||
|
||||
Reference in New Issue
Block a user