2016-05-06 23:03:39 +00:00
|
|
|
/*
|
2020-05-02 19:42:54 +00:00
|
|
|
* Copyright (C) 2016,2017,2018,2020 by Jonathan Naylor G4KLX
|
2016-05-06 23:03:39 +00:00
|
|
|
*
|
|
|
|
* 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 "OLED.h"
|
2018-04-07 15:49:12 +00:00
|
|
|
#include "Log.h"
|
2020-11-17 11:50:00 +00:00
|
|
|
#include "NetworkInfo.h"
|
2016-05-06 23:03:39 +00:00
|
|
|
|
2017-08-06 16:35:10 +00:00
|
|
|
//Logo MMDVM for Idle Screen
|
2020-11-17 11:50:00 +00:00
|
|
|
static unsigned char logo_glcd_bmp[] = {
|
|
|
|
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x01U, 0xF8U, 0x03U, 0xFCU, 0x7FU, 0x80U, 0x3FU, 0xC7U, 0xFFU, 0xFCU, 0xF8U, 0x00U, 0xF9U, 0xFCU, 0x01U, 0xFEU,
|
|
|
|
0x01U, 0xFCU, 0x07U, 0xFCU, 0x7FU, 0xC0U, 0x7FU, 0xC4U, 0x00U, 0x02U, 0x48U, 0x00U, 0x91U, 0xFEU, 0x03U, 0xFEU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|
|
|
0x3CU, 0x01U, 0xF0U, 0x3CU, 0x78U, 0x1FU, 0x03U, 0xC4U, 0x00U, 0x02U, 0x02U, 0x02U, 0x3CU, 0x00U, 0xF8U, 0x1EU,
|
|
|
|
0x7CU, 0x01U, 0xF0U, 0x3CU, 0x78U, 0x1FU, 0x03U, 0xC7U, 0xFFU, 0xFCU, 0x01U, 0xFCU, 0x7CU, 0x00U, 0xF8U, 0x1EU,
|
|
|
|
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U};
|
2017-08-06 16:35:10 +00:00
|
|
|
|
|
|
|
//Logo D-Star 128x16 px
|
2020-11-17 11:50:00 +00:00
|
|
|
static unsigned char logo_dstar_bmp[] = {
|
|
|
|
0x00U, 0x00U, 0x20U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x00U, 0x60U, 0x03U, 0xFFU, 0xC0U, 0x00U, 0x00U, 0x1FU, 0xF0U, 0xFFU, 0xFEU, 0x07U, 0x80U, 0x3FU, 0xF8U,
|
|
|
|
0x00U, 0x00U, 0xC0U, 0x07U, 0xC1U, 0xD0U, 0x00U, 0x00U, 0x78U, 0x7CU, 0xFFU, 0xFEU, 0x0FU, 0xC0U, 0x3FU, 0xFCU,
|
|
|
|
0x00U, 0x01U, 0xC0U, 0x07U, 0x80U, 0xF0U, 0x00U, 0x00U, 0xD0U, 0x3CU, 0x07U, 0x80U, 0x0FU, 0xC0U, 0x78U, 0x0EU,
|
|
|
|
0x00U, 0x03U, 0xC0U, 0x07U, 0x80U, 0x70U, 0x00U, 0x00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0x0CU, 0x00U, 0xF3U, 0xC0U, 0x38U,
|
|
|
|
0x06U, 0x03U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x3CU, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x01U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U};
|
2017-08-06 16:35:10 +00:00
|
|
|
|
|
|
|
//Logo DMR 128x16 px
|
2020-11-17 11:50:00 +00:00
|
|
|
static unsigned char logo_dmr_bmp[] = {
|
|
|
|
0x00U, 0x01U, 0xFFU, 0xFFU, 0xF8U, 0x01U, 0xF8U, 0x00U, 0x00U, 0x1FU, 0x1FU, 0xFFU, 0xFFU, 0xFCU, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x01U, 0xFFU, 0xFFU, 0xFFU, 0x81U, 0xFCU, 0x00U, 0x00U, 0x3FU, 0x1FU, 0xFFU, 0xFFU, 0xFFU, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x01U, 0xFFU, 0xFFU, 0xFFU, 0xE1U, 0xFEU, 0x00U, 0x00U, 0xFFU, 0x1FU, 0xFFU, 0xFFU, 0xFFU, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x01U, 0xF8U, 0x00U, 0x0FU, 0xF1U, 0xFFU, 0x80U, 0x01U, 0xFFU, 0x1FU, 0x80U, 0x00U, 0x1FU, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x01U, 0xF8U, 0x00U, 0x03U, 0xF9U, 0xFFU, 0xC0U, 0x03U, 0xFFU, 0x1FU, 0x80U, 0x00U, 0x0FU, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x01U, 0xF8U, 0x00U, 0x01U, 0xF9U, 0xFFU, 0xD0U, 0x07U, 0xFFU, 0x1FU, 0x80U, 0x00U, 0x0FU, 0x00U, 0x00U,
|
|
|
|
0x00U, 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FU, 0xFFU, 0xF0U, 0x01U, 0xF0U, 0x00U, 0x00U, 0x1FU, 0x1FU, 0x80U, 0x01U, 0xFFU, 0x00U, 0x00U};
|
2017-08-06 16:35:10 +00:00
|
|
|
|
|
|
|
//Logo Fusion 128x16
|
2020-11-17 11:50:00 +00:00
|
|
|
const unsigned char logo_fusion_bmp [] = {
|
|
|
|
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x03U, 0xF8U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x00U, 0xFFU, 0xFFU, 0xD0U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x07U, 0xF0U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x00U, 0xFFU, 0x80U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x07U, 0xD0U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x00U, 0xFFU, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x01U, 0xFEU, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
|
|
|
|
0x03U, 0xFCU, 0x00U, 0x1FU, 0xE1U, 0xFEU, 0x1FU, 0xFFU, 0xF8U, 0x7FU, 0xC3U, 0xFFU, 0xFFU, 0x1FU, 0xFFU, 0xFEU,
|
|
|
|
0x03U, 0xFCU, 0x00U, 0x3FU, 0xC3U, 0xFCU, 0x3FU, 0x80U, 0x00U, 0x7FU, 0x87U, 0xF0U, 0xFF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, 0x00U, 0x07U, 0xFFU, 0x80U,
|
|
|
|
0x01U, 0xFFU, 0xFFU, 0xFFU, 0xF8U, 0x00U, 0x00U, 0x07U, 0xFFU, 0xC0U, 0x00U, 0x00U, 0x00U, 0x01U, 0xFFU, 0xC0U,
|
|
|
|
0x01U, 0xFFU, 0xC0U, 0x00U, 0x00U, 0x00U, 0x00U, 0x7FU, 0xFEU, 0x00U, 0x00U, 0x00U, 0x00U, 0x01U, 0xFFU, 0xC0U,
|
|
|
|
0x01U, 0xFFU, 0xC0U, 0x00U, 0x00U, 0x00U, 0x07U, 0xFFU, 0xD0U, 0x00U, 0x03U, 0xF0U, 0x00U, 0x03U, 0xFFU, 0xC0U,
|
|
|
|
0x01U, 0xFFU, 0xC0U, 0x00U, 0x00U, 0x00U, 0xFFU, 0xFFU, 0x80U, 0x00U, 0x1FU, 0xFFU, 0x00U, 0x1FU, 0xFFU, 0x00U,
|
|
|
|
0x01U, 0xFFU, 0xC0U, 0x00U, 0x00U, 0x07U, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0x87U, 0xFFU, 0xFFU, 0xFFU, 0xFCU, 0x00U,
|
|
|
|
0x01U, 0xFFU, 0xC0U, 0x00U, 0x00U, 0x07U, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0x80U, 0x7FU, 0xFFU, 0xFFU, 0xC0U, 0x00U,
|
|
|
|
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U};
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2018-04-12 12:36:17 +00:00
|
|
|
// Logo NXDN_sm, 128x16px
|
2020-11-17 11:50:00 +00:00
|
|
|
const unsigned char logo_NXDN_bmp [] = {
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xF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U, 0x0FU, 0xFFU,
|
|
|
|
0xF8U, 0x0FU, 0xC0U, 0x07U, 0xF0U, 0x0EU, 0x00U, 0xFCU, 0x00U, 0x00U, 0x07U, 0xC0U, 0x3FU, 0x00U, 0x1FU, 0xFFU,
|
|
|
|
0xF0U, 0x1FU, 0xD0U, 0x0FU, 0x80U, 0x3FU, 0x00U, 0x7CU, 0x00U, 0x00U, 0x3FU, 0xC0U, 0x7FU, 0x80U, 0x3FU, 0xFFU,
|
|
|
|
0xD0U, 0x3FU, 0xF0U, 0x0EU, 0x01U, 0xFFU, 0x80U, 0x38U, 0x00U, 0x07U, 0xFFU, 0x80U, 0xFFU, 0x80U, 0x7FU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU};
|
2016-11-11 21:26:07 +00:00
|
|
|
|
2020-11-16 16:56:36 +00:00
|
|
|
// Logo M17_sm, 128x16px
|
2020-11-13 16:01:46 +00:00
|
|
|
// XXX FIXME This is the NXDN logo, it needs replacing with the M17 logo
|
2020-11-17 11:50:00 +00:00
|
|
|
const unsigned char logo_M17_bmp [] = {
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU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, 0xFFU, 0x6FU, 0xEEU, 0xFFU, 0xDFU, 0xB6U, 0xFFU, 0xFBU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xDFU, 0xBFU, 0xFEU, 0xFFU, 0x6FU, 0xEEU, 0xFFU, 0xDFU, 0xD6U, 0xFFU, 0xFBU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xDFU, 0xBFU, 0xFEU, 0xFEU, 0xDFU, 0xF6U, 0xFFU, 0xDFU, 0xE6U, 0xFFU, 0xFBU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xDFU, 0x7FU, 0xFEU, 0xF9U, 0xDFU, 0xF6U, 0xFFU, 0xDFU, 0xE6U, 0xFFU, 0xFBU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xE6U, 0x7FU, 0xFEU, 0x07U, 0xFFU, 0xF6U, 0xFFU, 0xDFU, 0xF6U, 0x00U, 0xFBU, 0xFFU, 0xFFU,
|
|
|
|
0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU};
|
2018-06-13 11:36:28 +00:00
|
|
|
|
2019-09-27 20:28:57 +00:00
|
|
|
COLED::COLED(unsigned char displayType, unsigned char displayBrightness, bool displayInvert, bool displayScroll, bool displayRotate, bool displayLogoScreensaver, bool slot1Enabled, bool slot2Enabled) :
|
2016-05-06 23:03:39 +00:00
|
|
|
m_displayType(displayType),
|
|
|
|
m_displayBrightness(displayBrightness),
|
2017-08-13 09:57:02 +00:00
|
|
|
m_displayInvert(displayInvert),
|
2018-04-08 22:29:35 +00:00
|
|
|
m_displayScroll(displayScroll),
|
2018-10-30 14:30:41 +00:00
|
|
|
m_displayRotate(displayRotate),
|
2019-09-27 20:28:57 +00:00
|
|
|
m_displayLogoScreensaver(displayLogoScreensaver),
|
2018-04-08 22:29:35 +00:00
|
|
|
m_slot1Enabled(slot1Enabled),
|
2018-10-31 16:54:57 +00:00
|
|
|
m_slot2Enabled(slot2Enabled),
|
2020-11-17 11:50:00 +00:00
|
|
|
m_ipAddress(),
|
|
|
|
m_passCounter(0U),
|
2018-10-31 16:54:57 +00:00
|
|
|
m_display()
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
COLED::~COLED()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool COLED::open()
|
|
|
|
{
|
|
|
|
// SPI
|
2020-11-17 11:50:00 +00:00
|
|
|
if (m_display.oled_is_spi_proto(m_displayType)) {
|
2016-05-06 23:03:39 +00:00
|
|
|
// SPI change parameters to fit to your LCD
|
2020-11-17 11:50:00 +00:00
|
|
|
if (!m_display.init(OLED_SPI_DC, OLED_SPI_RESET, OLED_SPI_CS, m_displayType))
|
2016-05-06 23:03:39 +00:00
|
|
|
return false;
|
2020-11-17 11:50:00 +00:00
|
|
|
} else {
|
2016-05-06 23:03:39 +00:00
|
|
|
// I2C change parameters to fit to your LCD
|
2020-11-17 11:50:00 +00:00
|
|
|
if (!m_display.init(OLED_I2C_RESET, m_displayType))
|
2018-06-13 11:07:06 +00:00
|
|
|
return false;
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.begin();
|
2016-05-06 23:03:39 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.invertDisplay(m_displayInvert ? 1 : 0);
|
2016-11-03 21:43:29 +00:00
|
|
|
if (m_displayBrightness > 0U)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setBrightness(m_displayBrightness);
|
2016-05-06 23:03:39 +00:00
|
|
|
|
2018-10-30 14:30:41 +00:00
|
|
|
if (m_displayRotate > 0U) {
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.sendCommand(0xC0U);
|
|
|
|
m_display.sendCommand(0xA0U);
|
2018-10-30 14:30:41 +00:00
|
|
|
}
|
|
|
|
|
2016-05-06 23:03:39 +00:00
|
|
|
// init done
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.setTextWrap(false); // disable text wrap as default
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay(); // clears the screen buffer
|
|
|
|
m_display.display(); // display it (clear display)
|
2016-05-06 23:03:39 +00:00
|
|
|
|
|
|
|
OLED_statusbar();
|
2020-11-17 11:50:00 +00:00
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Startup");
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
|
2017-08-14 22:07:09 +00:00
|
|
|
return true;
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2016-05-10 15:17:49 +00:00
|
|
|
void COLED::setIdleInt()
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
2018-06-13 11:07:06 +00:00
|
|
|
m_mode = MODE_IDLE;
|
2016-05-06 23:03:39 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2016-05-06 23:03:39 +00:00
|
|
|
OLED_statusbar();
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-06-15 16:00:37 +00:00
|
|
|
if (m_displayScroll && m_displayLogoScreensaver)
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.startscrolldiagleft(0x00U, 0x0FU); //the MMDVM logo scrolls the whole screen
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_passCounter++;
|
|
|
|
if (m_passCounter > 253U)
|
|
|
|
m_ipAddress.clear();
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
if (m_ipAddress.empty()) {
|
|
|
|
unsigned char info[100U] = { 0x00U };
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
CNetworkInfo network;
|
|
|
|
network.getNetworkInterface(info);
|
|
|
|
m_ipAddress = (char*)info;
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_passCounter = 0U;
|
2018-06-13 11:07:06 +00:00
|
|
|
}
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2016-05-10 15:17:49 +00:00
|
|
|
void COLED::setErrorInt(const char* text)
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
|
|
|
m_mode = MODE_ERROR;
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2016-05-06 23:03:39 +00:00
|
|
|
OLED_statusbar();
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.setTextWrap(true); // text wrap temorally enable
|
2020-11-17 11:50:00 +00:00
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE1);
|
|
|
|
m_display.printf("%s\n", text);
|
|
|
|
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.setTextWrap(false);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2016-05-10 15:17:49 +00:00
|
|
|
void COLED::setLockoutInt()
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
|
|
|
m_mode = MODE_LOCKOUT;
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2016-05-06 23:03:39 +00:00
|
|
|
OLED_statusbar();
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, 30);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(3);
|
|
|
|
m_display.print("Lockout");
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(1);
|
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2018-08-15 16:17:42 +00:00
|
|
|
void COLED::setQuitInt()
|
|
|
|
{
|
|
|
|
m_mode = MODE_QUIT;
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2018-08-15 16:17:42 +00:00
|
|
|
OLED_statusbar();
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, 30);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(3);
|
|
|
|
m_display.print("Stopped");
|
2018-08-15 16:17:42 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(1);
|
|
|
|
m_display.display();
|
2018-08-15 16:17:42 +00:00
|
|
|
}
|
|
|
|
|
2020-05-02 19:42:54 +00:00
|
|
|
void COLED::setFMInt()
|
|
|
|
{
|
|
|
|
m_mode = MODE_FM;
|
|
|
|
|
|
|
|
m_display.clearDisplay();
|
|
|
|
OLED_statusbar();
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, 30);
|
2020-05-02 19:42:54 +00:00
|
|
|
m_display.setTextSize(3);
|
|
|
|
m_display.print("FM");
|
|
|
|
|
|
|
|
m_display.setTextSize(1);
|
|
|
|
m_display.display();
|
|
|
|
}
|
|
|
|
|
2016-05-10 15:17:49 +00:00
|
|
|
void COLED::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
|
|
|
m_mode = MODE_DSTAR;
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE3, m_display.width(), m_display.height(), BLACK); //clear everything beneath logo
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
|
|
|
m_display.printf("%s %.8s/%4.4s", type, my1, my2);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE4);
|
|
|
|
m_display.printf("-> %.8s", your);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
|
|
|
m_display.printf("via %.8s", reflector);
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
2017-08-14 22:07:09 +00:00
|
|
|
|
2016-05-10 16:04:50 +00:00
|
|
|
OLED_statusbar();
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2016-05-10 15:17:49 +00:00
|
|
|
void COLED::clearDStarInt()
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE3, m_display.width(), m_display.height(), BLACK); //clear everything beneath the logo
|
2017-08-14 22:07:09 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(40, OLED_LINE3);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Listening");
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
void COLED::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
|
2020-09-24 10:58:10 +00:00
|
|
|
{
|
|
|
|
CUserDBentry tmp;
|
|
|
|
|
|
|
|
tmp.set(keyCALLSIGN, src);
|
|
|
|
writeDMRIntEx(slotNo, tmp, group, dst, type);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define CALLandNAME(u) ((u).get(keyCALLSIGN) + " " + (u).get(keyFIRST_NAME))
|
|
|
|
|
|
|
|
int COLED::writeDMRIntEx(unsigned int slotNo, const class CUserDBentry& src, bool group, const std::string& dst, const char* type)
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
|
|
|
if (m_mode != MODE_DMR) {
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2018-06-13 11:07:06 +00:00
|
|
|
m_mode = MODE_DMR;
|
|
|
|
clearDMRInt(slotNo);
|
|
|
|
}
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
// If both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2
|
|
|
|
// If single slot, use lines 2-3
|
|
|
|
if (m_slot1Enabled && m_slot2Enabled) {
|
2018-06-13 11:07:06 +00:00
|
|
|
if (slotNo == 1U) {
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), 40, BLACK);
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE2);
|
|
|
|
m_display.printf("%s", CALLandNAME(src).c_str());
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
|
|
|
m_display.printf("Slot: %i %s %s%s", slotNo, type, group ? "TG: " : "", dst.c_str());
|
|
|
|
} else {
|
|
|
|
m_display.fillRect(0, OLED_LINE4, m_display.width(), 40, BLACK);
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE4);
|
|
|
|
m_display.printf("%s", CALLandNAME(src).c_str());
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.printf("Slot: %i %s %s%s",slotNo,type,group ? "TG: " : "",dst.c_str());
|
2018-06-13 11:07:06 +00:00
|
|
|
}
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE6, m_display.width(), 20, BLACK);
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s",m_ipAddress.c_str());
|
|
|
|
} else {
|
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE2);
|
|
|
|
m_display.printf("%s", CALLandNAME(src).c_str());
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
|
|
|
m_display.printf("Slot: %i %s %s%s", slotNo, type, group ? "TG: " : "", dst.c_str());
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE4);
|
|
|
|
m_display.printf("%s", src.get(keyCITY).c_str());
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
|
|
|
m_display.printf("%s", src.get(keySTATE).c_str());
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", src.get(keyCOUNTRY).c_str());
|
2018-06-13 11:07:06 +00:00
|
|
|
}
|
|
|
|
|
2016-05-06 23:03:39 +00:00
|
|
|
OLED_statusbar();
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2018-04-09 21:24:03 +00:00
|
|
|
|
2020-09-24 10:58:10 +00:00
|
|
|
// must be 0, to avoid calling writeDMRInt() from CDisplay::writeDMR()
|
|
|
|
return 0;
|
2018-10-31 16:54:57 +00:00
|
|
|
}
|
2016-05-06 23:03:39 +00:00
|
|
|
|
2016-05-10 15:17:49 +00:00
|
|
|
void COLED::clearDMRInt(unsigned int slotNo)
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
2020-11-17 11:50:00 +00:00
|
|
|
// If both slots, use lines 2-3 for slot 1, lines 4-5 for slot 2
|
|
|
|
// If single slot, use lines 2-3
|
|
|
|
if (m_slot1Enabled && m_slot2Enabled) {
|
2018-06-13 11:07:06 +00:00
|
|
|
if (slotNo == 1U) {
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE3, m_display.width(), 40, BLACK);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Slot: 1 Listening");
|
2020-11-17 11:50:00 +00:00
|
|
|
} else {
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE5, m_display.width(), 40, BLACK);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
|
|
|
m_display.print("Slot: 2 Listening");
|
2018-06-13 11:07:06 +00:00
|
|
|
}
|
2020-11-17 11:50:00 +00:00
|
|
|
} else {
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.printf("Slot: %i Listening",slotNo);
|
2018-06-13 11:07:06 +00:00
|
|
|
}
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE6, m_display.width(), 20, BLACK);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
OLED: fix build after f070410f7 and c7fbeecc5
============================
Display.cpp: In static member function 'static CDisplay* CDisplay::createDisplay(const CConf&, CUMP*, CModem*)':
Display.cpp:645:128: error: invalid new-expression of abstract class type 'COLED'
645 | display = new COLED(type, brightness, invert, scroll, rotate, logosaver, conf.getDMRNetworkSlot1(), conf.getDMRNetworkSlot2());
| ^
In file included from Display.cpp:39:
OLED.h:40:7: note: because the following virtual functions are pure within 'COLED':
40 | class COLED : public CDisplay
| ^~~~~
In file included from Display.cpp:19:
Display.h:105:15: note: 'virtual void CDisplay::writeFusionInt(const char*, const char*, unsigned char, const char*, const char*)'
105 | virtual void writeFusionInt(const char* source, const char* dest, unsigned char dgid, const char* type, const char* origin) = 0;
============================
2020-08-10 13:25:51 +00:00
|
|
|
void COLED::writeFusionInt(const char* source, const char* dest, unsigned char dgid, const char* type, const char* origin)
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
|
|
|
m_mode = MODE_YSF;
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE4);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.printf("%s %.10s", type, source);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
2020-08-09 18:23:18 +00:00
|
|
|
m_display.printf(" DG-ID %u", dgid);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2016-05-10 16:04:50 +00:00
|
|
|
OLED_statusbar();
|
2020-08-09 18:23:18 +00:00
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2016-05-10 15:17:49 +00:00
|
|
|
void COLED::clearFusionInt()
|
2016-05-06 23:03:39 +00:00
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(40, OLED_LINE4);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Listening");
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
2016-09-12 19:23:50 +00:00
|
|
|
void COLED::writeP25Int(const char* source, bool group, unsigned int dest, const char* type)
|
2016-09-12 17:12:32 +00:00
|
|
|
{
|
|
|
|
m_mode = MODE_P25;
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.printf("%s %.10s", type, source);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE4);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.printf(" %s%u", group ? "TG" : "", dest);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2016-09-12 17:12:32 +00:00
|
|
|
OLED_statusbar();
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-09-12 17:12:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void COLED::clearP25Int()
|
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(40, OLED_LINE4);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Listening");
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2016-09-12 17:12:32 +00:00
|
|
|
}
|
|
|
|
|
2018-01-17 19:04:00 +00:00
|
|
|
void COLED::writeNXDNInt(const char* source, bool group, unsigned int dest, const char* type)
|
2020-09-24 10:58:10 +00:00
|
|
|
{
|
|
|
|
CUserDBentry tmp;
|
|
|
|
|
|
|
|
tmp.set(keyCALLSIGN, source);
|
|
|
|
writeNXDNIntEx(tmp, group, dest, type);
|
|
|
|
}
|
|
|
|
|
|
|
|
int COLED::writeNXDNIntEx(const class CUserDBentry& source, bool group, unsigned int dest, const char* type)
|
2018-01-17 19:04:00 +00:00
|
|
|
{
|
|
|
|
m_mode = MODE_NXDN;
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
2018-01-17 19:04:00 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE2);
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.printf("%s %s", type, CALLandNAME(source).c_str());
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.printf(" %s%u", group ? "TG" : "", dest);
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE4);
|
|
|
|
m_display.printf("%s", source.get(keyCITY).c_str());
|
2018-01-17 19:04:00 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
|
|
|
m_display.printf("%s", source.get(keySTATE).c_str());
|
2020-09-24 10:58:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", source.get(keyCOUNTRY).c_str());
|
2018-01-17 19:04:00 +00:00
|
|
|
|
|
|
|
OLED_statusbar();
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2018-10-31 16:54:57 +00:00
|
|
|
|
2020-09-24 10:58:10 +00:00
|
|
|
// must be 0, to avoid calling writeNXDNInt() from CDisplay::writeNXDN()
|
|
|
|
return 0;
|
2018-01-17 19:04:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void COLED::clearNXDNInt()
|
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
2018-01-17 19:04:00 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(40, OLED_LINE3);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Listening");
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
2018-01-17 19:04:00 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2018-01-17 19:04:00 +00:00
|
|
|
}
|
|
|
|
|
2020-11-15 18:12:38 +00:00
|
|
|
void COLED::writeM17Int(const char* source, const char* dest, const char* type)
|
|
|
|
{
|
|
|
|
m_mode = MODE_M17;
|
|
|
|
|
|
|
|
m_display.clearDisplay();
|
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
2020-11-16 16:56:36 +00:00
|
|
|
m_display.printf("%s %s", type, source);
|
2020-11-15 18:12:38 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE4);
|
2020-11-15 18:12:38 +00:00
|
|
|
m_display.printf(" %s", dest);
|
|
|
|
|
|
|
|
OLED_statusbar();
|
|
|
|
m_display.display();
|
|
|
|
}
|
|
|
|
|
|
|
|
void COLED::clearM17Int()
|
|
|
|
{
|
|
|
|
m_display.fillRect(0, OLED_LINE2, m_display.width(), m_display.height(), BLACK);
|
|
|
|
|
|
|
|
m_display.setCursor(40, OLED_LINE4);
|
|
|
|
m_display.print("Listening");
|
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
2020-11-15 18:12:38 +00:00
|
|
|
|
|
|
|
m_display.display();
|
|
|
|
}
|
|
|
|
|
2018-06-13 10:54:02 +00:00
|
|
|
void COLED::writePOCSAGInt(uint32_t ric, const std::string& message)
|
|
|
|
{
|
|
|
|
m_mode = MODE_POCSAG;
|
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
|
|
|
m_display.fillRect(0, OLED_LINE1, m_display.width(), m_display.height(), BLACK);
|
2018-06-13 10:54:02 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE3);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.printf("RIC: %u", ric);
|
2018-06-13 10:54:02 +00:00
|
|
|
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.setTextWrap(true); // text wrap temorally enable
|
2020-11-17 11:50:00 +00:00
|
|
|
|
|
|
|
m_display.setCursor(0, OLED_LINE5);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.printf("MSG: %s", message.c_str());
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2020-09-24 10:58:10 +00:00
|
|
|
m_display.setTextWrap(false);
|
2018-06-13 10:54:02 +00:00
|
|
|
|
|
|
|
OLED_statusbar();
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2018-06-13 10:54:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void COLED::clearPOCSAGInt()
|
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.fillRect(0, OLED_LINE1, m_display.width(), m_display.height(), BLACK);
|
2018-06-13 10:54:02 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(40, OLED_LINE4);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Listening");
|
2018-06-13 11:07:06 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, OLED_LINE6);
|
|
|
|
m_display.printf("%s", m_ipAddress.c_str());
|
2018-06-13 10:54:02 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
2018-06-13 10:54:02 +00:00
|
|
|
}
|
|
|
|
|
2016-10-20 08:59:12 +00:00
|
|
|
void COLED::writeCWInt()
|
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, 30);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(3);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("CW TX");
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(1);
|
|
|
|
m_display.display();
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2020-06-15 16:00:37 +00:00
|
|
|
if (m_displayScroll)
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.startscrollleft(0x02U, 0x0FU);
|
2016-10-20 08:59:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void COLED::clearCWInt()
|
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, 30);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(3);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("Idle");
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(1);
|
|
|
|
m_display.display();
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2020-06-15 16:00:37 +00:00
|
|
|
if (m_displayScroll)
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.startscrollleft(0x02U, 0x0FU);
|
2016-10-20 08:59:12 +00:00
|
|
|
}
|
|
|
|
|
2016-05-06 23:03:39 +00:00
|
|
|
void COLED::close()
|
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.clearDisplay();
|
|
|
|
m_display.fillRect(0, 0, m_display.width(), 16, BLACK);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2020-06-15 16:00:37 +00:00
|
|
|
if (m_displayScroll)
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.startscrollleft(0x00U, 0x01U);
|
|
|
|
|
|
|
|
m_display.setCursor(0, 0);
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.setTextSize(2);
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.print("-CLOSE-");
|
2020-11-17 11:50:00 +00:00
|
|
|
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.display();
|
|
|
|
|
|
|
|
m_display.close();
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void COLED::OLED_statusbar()
|
|
|
|
{
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.stopscroll();
|
|
|
|
m_display.fillRect(0, 0, m_display.width(), 16, BLACK);
|
|
|
|
m_display.setTextColor(WHITE);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.setCursor(0, 0);
|
2016-05-06 23:03:39 +00:00
|
|
|
if (m_mode == MODE_DMR)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.drawBitmap(0, 0, logo_dmr_bmp, 128, 16, WHITE);
|
2016-05-10 16:04:50 +00:00
|
|
|
else if (m_mode == MODE_DSTAR)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.drawBitmap(0, 0, logo_dstar_bmp, 128, 16, WHITE);
|
2016-05-10 16:04:50 +00:00
|
|
|
else if (m_mode == MODE_YSF)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.drawBitmap(0, 0, logo_fusion_bmp, 128, 16, WHITE);
|
2016-09-12 17:12:32 +00:00
|
|
|
else if (m_mode == MODE_P25)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.drawBitmap(0, 0, logo_P25_bmp, 128, 16, WHITE);
|
2018-01-17 19:04:00 +00:00
|
|
|
else if (m_mode == MODE_NXDN)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.drawBitmap(0, 0, logo_NXDN_bmp, 128, 16, WHITE);
|
2020-11-15 18:12:38 +00:00
|
|
|
else if (m_mode == MODE_M17)
|
|
|
|
m_display.drawBitmap(0, 0, logo_M17_bmp, 128, 16, WHITE);
|
2018-06-13 11:36:28 +00:00
|
|
|
else if (m_mode == MODE_POCSAG)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.drawBitmap(0, 0, logo_POCSAG_bmp, 128, 16, WHITE);
|
2019-09-27 20:28:57 +00:00
|
|
|
else if (m_displayLogoScreensaver)
|
2018-11-01 09:29:49 +00:00
|
|
|
m_display.drawBitmap(0, 0, logo_glcd_bmp, 128, 16, WHITE);
|
2017-08-06 16:35:10 +00:00
|
|
|
|
2017-08-13 09:57:02 +00:00
|
|
|
if (m_displayScroll)
|
2020-11-17 11:50:00 +00:00
|
|
|
m_display.startscrollleft(0x00U, 0x01U);
|
2016-05-06 23:03:39 +00:00
|
|
|
}
|