mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 09:35:40 +08:00
Add FM mode display.
This commit is contained in:
22
Nextion.cpp
22
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);
|
||||
|
||||
Reference in New Issue
Block a user