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:
SASANO Takayoshi
2019-12-01 16:33:19 +09:00
parent ed7f593e07
commit f3844ceae8
10 changed files with 539 additions and 10 deletions

View File

@@ -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();