forked from g4klx/MMDVMHost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QSO info removed from OLED. QSO info add via CASTInfo.
- Loading branch information
1 parent
5acef27
commit 6d83bfb
Showing
6 changed files
with
223 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
/* | ||
* Copyright (C) 2016,2018 by Jonathan Naylor G4KLX | ||
* | ||
* 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 | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
|
||
#include "CASTInfo.h" | ||
|
||
static bool networkInfoInitialized = false; | ||
static unsigned char passCounter = 0; | ||
|
||
CCASTInfo::CCASTInfo(CModem* modem) : | ||
CDisplay(), | ||
m_modem(modem), | ||
m_ipaddress() | ||
{ | ||
} | ||
|
||
CCASTInfo::~CCASTInfo() | ||
{ | ||
} | ||
|
||
bool CCASTInfo::open() | ||
{ | ||
return true; | ||
} | ||
|
||
void CCASTInfo::setIdleInt() | ||
{ | ||
unsigned char info[100U]; | ||
CNetworkInfo* m_network; | ||
|
||
passCounter ++; | ||
if (passCounter > 253U) | ||
networkInfoInitialized = false; | ||
|
||
if (! networkInfoInitialized) { | ||
//LogMessage("Initialize CNetworkInfo"); | ||
info[0]=0; | ||
m_network = new CNetworkInfo; | ||
m_network->getNetworkInterface(info); | ||
m_ipaddress = (char*)info; | ||
delete m_network; | ||
|
||
if (m_modem != NULL) | ||
m_modem->writeIPInfo(m_ipaddress); | ||
|
||
networkInfoInitialized = true; | ||
passCounter = 0; | ||
} | ||
|
||
|
||
} | ||
|
||
void CCASTInfo::setErrorInt(const char* text) | ||
{ | ||
} | ||
|
||
void CCASTInfo::setLockoutInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::setQuitInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) | ||
{ | ||
if (m_modem != NULL) | ||
m_modem->writeDStarInfo(my1, my2, your, type, reflector); | ||
} | ||
|
||
void CCASTInfo::clearDStarInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type) | ||
{ | ||
if (m_modem != NULL) | ||
m_modem->writeDMRInfo(slotNo, src, group, dst, type); | ||
} | ||
|
||
void CCASTInfo::clearDMRInt(unsigned int slotNo) | ||
{ | ||
} | ||
|
||
void CCASTInfo::writeFusionInt(const char* source, const char* dest, const char* type, const char* origin) | ||
{ | ||
if (m_modem != NULL) | ||
m_modem->writeYSFInfo(source, dest, type, origin); | ||
} | ||
|
||
void CCASTInfo::clearFusionInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::writeP25Int(const char* source, bool group, unsigned int dest, const char* type) | ||
{ | ||
if (m_modem != NULL) | ||
m_modem->writeP25Info(source, group, dest, type); | ||
} | ||
|
||
void CCASTInfo::clearP25Int() | ||
{ | ||
} | ||
|
||
void CCASTInfo::writeNXDNInt(const char* source, bool group, unsigned int dest, const char* type) | ||
{ | ||
if (m_modem != NULL) | ||
m_modem->writeNXDNInfo(source, group, dest, type); | ||
} | ||
|
||
void CCASTInfo::clearNXDNInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::writePOCSAGInt(uint32_t ric, const std::string& message) | ||
{ | ||
if (m_modem != NULL) | ||
m_modem->writePOCSAGInfo(ric, message); | ||
} | ||
|
||
void CCASTInfo::clearPOCSAGInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::writeCWInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::clearCWInt() | ||
{ | ||
} | ||
|
||
void CCASTInfo::close() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright (C) 2016,2018 by Jonathan Naylor G4KLX | ||
* | ||
* 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 | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
|
||
#if !defined(CASTINFO_H) | ||
#define CASTINFO_H | ||
|
||
#include "Display.h" | ||
|
||
#include <string> | ||
|
||
#include "NetworkInfo.h" | ||
#include "Modem.h" | ||
class CCASTInfo : public CDisplay | ||
{ | ||
public: | ||
CCASTInfo(CModem* modem); | ||
virtual ~CCASTInfo(); | ||
|
||
virtual bool open(); | ||
|
||
virtual void close(); | ||
|
||
protected: | ||
virtual void setIdleInt(); | ||
virtual void setErrorInt(const char* text); | ||
virtual void setLockoutInt(); | ||
virtual void setQuitInt(); | ||
|
||
virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); | ||
virtual void clearDStarInt(); | ||
|
||
virtual void writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type); | ||
virtual void clearDMRInt(unsigned int slotNo); | ||
|
||
virtual void writeFusionInt(const char* source, const char* dest, const char* type, const char* origin); | ||
virtual void clearFusionInt(); | ||
|
||
virtual void writeP25Int(const char* source, bool group, unsigned int dest, const char* type); | ||
virtual void clearP25Int(); | ||
|
||
virtual void writeNXDNInt(const char* source, bool group, unsigned int dest, const char* type); | ||
virtual void clearNXDNInt(); | ||
|
||
virtual void writePOCSAGInt(uint32_t ric, const std::string& message); | ||
virtual void clearPOCSAGInt(); | ||
|
||
virtual void writeCWInt(); | ||
virtual void clearCWInt(); | ||
|
||
private: | ||
CModem* m_modem; | ||
std::string m_ipaddress; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters