mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Add Surenoo UART-TFT panel (1.8inch, 128x160) support.
HobbyTronics TFT Shield has discontinued, here is a replacement TFT module that can be controlled from UART. Different from TFT Shield, it cannot display figures that stored in micro SD card. So appearance is simplified like OLED. Surenoo module sometimes ignores display commands (in busy stuation?), this driver buffers display status and refresh at clockInt().
This commit is contained in:
10
Display.cpp
10
Display.cpp
@@ -22,6 +22,7 @@
|
||||
#include "ModemSerialPort.h"
|
||||
#include "NullDisplay.h"
|
||||
#include "TFTSerial.h"
|
||||
#include "TFTSurenoo.h"
|
||||
#include "LCDproc.h"
|
||||
#include "Nextion.h"
|
||||
#include "CASTInfo.h"
|
||||
@@ -432,7 +433,7 @@ CDisplay* CDisplay::createDisplay(const CConf& conf, CUMP* ump, CModem* modem)
|
||||
LogInfo("Display Parameters");
|
||||
LogInfo(" Type: %s", type.c_str());
|
||||
|
||||
if (type == "TFT Serial") {
|
||||
if (type == "TFT Serial" || type == "TFT Surenoo") {
|
||||
std::string port = conf.getTFTSerialPort();
|
||||
unsigned int brightness = conf.getTFTSerialBrightness();
|
||||
|
||||
@@ -443,9 +444,12 @@ CDisplay* CDisplay::createDisplay(const CConf& conf, CUMP* ump, CModem* modem)
|
||||
if (port == "modem")
|
||||
serial = new CModemSerialPort(modem);
|
||||
else
|
||||
serial = new CSerialController(port, SERIAL_9600);
|
||||
serial = new CSerialController(port, (type == "TFT Serial") ? SERIAL_9600 : SERIAL_115200);
|
||||
|
||||
display = new CTFTSerial(conf.getCallsign(), dmrid, serial, brightness);
|
||||
if (type == "TFT Surenoo")
|
||||
display = new CTFTSurenoo(conf.getCallsign(), dmrid, serial, brightness);
|
||||
else
|
||||
display = new CTFTSerial(conf.getCallsign(), dmrid, serial, brightness);
|
||||
} else if (type == "Nextion") {
|
||||
std::string port = conf.getNextionPort();
|
||||
unsigned int brightness = conf.getNextionBrightness();
|
||||
|
||||
Reference in New Issue
Block a user