Removed code to display DMR inband GPS data
This commit is contained in:
parent
eb787d89d3
commit
eb14aeb861
15
DMRSlot.cpp
15
DMRSlot.cpp
|
@ -79,9 +79,6 @@ m_rfEmbeddedReadN(0U),
|
|||
m_rfEmbeddedWriteN(1U),
|
||||
m_rfTalkerId(TALKER_ID_NONE),
|
||||
m_rfTalkerAlias(NULL),
|
||||
m_rfGPSLatitude(0U),
|
||||
m_rfGPSLongitude(0U),
|
||||
m_rfGPSPositionError(0U),
|
||||
m_netEmbeddedLC(),
|
||||
m_netEmbeddedData(NULL),
|
||||
m_netEmbeddedReadN(0U),
|
||||
|
@ -615,8 +612,7 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
|
|||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded GPS Info", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
decodeGPSPosition(data);
|
||||
m_display->writeDMRGPS(m_slotNo, m_rfGPSLatitude, m_rfGPSLongitude,m_rfGPSPositionError);
|
||||
logGPSPosition(data);
|
||||
}
|
||||
if (m_network != NULL)
|
||||
m_network->writePosition(m_rfLC->getSrcId(), data);
|
||||
|
@ -1408,8 +1404,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded GPS Info", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
decodeGPSPosition(data);
|
||||
m_display->writeDMRGPS(m_slotNo, m_rfGPSLatitude, m_rfGPSLongitude,m_rfGPSPositionError);
|
||||
logGPSPosition(data);
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_HEADER:
|
||||
|
@ -1641,7 +1636,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
}
|
||||
|
||||
|
||||
void CDMRSlot::decodeGPSPosition(const unsigned char* data)
|
||||
void CDMRSlot::logGPSPosition(const unsigned char* data)
|
||||
{
|
||||
unsigned int errorI = (data[2U] & 0x0E) >> 1U;
|
||||
|
||||
|
@ -1685,10 +1680,6 @@ void CDMRSlot::decodeGPSPosition(const unsigned char* data)
|
|||
longitude *= float(longitudeI);
|
||||
latitude *= float(latitudeI);
|
||||
|
||||
m_rfGPSLongitude=longitude;
|
||||
m_rfGPSLatitude=latitude;
|
||||
m_rfGPSPositionError=errorI;
|
||||
|
||||
LogMessage("GPS position [%f,%f] (Position error %s)", latitude, longitude, error);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,9 +70,6 @@ private:
|
|||
unsigned int m_rfEmbeddedWriteN;
|
||||
unsigned char m_rfTalkerId;
|
||||
unsigned char* m_rfTalkerAlias;
|
||||
float m_rfGPSLatitude;
|
||||
float m_rfGPSLongitude;
|
||||
unsigned char m_rfGPSPositionError;
|
||||
CDMREmbeddedData m_netEmbeddedLC;
|
||||
CDMREmbeddedData* m_netEmbeddedData;
|
||||
unsigned int m_netEmbeddedReadN;
|
||||
|
@ -135,7 +132,7 @@ private:
|
|||
static unsigned char m_id2;
|
||||
static ACTIVITY_TYPE m_activity2;
|
||||
|
||||
void decodeGPSPosition(const unsigned char* data);
|
||||
void logGPSPosition(const unsigned char* data);
|
||||
|
||||
void writeQueueRF(const unsigned char* data);
|
||||
void writeQueueNet(const unsigned char* data);
|
||||
|
|
10
Display.cpp
10
Display.cpp
|
@ -172,12 +172,6 @@ void CDisplay::writeDMRTA(unsigned int slotNo, unsigned char* talkerAlias, const
|
|||
|
||||
}
|
||||
|
||||
void CDisplay::writeDMRGPS(unsigned int slotNo, float latitude, float longitude, unsigned char positionError)
|
||||
{
|
||||
writeDMRGPSInt(slotNo, latitude, longitude, positionError);
|
||||
}
|
||||
|
||||
|
||||
void CDisplay::writeDMRBER(unsigned int slotNo, float ber)
|
||||
{
|
||||
writeDMRBERInt(slotNo, ber);
|
||||
|
@ -347,10 +341,6 @@ void CDisplay::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
|
|||
{
|
||||
}
|
||||
|
||||
void CDisplay::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitude, unsigned char positionError)
|
||||
{
|
||||
}
|
||||
|
||||
void CDisplay::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ public:
|
|||
void writeDMRRSSI(unsigned int slotNo, unsigned char rssi);
|
||||
void writeDMRBER(unsigned int slotNo, float ber);
|
||||
void writeDMRTA(unsigned int slotNo, unsigned char* talkerAlias, const char* type);
|
||||
void writeDMRGPS(unsigned int slotNo, float latitude, float longitude, unsigned char positionError);
|
||||
void clearDMR(unsigned int slotNo);
|
||||
|
||||
void writeFusion(const char* source, const char* dest, const char* type, const char* origin);
|
||||
|
@ -77,7 +76,6 @@ protected:
|
|||
virtual void writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type) = 0;
|
||||
virtual void writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi);
|
||||
virtual void writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, const char* type);
|
||||
virtual void writeDMRGPSInt(unsigned int slotNo, float latitude, float longitude, unsigned char positionError);
|
||||
virtual void writeDMRBERInt(unsigned int slotNo, float ber);
|
||||
virtual void clearDMRInt(unsigned int slotNo) = 0;
|
||||
|
||||
|
|
50
Nextion.cpp
50
Nextion.cpp
|
@ -434,56 +434,6 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
|
|||
}
|
||||
}
|
||||
|
||||
void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitude, unsigned char positionError)
|
||||
{
|
||||
char Lat,Lon,text[40];
|
||||
|
||||
if (m_screenLayout < 3U)
|
||||
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, "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);
|
||||
|
||||
::sprintf(text, "t8.txt=\"%f %f\"", latitude, longitude);
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t12.txt=\"%d\"", positionError);
|
||||
sendCommand(text);
|
||||
sendCommandAction(76U);
|
||||
}
|
||||
if (slotNo == 2U) {
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t10.txt=\"%f %f\"", latitude, longitude);
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t13.txt=\"%d\"", positionError);
|
||||
sendCommand(text);
|
||||
sendCommandAction(77U);
|
||||
}
|
||||
}
|
||||
|
||||
void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
|
||||
{
|
||||
if (slotNo == 1U) {
|
||||
|
|
|
@ -49,7 +49,6 @@ protected:
|
|||
virtual void writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type);
|
||||
virtual void writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi);
|
||||
virtual void writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, const char* type);
|
||||
virtual void writeDMRGPSInt(unsigned int slotNo, float latitude, float longitude, unsigned char positionError);
|
||||
|
||||
virtual void writeDMRBERInt(unsigned int slotNo, float ber);
|
||||
virtual void clearDMRInt(unsigned int slotNo);
|
||||
|
|
Loading…
Reference in New Issue