mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-04 14:07:36 +00:00
Add initial support for the Nextion display.
This commit is contained in:
parent
371684ae03
commit
a731703ac9
10 changed files with 302 additions and 8 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include "TFTSerial.h"
|
||||
#include "NullDisplay.h"
|
||||
#include "YSFControl.h"
|
||||
#include "Nextion.h"
|
||||
|
||||
#if defined(HD44780)
|
||||
#include "HD44780.h"
|
||||
|
|
@ -571,13 +572,21 @@ void CMMDVMHost::createDisplay()
|
|||
LogInfo(" Type: %s", type.c_str());
|
||||
|
||||
if (type == "TFT Serial") {
|
||||
std::string port = m_conf.getTFTSerialPort();
|
||||
std::string port = m_conf.getTFTSerialPort();
|
||||
unsigned int brightness = m_conf.getTFTSerialBrightness();
|
||||
|
||||
LogInfo(" Port: %s", port.c_str());
|
||||
LogInfo(" Brightness: %u", brightness);
|
||||
|
||||
m_display = new CTFTSerial(port, brightness);
|
||||
} else if (type == "Nextion") {
|
||||
std::string port = m_conf.getNextionPort();
|
||||
unsigned int brightness = m_conf.getNextionBrightness();
|
||||
|
||||
LogInfo(" Port: %s", port.c_str());
|
||||
LogInfo(" Brightness: %u", brightness);
|
||||
|
||||
m_display = new CNextion(port, brightness);
|
||||
#if defined(HD44780)
|
||||
} else if (type == "HD44780") {
|
||||
unsigned int rows = m_conf.getHD44780Rows();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue