diff --git a/CASTInfo.cpp b/CASTInfo.cpp index b1bed7f..cce34d8 100644 --- a/CASTInfo.cpp +++ b/CASTInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2018,2020 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 @@ -76,6 +76,10 @@ void CCASTInfo::setQuitInt() { } +void CCASTInfo::setFMInt() +{ +} + void CCASTInfo::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { if (m_modem != NULL) diff --git a/CASTInfo.h b/CASTInfo.h index 326ecad..9254995 100644 --- a/CASTInfo.h +++ b/CASTInfo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2018,2020 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 @@ -40,6 +40,7 @@ protected: virtual void setErrorInt(const char* text); virtual void setLockoutInt(); virtual void setQuitInt(); + virtual void setFMInt(); virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); virtual void clearDStarInt(); diff --git a/Defines.h b/Defines.h index 5c7fe76..18c103e 100644 --- a/Defines.h +++ b/Defines.h @@ -26,6 +26,9 @@ const unsigned char MODE_YSF = 3U; const unsigned char MODE_P25 = 4U; const unsigned char MODE_NXDN = 5U; const unsigned char MODE_POCSAG = 6U; + +const unsigned char MODE_FM = 10U; + const unsigned char MODE_CW = 98U; const unsigned char MODE_LOCKOUT = 99U; const unsigned char MODE_ERROR = 100U; diff --git a/Display.cpp b/Display.cpp index 5a74747..0b47b64 100644 --- a/Display.cpp +++ b/Display.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2017,2018,2020 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 @@ -101,6 +101,17 @@ void CDisplay::setQuit() setQuitInt(); } +void CDisplay::setFM() +{ + m_timer1.stop(); + m_timer2.stop(); + + m_mode1 = MODE_FM; + m_mode2 = MODE_FM; + + setFMInt(); +} + void CDisplay::writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { assert(my1 != NULL); @@ -190,6 +201,7 @@ void CDisplay::writeDMRBER(unsigned int slotNo, float ber) { writeDMRBERInt(slotNo, ber); } + void CDisplay::clearDMR(unsigned int slotNo) { if (slotNo == 1U) { diff --git a/Display.h b/Display.h index 74fa25b..17caa41 100644 --- a/Display.h +++ b/Display.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2017,2018,2020 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 @@ -42,6 +42,7 @@ public: void setLockout(); void setError(const char* text); void setQuit(); + void setFM(); void writeDStar(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); void writeDStarRSSI(unsigned char rssi); @@ -87,6 +88,7 @@ protected: virtual void setLockoutInt() = 0; virtual void setErrorInt(const char* text) = 0; virtual void setQuitInt() = 0; + virtual void setFMInt() = 0; virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) = 0; virtual void writeDStarRSSIInt(unsigned char rssi); diff --git a/HD44780.cpp b/HD44780.cpp index 970f174..ebbfcac 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -399,6 +399,37 @@ void CHD44780::setQuitInt() m_dmr = false; } +void CHD44780::setIdleInt() +{ + m_clockDisplayTimer.stop(); + ::lcdClear(m_fd); + +#ifdef ADAFRUIT_DISPLAY + adafruitLCDColour(AC_WHITE); +#endif + + if (m_pwm) { + if (m_pwmPin != 1U) + ::softPwmWrite(m_pwmPin, m_pwmDim); + else + ::pwmWrite(m_pwmPin, (m_pwmDim / 100) * 1024); + } + + // Print callsign and ID at on top row for all screen sizes + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "%-6s", m_callsign.c_str()); + ::lcdPosition(m_fd, m_cols - 7, 0); + ::lcdPrintf(m_fd, "%7u", m_dmrid); + + // Print MMDVM and Idle on bottom row for all screen sizes + ::lcdPosition(m_fd, 0, m_rows - 1); + ::lcdPuts(m_fd, "MMDVM"); + ::lcdPosition(m_fd, m_cols - 4, m_rows - 1); + ::lcdPuts(m_fd, "FM"); // Gets overwritten by clock on 2 line screen + + m_dmr = false; +} + void CHD44780::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { assert(my1 != NULL); diff --git a/HD44780.h b/HD44780.h index 6160482..18c036e 100644 --- a/HD44780.h +++ b/HD44780.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX & Tony Corbett G0WFV + * Copyright (C) 2016,2017,2018,2020 by Jonathan Naylor G4KLX & Tony Corbett G0WFV * * 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 @@ -101,6 +101,7 @@ protected: virtual void setErrorInt(const char* text); virtual void setLockoutInt(); virtual void setQuitInt(); + virtual void setFMInt(); virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); virtual void writeDStarRSSIInt(unsigned char rssi); diff --git a/LCDproc.cpp b/LCDproc.cpp index 8ef2721..96d9487 100644 --- a/LCDproc.cpp +++ b/LCDproc.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2016,2017,2018 by Tony Corbett G0WFV - * Copyright (C) 2018 by Jonathan Naylor G4KLX + * Copyright (C) 2018,2020 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 @@ -241,6 +241,23 @@ void CLCDproc::setQuitInt() m_dmr = false; } +void CLCDproc::setFMInt() +{ + m_clockDisplayTimer.stop(); // Stop the clock display + + if (m_screensDefined) { + socketPrintf(m_socketfd, "screen_set DStar -priority hidden"); + socketPrintf(m_socketfd, "screen_set DMR -priority hidden"); + socketPrintf(m_socketfd, "screen_set YSF -priority hidden"); + socketPrintf(m_socketfd, "screen_set P25 -priority hidden"); + socketPrintf(m_socketfd, "screen_set NXDN -priority hidden"); + socketPrintf(m_socketfd, "widget_set Status Status %u %u FM", m_cols - 6, m_rows); + socketPrintf(m_socketfd, "output 0"); // Clear all LEDs + } + + m_dmr = false; +} + void CLCDproc::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { assert(my1 != NULL); diff --git a/LCDproc.h b/LCDproc.h index 2554d36..0352251 100644 --- a/LCDproc.h +++ b/LCDproc.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2016,2017 by Tony Corbett G0WFV - * Copyright (C) 2018 by Jonathan Naylor G4KLX + * Copyright (C) 2018,2020 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 @@ -40,8 +40,8 @@ protected: virtual void setErrorInt(const char* text); virtual void setLockoutInt(); virtual void setQuitInt(); + virtual void setFMInt(); - virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); virtual void writeDStarRSSIInt(unsigned char rssi); virtual void clearDStarInt(); diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 9d4eeb9..157c5bb 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -658,10 +658,7 @@ int CMMDVMHost::run() m_modem->setFMCallsignParams(callsign, callsignSpeed, callsignFrequency, callsignTime, callsignHoldoff, callsignHighLevel, callsignLowLevel, callsignAtStart, callsignAtEnd); m_modem->setFMAckParams(ack, ackSpeed, ackFrequency, ackDelay, ackLevel); - m_modem->setFMTimeoutParams(timeout, timeoutLevel); - m_modem->setFMCTCSSParams(ctcssFrequency, ctcssThreshold, ctcssLevel); - m_modem->setFMMiscParams(inputLevel, outputLevel, kerchunkTime, hangTime); - m_modem->setFMStart(); + m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssThreshold, ctcssLevel, inputLevel, outputLevel, kerchunkTime, hangTime); } bool remoteControlEnabled = m_conf.getRemoteControlEnabled(); @@ -701,6 +698,12 @@ int CMMDVMHost::run() else if (!error && m_mode == MODE_ERROR) setMode(MODE_IDLE); + unsigned char mode = m_modem->getMode(); + if (mode == MODE_FM && m_mode != MODE_FM) + setMode(mode); + else if (mode != MODE_FM && m_mode == MODE_FM) + setMode(mode); + if (m_ump != NULL) { bool tx = m_modem->hasTX(); m_ump->setTX(tx); @@ -1743,6 +1746,45 @@ void CMMDVMHost::setMode(unsigned char mode) createLockFile("POCSAG"); break; + case MODE_FM: + LogMessage("Mode set to FM"); + if (m_dstarNetwork != NULL) + m_dstarNetwork->enable(false); + if (m_dmrNetwork != NULL) + m_dmrNetwork->enable(false); + if (m_ysfNetwork != NULL) + m_ysfNetwork->enable(false); + if (m_p25Network != NULL) + m_p25Network->enable(false); + if (m_nxdnNetwork != NULL) + m_nxdnNetwork->enable(false); + if (m_pocsagNetwork != NULL) + m_pocsagNetwork->enable(false); + if (m_dstar != NULL) + m_dstar->enable(false); + if (m_dmr != NULL) + m_dmr->enable(false); + if (m_ysf != NULL) + m_ysf->enable(false); + if (m_p25 != NULL) + m_p25->enable(false); + if (m_nxdn != NULL) + m_nxdn->enable(false); + if (m_pocsag != NULL) + m_pocsag->enable(false); + if (m_mode == MODE_DMR && m_duplex && m_modem->hasTX()) { + m_modem->writeDMRStart(false); + m_dmrTXTimer.stop(); + } + if (m_ump != NULL) + m_ump->setMode(MODE_FM); + m_display->setFM(); + m_mode = MODE_FM; + m_modeTimer.stop(); + m_cwIdTimer.stop(); + createLockFile("FM"); + break; + case MODE_LOCKOUT: LogMessage("Mode set to Lockout"); if (m_dstarNetwork != NULL) diff --git a/Modem.cpp b/Modem.cpp index 6da68fb..798d4fe 100644 --- a/Modem.cpp +++ b/Modem.cpp @@ -79,9 +79,6 @@ const unsigned char MMDVM_POCSAG_DATA = 0x50U; const unsigned char MMDVM_FM_PARAMS1 = 0x60U; const unsigned char MMDVM_FM_PARAMS2 = 0x61U; const unsigned char MMDVM_FM_PARAMS3 = 0x62U; -const unsigned char MMDVM_FM_PARAMS4 = 0x63U; -const unsigned char MMDVM_FM_PARAMS5 = 0x64U; -const unsigned char MMDVM_FM_START = 0x65U; const unsigned char MMDVM_ACK = 0x70U; const unsigned char MMDVM_NAK = 0x7FU; @@ -168,11 +165,12 @@ m_tx(false), m_cd(false), m_lockout(false), m_error(false), +m_mode(MODE_IDLE), m_hwType(HWT_UNKNOWN) { - assert(!port.empty()); - m_buffer = new unsigned char[BUFFER_LENGTH]; + + assert(!port.empty()); } CModem::~CModem() @@ -525,6 +523,8 @@ void CModem::clock(unsigned int ms) m_nxdnSpace = 0U; m_pocsagSpace = 0U; + m_mode = m_buffer[4U]; + m_tx = (m_buffer[5U] & 0x01U) == 0x01U; bool adcOverflow = (m_buffer[5U] & 0x02U) == 0x02U; @@ -1713,6 +1713,11 @@ HW_TYPE CModem::getHWType() const return m_hwType; } +unsigned char CModem::getMode() const +{ + return m_mode; +} + bool CModem::setMode(unsigned char mode) { assert(m_serial != NULL); @@ -1926,23 +1931,32 @@ bool CModem::setFMAckParams(const std::string& ack, unsigned int ackSpeed, unsig return true; } -bool CModem::setFMTimeoutParams(unsigned int timeout, unsigned int timeoutLevel) +bool CModem::setFMMiscParams(unsigned int timeout, unsigned int timeoutLevel, float ctcssFrequency, unsigned int ctcssThreshold, unsigned int ctcssLevel, unsigned int inputLevel, unsigned int outputLevel, unsigned int kerchunkTime, unsigned int hangTime) { assert(m_serial != NULL); - unsigned char buffer[10U]; + unsigned char buffer[20U]; buffer[0U] = MMDVM_FRAME_START; - buffer[1U] = 5U; + buffer[1U] = 12U; buffer[2U] = MMDVM_FM_PARAMS3; buffer[3U] = timeout / 5U; buffer[4U] = timeoutLevel; - // CUtils::dump(1U, "Written", buffer, 5U); + buffer[5U] = (unsigned char)ctcssFrequency; + buffer[6U] = ctcssThreshold; + buffer[7U] = ctcssLevel; - int ret = m_serial->write(buffer, 5U); - if (ret != 5) + buffer[8U] = inputLevel; + buffer[9U] = outputLevel; + buffer[10U] = kerchunkTime; + buffer[11U] = hangTime; + + // CUtils::dump(1U, "Written", buffer, 12U); + + int ret = m_serial->write(buffer, 12U); + if (ret != 12) return false; unsigned int count = 0U; @@ -1970,112 +1984,6 @@ bool CModem::setFMTimeoutParams(unsigned int timeout, unsigned int timeoutLevel) return true; } -bool CModem::setFMCTCSSParams(float ctcssFrequency, unsigned int ctcssThreshold, unsigned int ctcssLevel) -{ - assert(m_serial != NULL); - - unsigned char buffer[10U]; - - buffer[0U] = MMDVM_FRAME_START; - buffer[1U] = 6U; - buffer[2U] = MMDVM_FM_PARAMS4; - - buffer[3U] = ctcssFrequency; // XXX - buffer[4U] = ctcssThreshold; - buffer[5U] = ctcssLevel; - - // CUtils::dump(1U, "Written", buffer, 6U); - - int ret = m_serial->write(buffer, 6U); - if (ret != 6) - return false; - - unsigned int count = 0U; - RESP_TYPE_MMDVM resp; - do { - CThread::sleep(10U); - - resp = getResponse(); - if (resp == RTM_OK && m_buffer[2U] != MMDVM_ACK && m_buffer[2U] != MMDVM_NAK) { - count++; - if (count >= MAX_RESPONSES) { - LogError("The MMDVM is not responding to the SET_FM_PARAMS4 command"); - return false; - } - } - } while (resp == RTM_OK && m_buffer[2U] != MMDVM_ACK && m_buffer[2U] != MMDVM_NAK); - - // CUtils::dump(1U, "Response", m_buffer, m_length); - - if (resp == RTM_OK && m_buffer[2U] == MMDVM_NAK) { - LogError("Received a NAK to the SET_FM_PARAMS4 command from the modem"); - return false; - } - - return true; -} - -bool CModem::setFMMiscParams(unsigned int inputLevel, unsigned int outputLevel, unsigned int kerchunkTime, unsigned int hangTime) -{ - assert(m_serial != NULL); - - unsigned char buffer[10U]; - - buffer[0U] = MMDVM_FRAME_START; - buffer[1U] = 7U; - buffer[2U] = MMDVM_FM_PARAMS5; - - buffer[3U] = inputLevel; - buffer[4U] = outputLevel; - buffer[5U] = kerchunkTime; - buffer[6U] = hangTime; - - // CUtils::dump(1U, "Written", buffer, 7U); - - int ret = m_serial->write(buffer, 7U); - if (ret != 7) - return false; - - unsigned int count = 0U; - RESP_TYPE_MMDVM resp; - do { - CThread::sleep(10U); - - resp = getResponse(); - if (resp == RTM_OK && m_buffer[2U] != MMDVM_ACK && m_buffer[2U] != MMDVM_NAK) { - count++; - if (count >= MAX_RESPONSES) { - LogError("The MMDVM is not responding to the SET_FM_PARAMS5 command"); - return false; - } - } - } while (resp == RTM_OK && m_buffer[2U] != MMDVM_ACK && m_buffer[2U] != MMDVM_NAK); - - // CUtils::dump(1U, "Response", m_buffer, m_length); - - if (resp == RTM_OK && m_buffer[2U] == MMDVM_NAK) { - LogError("Received a NAK to the SET_FM_PARAMS5 command from the modem"); - return false; - } - - return true; -} - -bool CModem::setFMStart() -{ - assert(m_serial != NULL); - - unsigned char buffer[10U]; - - buffer[0U] = MMDVM_FRAME_START; - buffer[1U] = 3U; - buffer[2U] = MMDVM_FM_START; - - // CUtils::dump(1U, "Written", buffer, 3U); - - return m_serial->write(buffer, 3U) == 3; -} - void CModem::printDebug() { if (m_buffer[2U] == MMDVM_DEBUG1) { diff --git a/Modem.h b/Modem.h index 7ac387b..068c4d6 100644 --- a/Modem.h +++ b/Modem.h @@ -47,10 +47,7 @@ public: virtual bool setFMCallsignParams(const std::string& callsign, unsigned int callsignSpeed, unsigned int callsignFrequency, unsigned int callsignTime, unsigned int callsignHoldoff, unsigned int callsignHighLevel, unsigned int callsignLowLevel, bool callsignAtStart, bool callsignAtEnd); virtual bool setFMAckParams(const std::string& ack, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int ackDelay, unsigned int ackLevel); - virtual bool setFMTimeoutParams(unsigned int timeout, unsigned int timeoutLevel); - virtual bool setFMCTCSSParams(float ctcssFrequency, unsigned int ctcssThreshold, unsigned int ctcssLevel); - virtual bool setFMMiscParams(unsigned int inputLevel, unsigned int outputLevel, unsigned int kerchunkTime, unsigned int hangTime); - virtual bool setFMStart(); + virtual bool setFMMiscParams(unsigned int timeout, unsigned int timeoutLevel, float ctcssFrequency, unsigned int ctcssThreshold, unsigned int ctcssLevel, unsigned int inputLevel, unsigned int outputLevel, unsigned int kerchunkTime, unsigned int hangTime); virtual bool open(); @@ -102,6 +99,7 @@ public: virtual bool writeSerial(const unsigned char* data, unsigned int length); + virtual unsigned char getMode() const; virtual bool setMode(unsigned char mode); virtual bool sendCWId(const std::string& callsign); @@ -181,6 +179,7 @@ private: bool m_cd; bool m_lockout; bool m_error; + unsigned char m_mode; HW_TYPE m_hwType; bool readVersion(); diff --git a/Nextion.cpp b/Nextion.cpp index 4f9c9ca..f15d6cf 100644 --- a/Nextion.cpp +++ b/Nextion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2017,2018,2020 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 @@ -102,7 +102,6 @@ bool CNextion::open() return true; } - void CNextion::setIdleInt() { // a few bits borrowed from Lieven De Samblanx ON7LDS, NextionDriver @@ -240,6 +239,25 @@ void CNextion::setQuitInt() m_mode = MODE_QUIT; } +void CNextion::setFMInt() +{ + sendCommand("page MMDVM"); + sendCommandAction(1U); + + char command[20]; + if (m_brightness > 0) { + ::sprintf(command, "dim=%u", m_brightness); + sendCommand(command); + } + + sendCommand("t0.txt=\"FM\""); + sendCommandAction(15U); + + m_clockDisplayTimer.stop(); + + m_mode = MODE_FM; +} + void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { assert(my1 != NULL); diff --git a/Nextion.h b/Nextion.h index 1c70134..d9896e0 100644 --- a/Nextion.h +++ b/Nextion.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2017,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2017,2018,2020 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 @@ -41,6 +41,7 @@ protected: virtual void setErrorInt(const char* text); virtual void setLockoutInt(); virtual void setQuitInt(); + virtual void setFMInt(); virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); virtual void writeDStarRSSIInt(unsigned char rssi); diff --git a/NullDisplay.cpp b/NullDisplay.cpp index 6219ec8..d08cf00 100644 --- a/NullDisplay.cpp +++ b/NullDisplay.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2018,2020 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 @@ -60,6 +60,10 @@ void CNullDisplay::setQuitInt() { } +void CNullDisplay::setFMInt() +{ +} + void CNullDisplay::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { #if defined(RASPBERRY_PI) diff --git a/NullDisplay.h b/NullDisplay.h index 50f40b8..ac99dd8 100644 --- a/NullDisplay.h +++ b/NullDisplay.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2018,2020 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 @@ -38,6 +38,7 @@ protected: virtual void setErrorInt(const char* text); virtual void setLockoutInt(); virtual void setQuitInt(); + virtual void setFMInt(); virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); virtual void clearDStarInt(); diff --git a/TFTSerial.cpp b/TFTSerial.cpp index c2338f3..59867b9 100644 --- a/TFTSerial.cpp +++ b/TFTSerial.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018,2020 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 @@ -161,6 +161,22 @@ void CTFTSerial::setQuitInt() m_mode = MODE_QUIT; } +void CTFTSerial::setFMInt() +{ + // Clear the screen + clearScreen(); + + setFontSize(FONT_LARGE); + + // Draw MMDVM logo + displayBitmap(0U, 0U, "MMDVM_sm.bmp"); + + gotoPosPixel(20U, 60U); + displayText("FM"); + + m_mode = MODE_FM; +} + void CTFTSerial::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { assert(my1 != NULL); diff --git a/TFTSerial.h b/TFTSerial.h index 296a4b1..314e555 100644 --- a/TFTSerial.h +++ b/TFTSerial.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018,2020 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 @@ -40,6 +40,7 @@ protected: virtual void setErrorInt(const char* text); virtual void setLockoutInt(); virtual void setQuitInt(); + virtual void setFMInt(); virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); virtual void clearDStarInt(); diff --git a/TFTSurenoo.cpp b/TFTSurenoo.cpp index a2eba9e..5f0ddbd 100644 --- a/TFTSurenoo.cpp +++ b/TFTSurenoo.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2019 by SASANO Takayoshi JG1UAA - * Copyright (C) 2015,2016,2018,2019 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018,2019,2020 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 @@ -174,6 +174,14 @@ void CTFTSurenoo::setQuitInt() m_mode = MODE_QUIT; } +void CTFTSurenoo::setFMInt() +{ + setModeLine(STR_MMDVM); + setStatusLine(statusLineNo(1), "FM"); + + m_mode = MODE_FM; +} + void CTFTSurenoo::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { assert(my1 != NULL); diff --git a/TFTSurenoo.h b/TFTSurenoo.h index d058c3e..0c54c24 100644 --- a/TFTSurenoo.h +++ b/TFTSurenoo.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2019 by SASANO Takayoshi JG1UAA - * Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018,2020 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 @@ -42,6 +42,7 @@ protected: virtual void setErrorInt(const char* text); virtual void setLockoutInt(); virtual void setQuitInt(); + virtual void setFMInt(); virtual void writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector); virtual void clearDStarInt(); diff --git a/Version.h b/Version.h index 430e00d..d1073ff 100644 --- a/Version.h +++ b/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20200409"; +const char* VERSION = "20200411"; #endif