mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-04 14:07:36 +00:00
Add the HD4470 type display to Raspberry Pis.
This commit is contained in:
parent
3f61e9a287
commit
070bf2bff4
7 changed files with 277 additions and 8 deletions
|
|
@ -27,6 +27,10 @@
|
|||
#include "NullDisplay.h"
|
||||
#include "YSFControl.h"
|
||||
|
||||
#if defined(RASPBERRY_PI)
|
||||
#include "HD44780.h"
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
|
|
@ -539,13 +543,23 @@ 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);
|
||||
#if defined(RASPBERRY_PI)
|
||||
} else if (type == "HD44780") {
|
||||
unsigned int rows = m_conf.getHD44780Rows();
|
||||
unsigned int columns = m_conf.getHD44780Columns();
|
||||
|
||||
LogInfo(" Rows: %u", rows);
|
||||
LogInfo(" Columns: %u", columns);
|
||||
|
||||
m_display = new CHD44780(rows, columns);
|
||||
#endif
|
||||
} else {
|
||||
m_display = new CNullDisplay;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue