Add a display hang time so quick transmissions aren't missed.

This commit is contained in:
Jonathan Naylor 2016-05-09 18:14:27 +01:00
parent 617a6cbfcb
commit bd5946ccd2
20 changed files with 313 additions and 124 deletions

View file

@ -20,7 +20,7 @@
#include <cassert>
#include <algorithm>
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, unsigned int timeout, CModem* modem, CDMRIPSC* network, IDisplay* display, bool duplex, const std::string& lookupFile) :
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, unsigned int timeout, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, const std::string& lookupFile) :
m_id(id),
m_colorCode(colorCode),
m_selfOnly(selfOnly),

View file

@ -30,7 +30,7 @@
class CDMRControl {
public:
CDMRControl(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, unsigned int timeout, CModem* modem, CDMRIPSC* network, IDisplay* display, bool duplex, const std::string& lookupFile);
CDMRControl(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, unsigned int timeout, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, const std::string& lookupFile);
~CDMRControl();
bool processWakeup(const unsigned char* data);

View file

@ -33,7 +33,7 @@ std::vector<unsigned int> CDMRSlot::m_prefixes;
std::vector<unsigned int> CDMRSlot::m_blackList;
CModem* CDMRSlot::m_modem = NULL;
CDMRIPSC* CDMRSlot::m_network = NULL;
IDisplay* CDMRSlot::m_display = NULL;
CDisplay* CDMRSlot::m_display = NULL;
bool CDMRSlot::m_duplex = true;
CDMRLookup* CDMRSlot::m_lookup = NULL;
@ -1263,7 +1263,7 @@ void CDMRSlot::writeQueueNet(const unsigned char *data)
m_queue.addData(data, len);
}
void CDMRSlot::init(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, CModem* modem, CDMRIPSC* network, IDisplay* display, bool duplex, CDMRLookup* lookup)
void CDMRSlot::init(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, CDMRLookup* lookup)
{
assert(id != 0U);
assert(modem != NULL);

View file

@ -50,7 +50,7 @@ public:
void clock();
static void init(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, CModem* modem, CDMRIPSC* network, IDisplay* display, bool duplex, CDMRLookup* lookup);
static void init(unsigned int id, unsigned int colorCode, bool selfOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blackList, CModem* modem, CDMRIPSC* network, CDisplay* display, bool duplex, CDMRLookup* lookup);
private:
unsigned int m_slotNo;
@ -92,7 +92,7 @@ private:
static std::vector<unsigned int> m_blackList;
static CModem* m_modem;
static CDMRIPSC* m_network;
static IDisplay* m_display;
static CDisplay* m_display;
static bool m_duplex;
static CDMRLookup* m_lookup;

View file

@ -36,7 +36,7 @@ bool CallsignCompare(const std::string& arg, const unsigned char* my)
// #define DUMP_DSTAR
CDStarControl::CDStarControl(const std::string& callsign, const std::string& module, bool selfOnly, const std::vector<std::string>& blackList, CDStarNetwork* network, IDisplay* display, unsigned int timeout, bool duplex) :
CDStarControl::CDStarControl(const std::string& callsign, const std::string& module, bool selfOnly, const std::vector<std::string>& blackList, CDStarNetwork* network, CDisplay* display, unsigned int timeout, bool duplex) :
m_callsign(NULL),
m_gateway(NULL),
m_selfOnly(selfOnly),

View file

@ -36,7 +36,7 @@
class CDStarControl {
public:
CDStarControl(const std::string& callsign, const std::string& module, bool selfOnly, const std::vector<std::string>& blackList, CDStarNetwork* network, IDisplay* display, unsigned int timeout, bool duplex);
CDStarControl(const std::string& callsign, const std::string& module, bool selfOnly, const std::vector<std::string>& blackList, CDStarNetwork* network, CDisplay* display, unsigned int timeout, bool duplex);
~CDStarControl();
bool writeModem(unsigned char* data);
@ -51,7 +51,7 @@ private:
bool m_selfOnly;
std::vector<std::string> m_blackList;
CDStarNetwork* m_network;
IDisplay* m_display;
CDisplay* m_display;
bool m_duplex;
CRingBuffer<unsigned char> m_queue;
CDStarHeader m_rfHeader;

View file

@ -17,7 +17,168 @@
*/
#include "Display.h"
#include "Defines.h"
IDisplay::~IDisplay()
#include <cstdio>
#include <cassert>
#include <cstring>
CDisplay::CDisplay() :
m_timer1(1000U, 3U),
m_timer2(1000U, 3U),
m_mode1(MODE_IDLE),
m_mode2(MODE_IDLE)
{
}
CDisplay::~CDisplay()
{
}
void CDisplay::setIdle()
{
m_timer1.stop();
m_timer2.stop();
m_mode1 = MODE_IDLE;
m_mode2 = MODE_IDLE;
setIdleInt();
}
void CDisplay::setLockout()
{
m_timer1.stop();
m_timer2.stop();
m_mode1 = MODE_IDLE;
m_mode2 = MODE_IDLE;
setLockoutInt();
}
void CDisplay::setError(const char* text)
{
assert(text != NULL);
m_timer1.stop();
m_timer2.stop();
m_mode1 = MODE_IDLE;
m_mode2 = MODE_IDLE;
setErrorInt(text);
}
void CDisplay::writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
{
assert(my1 != NULL);
assert(my2 != NULL);
assert(your != NULL);
assert(type != NULL);
assert(reflector != NULL);
m_timer1.start();
writeDStarInt(my1, my2, your, type, reflector);
}
void CDisplay::clearDStar()
{
if (m_timer1.hasExpired()) {
clearDStarInt();
m_timer1.stop();
} else {
m_mode1 = MODE_DSTAR;
}
}
void CDisplay::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
{
assert(type != NULL);
if (slotNo == 1U)
m_timer1.start();
else
m_timer2.start();
writeDMRInt(slotNo, src, group, dst, type);
}
void CDisplay::clearDMR(unsigned int slotNo)
{
if (slotNo == 1U) {
if (m_timer1.hasExpired()) {
clearDMRInt(slotNo);
m_timer1.stop();
} else {
m_mode1 = MODE_DMR;
}
} else {
if (m_timer2.hasExpired()) {
clearDMRInt(slotNo);
m_timer2.stop();
} else {
m_mode2 = MODE_DMR;
}
}
}
void CDisplay::writeFusion(const char* source, const char* dest)
{
assert(source != NULL);
assert(dest != NULL);
m_timer1.start();
writeFusionInt(source, dest);
}
void CDisplay::clearFusion()
{
if (m_timer1.hasExpired()) {
clearFusionInt();
m_timer1.stop();
} else {
m_mode1 = MODE_YSF;
}
}
void CDisplay::clock(unsigned int ms)
{
m_timer1.clock(ms);
if (m_timer1.isRunning() && m_timer1.hasExpired()) {
switch (m_mode1) {
case MODE_DSTAR:
clearDStarInt();
break;
case MODE_DMR:
clearDMRInt(1U);
break;
case MODE_YSF:
clearFusionInt();
break;
}
m_mode1 = MODE_IDLE;
m_timer1.stop();
}
m_timer2.clock(ms);
if (m_timer2.isRunning() && m_timer2.hasExpired()) {
switch (m_mode2) {
case MODE_DSTAR:
clearDStarInt();
break;
case MODE_DMR:
clearDMRInt(2U);
break;
case MODE_YSF:
clearFusionInt();
break;
}
m_mode2 = MODE_IDLE;
m_timer2.stop();
}
}

View file

@ -19,32 +19,54 @@
#if !defined(DISPLAY_H)
#define DISPLAY_H
#include "Timer.h"
#include <string>
class IDisplay
class CDisplay
{
public:
virtual ~IDisplay() = 0;
CDisplay();
virtual ~CDisplay() = 0;
virtual bool open() = 0;
virtual void setIdle() = 0;
void setIdle();
void setLockout();
void setError(const char* text);
virtual void setLockout() = 0;
virtual void setError(const char* text) = 0;
void writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector);
void clearDStar();
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) = 0;
virtual void clearDStar() = 0;
void writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type);
void clearDMR(unsigned int slotNo);
virtual void writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type) = 0;
virtual void clearDMR(unsigned int slotNo) = 0;
virtual void writeFusion(const char* source, const char* dest) = 0;
virtual void clearFusion() = 0;
void writeFusion(const char* source, const char* dest);
void clearFusion();
virtual void close() = 0;
void clock(unsigned int ms);
protected:
virtual void setIdleInt() = 0;
virtual void setLockoutInt() = 0;
virtual void setErrorInt(const char* text) = 0;
virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) = 0;
virtual void clearDStarInt() = 0;
virtual void writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type) = 0;
virtual void clearDMRInt(unsigned int slotNo) = 0;
virtual void writeFusionInt(const char* source, const char* dest) = 0;
virtual void clearFusionInt() = 0;
private:
CTimer m_timer1;
CTimer m_timer2;
unsigned char m_mode1;
unsigned char m_mode2;
};
#endif

View file

@ -30,6 +30,7 @@
const char* LISTENING = "Listening ";
CHD44780::CHD44780(unsigned int rows, unsigned int cols, const std::string& callsign, unsigned int dmrid, const std::vector<unsigned int>& pins, bool pwm, unsigned int pwmPin, unsigned int pwmBright, unsigned int pwmDim, bool duplex) :
CDisplay(),
m_rows(rows),
m_cols(cols),
m_callsign(callsign),
@ -152,7 +153,7 @@ void CHD44780::adafruitLCDColour(ADAFRUIT_COLOUR colour)
}
#endif
void CHD44780::setIdle()
void CHD44780::setIdleInt()
{
::lcdClear(m_fd);
@ -176,7 +177,7 @@ void CHD44780::setIdle()
m_dmr = false;
}
void CHD44780::setError(const char* text)
void CHD44780::setErrorInt(const char* text)
{
assert(text != NULL);
@ -202,7 +203,7 @@ void CHD44780::setError(const char* text)
m_dmr = false;
}
void CHD44780::setLockout()
void CHD44780::setLockoutInt()
{
#ifdef ADAFRUIT_DISPLAY
adafruitLCDColour(AC_RED);
@ -226,7 +227,7 @@ void CHD44780::setLockout()
m_dmr = false;
}
void CHD44780::writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
void CHD44780::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
{
assert(my1 != NULL);
assert(my2 != NULL);
@ -295,7 +296,7 @@ void CHD44780::writeDStar(const char* my1, const char* my2, const char* your, co
m_dmr = false;
}
void CHD44780::clearDStar()
void CHD44780::clearDStarInt()
{
#ifdef ADAFRUIT_DISPLAY
adafruitLCDColour(AC_ICE);
@ -322,7 +323,7 @@ void CHD44780::clearDStar()
}
}
void CHD44780::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
{
assert(type != NULL);
@ -466,7 +467,7 @@ void CHD44780::writeDMR(unsigned int slotNo, const std::string& src, bool group,
m_dmr = true;
}
void CHD44780::clearDMR(unsigned int slotNo)
void CHD44780::clearDMRInt(unsigned int slotNo)
{
#ifdef ADAFRUIT_DISPLAY
adafruitLCDColour(AC_ICE);
@ -515,7 +516,7 @@ void CHD44780::clearDMR(unsigned int slotNo)
}
}
void CHD44780::writeFusion(const char* source, const char* dest)
void CHD44780::writeFusionInt(const char* source, const char* dest)
{
assert(source != NULL);
assert(dest != NULL);
@ -570,7 +571,7 @@ void CHD44780::writeFusion(const char* source, const char* dest)
m_dmr = false;
}
void CHD44780::clearFusion()
void CHD44780::clearFusionInt()
{
#ifdef ADAFRUIT_DISPLAY
adafruitLCDColour(AC_ICE);

View file

@ -49,7 +49,7 @@ enum ADAFRUIT_COLOUR {
#define MCP23017 0x20
#endif
class CHD44780 : public IDisplay
class CHD44780 : public CDisplay
{
public:
CHD44780(unsigned int rows, unsigned int cols, const std::string& callsign, unsigned int dmrid, const std::vector<unsigned int>& pins, bool pwm, unsigned int pwmPin, unsigned int pwmBright, unsigned int pwmDim, bool duplex);
@ -57,22 +57,22 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setError(const char* text);
virtual void setLockout();
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector);
virtual void clearDStar();
virtual void writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type);
virtual void clearDMR(unsigned int slotNo);
virtual void writeFusion(const char* source, const char* dest);
virtual void clearFusion();
virtual void close();
protected:
virtual void setIdleInt();
virtual void setErrorInt(const char* text);
virtual void setLockoutInt();
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);
virtual void clearFusionInt();
private:
unsigned int m_rows;
unsigned int m_cols;

View file

@ -494,6 +494,8 @@ int CMMDVMHost::run()
unsigned int ms = stopWatch.elapsed();
stopWatch.start();
m_display->clock(ms);
m_modem->clock(ms);
m_modeTimer.clock(ms);

View file

@ -41,7 +41,7 @@ private:
CModem* m_modem;
CDStarNetwork* m_dstarNetwork;
CDMRIPSC* m_dmrNetwork;
IDisplay* m_display;
CDisplay* m_display;
unsigned char m_mode;
CTimer m_modeTimer;
CTimer m_dmrTXTimer;

View file

@ -24,6 +24,7 @@
#include <cstring>
CNextion::CNextion(const std::string& callsign, unsigned int dmrid, const std::string& size, const std::string& port, unsigned int brightness) :
CDisplay(),
m_callsign(callsign),
m_dmrid(dmrid),
m_size(size),
@ -57,7 +58,7 @@ bool CNextion::open()
return true;
}
void CNextion::setIdle()
void CNextion::setIdleInt()
{
sendCommand("page MMDVM");
@ -70,7 +71,7 @@ void CNextion::setIdle()
m_mode = MODE_IDLE;
}
void CNextion::setError(const char* text)
void CNextion::setErrorInt(const char* text)
{
assert(text != NULL);
@ -85,7 +86,7 @@ void CNextion::setError(const char* text)
m_mode = MODE_ERROR;
}
void CNextion::setLockout()
void CNextion::setLockoutInt()
{
sendCommand("page MMDVM");
@ -94,7 +95,7 @@ void CNextion::setLockout()
m_mode = MODE_LOCKOUT;
}
void CNextion::writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
{
assert(my1 != NULL);
assert(my2 != NULL);
@ -127,7 +128,7 @@ void CNextion::writeDStar(const char* my1, const char* my2, const char* your, co
m_mode = MODE_DSTAR;
}
void CNextion::clearDStar()
void CNextion::clearDStarInt()
{
sendCommand("t0.txt=\"Listening\"");
sendCommand("t1.txt=\"\"");
@ -135,7 +136,7 @@ void CNextion::clearDStar()
sendCommand("t2.txt=\"\"");
}
void CNextion::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
{
assert(type != NULL);
@ -169,7 +170,7 @@ void CNextion::writeDMR(unsigned int slotNo, const std::string& src, bool group,
m_mode = MODE_DMR;
}
void CNextion::clearDMR(unsigned int slotNo)
void CNextion::clearDMRInt(unsigned int slotNo)
{
if (slotNo == 1U) {
sendCommand("t0.txt=\"1 Listening\"");
@ -180,7 +181,7 @@ void CNextion::clearDMR(unsigned int slotNo)
}
}
void CNextion::writeFusion(const char* source, const char* dest)
void CNextion::writeFusionInt(const char* source, const char* dest)
{
assert(source != NULL);
assert(dest != NULL);
@ -198,7 +199,7 @@ void CNextion::writeFusion(const char* source, const char* dest)
m_mode = MODE_YSF;
}
void CNextion::clearFusion()
void CNextion::clearFusionInt()
{
sendCommand("t0.txt=\"Listening\"");
sendCommand("t1.txt=\"\"");

View file

@ -25,7 +25,7 @@
#include <string>
class CNextion : public IDisplay
class CNextion : public CDisplay
{
public:
CNextion(const std::string& callsign, unsigned int dmrid, const std::string& size, const std::string& port, unsigned int brightness);
@ -33,22 +33,22 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setError(const char* text);
virtual void setLockout();
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector);
virtual void clearDStar();
virtual void writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type);
virtual void clearDMR(unsigned int slotNo);
virtual void writeFusion(const char* source, const char* dest);
virtual void clearFusion();
virtual void close();
protected:
virtual void setIdleInt();
virtual void setErrorInt(const char* text);
virtual void setLockoutInt();
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);
virtual void clearFusionInt();
private:
std::string m_callsign;
unsigned int m_dmrid;

View file

@ -18,7 +18,8 @@
#include "NullDisplay.h"
CNullDisplay::CNullDisplay()
CNullDisplay::CNullDisplay() :
CDisplay()
{
}
@ -31,39 +32,39 @@ bool CNullDisplay::open()
return true;
}
void CNullDisplay::setIdle()
void CNullDisplay::setIdleInt()
{
}
void CNullDisplay::setError(const char* text)
void CNullDisplay::setErrorInt(const char* text)
{
}
void CNullDisplay::setLockout()
void CNullDisplay::setLockoutInt()
{
}
void CNullDisplay::writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
void CNullDisplay::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
{
}
void CNullDisplay::clearDStar()
void CNullDisplay::clearDStarInt()
{
}
void CNullDisplay::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
void CNullDisplay::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
{
}
void CNullDisplay::clearDMR(unsigned int slotNo)
void CNullDisplay::clearDMRInt(unsigned int slotNo)
{
}
void CNullDisplay::writeFusion(const char* source, const char* dest)
void CNullDisplay::writeFusionInt(const char* source, const char* dest)
{
}
void CNullDisplay::clearFusion()
void CNullDisplay::clearFusionInt()
{
}

View file

@ -23,7 +23,7 @@
#include <string>
class CNullDisplay : public IDisplay
class CNullDisplay : public CDisplay
{
public:
CNullDisplay();
@ -31,22 +31,22 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setError(const char* text);
virtual void setLockout();
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector);
virtual void clearDStar();
virtual void writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type);
virtual void clearDMR(unsigned int slotNo);
virtual void writeFusion(const char* source, const char* dest);
virtual void clearFusion();
virtual void close();
protected:
virtual void setIdleInt();
virtual void setErrorInt(const char* text);
virtual void setLockoutInt();
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);
virtual void clearFusionInt();
private:
};

View file

@ -45,6 +45,7 @@ const unsigned char FONT_LARGE = 3U;
// x = 0 to 127, y = 0 to 159 - Portrait
CTFTSerial::CTFTSerial(const std::string& callsign, unsigned int dmrid, const std::string& port, unsigned int brightness) :
CDisplay(),
m_callsign(callsign),
m_dmrid(dmrid),
m_serial(port, SERIAL_9600),
@ -79,7 +80,7 @@ bool CTFTSerial::open()
return true;
}
void CTFTSerial::setIdle()
void CTFTSerial::setIdleInt()
{
// Clear the screen
clearScreen();
@ -101,7 +102,7 @@ void CTFTSerial::setIdle()
m_mode = MODE_IDLE;
}
void CTFTSerial::setError(const char* text)
void CTFTSerial::setErrorInt(const char* text)
{
assert(text != NULL);
@ -126,7 +127,7 @@ void CTFTSerial::setError(const char* text)
m_mode = MODE_ERROR;
}
void CTFTSerial::setLockout()
void CTFTSerial::setLockoutInt()
{
// Clear the screen
clearScreen();
@ -142,7 +143,7 @@ void CTFTSerial::setLockout()
m_mode = MODE_LOCKOUT;
}
void CTFTSerial::writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
void CTFTSerial::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
{
assert(my1 != NULL);
assert(my2 != NULL);
@ -182,7 +183,7 @@ void CTFTSerial::writeDStar(const char* my1, const char* my2, const char* your,
m_mode = MODE_DSTAR;
}
void CTFTSerial::clearDStar()
void CTFTSerial::clearDStarInt()
{
gotoPosPixel(5U, 70U);
displayText(" Listening ");
@ -194,7 +195,7 @@ void CTFTSerial::clearDStar()
displayText(" ");
}
void CTFTSerial::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
void CTFTSerial::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
{
assert(type != NULL);
@ -241,7 +242,7 @@ void CTFTSerial::writeDMR(unsigned int slotNo, const std::string& src, bool grou
m_mode = MODE_DMR;
}
void CTFTSerial::clearDMR(unsigned int slotNo)
void CTFTSerial::clearDMRInt(unsigned int slotNo)
{
if (slotNo == 1U) {
gotoPosPixel(5U, 55U);
@ -258,7 +259,7 @@ void CTFTSerial::clearDMR(unsigned int slotNo)
}
}
void CTFTSerial::writeFusion(const char* source, const char* dest)
void CTFTSerial::writeFusionInt(const char* source, const char* dest)
{
assert(source != NULL);
assert(dest != NULL);
@ -287,7 +288,7 @@ void CTFTSerial::writeFusion(const char* source, const char* dest)
m_mode = MODE_YSF;
}
void CTFTSerial::clearFusion()
void CTFTSerial::clearFusionInt()
{
gotoPosPixel(5U, 80U);
displayText(" Listening ");

View file

@ -25,7 +25,7 @@
#include <string>
class CTFTSerial : public IDisplay
class CTFTSerial : public CDisplay
{
public:
CTFTSerial(const std::string& callsign, unsigned int dmrid, const std::string& port, unsigned int brightness);
@ -33,22 +33,22 @@ public:
virtual bool open();
virtual void setIdle();
virtual void setError(const char* text);
virtual void setLockout();
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector);
virtual void clearDStar();
virtual void writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type);
virtual void clearDMR(unsigned int slotNo);
virtual void writeFusion(const char* source, const char* dest);
virtual void clearFusion();
virtual void close();
protected:
virtual void setIdleInt();
virtual void setErrorInt(const char* text);
virtual void setLockoutInt();
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);
virtual void clearFusionInt();
private:
std::string m_callsign;
unsigned int m_dmrid;

View file

@ -24,7 +24,7 @@
// #define DUMP_YSF
CYSFControl::CYSFControl(const std::string& callsign, IDisplay* display, unsigned int timeout, bool duplex, bool parrot) :
CYSFControl::CYSFControl(const std::string& callsign, CDisplay* display, unsigned int timeout, bool duplex, bool parrot) :
m_display(display),
m_duplex(duplex),
m_queue(2000U, "YSF Control"),

View file

@ -33,7 +33,7 @@
class CYSFControl {
public:
CYSFControl(const std::string& callsign, IDisplay* display, unsigned int timeout, bool duplex, bool parrot);
CYSFControl(const std::string& callsign, CDisplay* display, unsigned int timeout, bool duplex, bool parrot);
~CYSFControl();
bool writeModem(unsigned char* data);
@ -43,7 +43,7 @@ public:
void clock();
private:
IDisplay* m_display;
CDisplay* m_display;
bool m_duplex;
CRingBuffer<unsigned char> m_queue;
RPT_RF_STATE m_state;