mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 00:35:53 +08:00
Changed variable type for callsign
This commit is contained in:
@@ -590,7 +590,7 @@ void CMMDVMHost::createDisplay()
|
|||||||
LogInfo(" Port: %s", port.c_str());
|
LogInfo(" Port: %s", port.c_str());
|
||||||
LogInfo(" Brightness: %u", brightness);
|
LogInfo(" Brightness: %u", brightness);
|
||||||
|
|
||||||
m_display = new CNextion(callsign.c_str(), dmrid, port, brightness);
|
m_display = new CNextion(callsign, dmrid, port, brightness);
|
||||||
#if defined(HD44780)
|
#if defined(HD44780)
|
||||||
} else if (type == "HD44780") {
|
} else if (type == "HD44780") {
|
||||||
unsigned int rows = m_conf.getHD44780Rows();
|
unsigned int rows = m_conf.getHD44780Rows();
|
||||||
|
|||||||
@@ -23,14 +23,14 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
CNextion::CNextion(const char* callsign, unsigned int dmrid, const std::string& port, unsigned int brightness) :
|
CNextion::CNextion(const std::string& callsign, unsigned int dmrid, const std::string& port, unsigned int brightness) :
|
||||||
m_callsign(callsign),
|
m_callsign(callsign),
|
||||||
m_dmrid(dmrid),
|
m_dmrid(dmrid),
|
||||||
m_serial(port, SERIAL_9600),
|
m_serial(port, SERIAL_9600),
|
||||||
m_brightness(brightness),
|
m_brightness(brightness),
|
||||||
m_mode(MODE_IDLE)
|
m_mode(MODE_IDLE)
|
||||||
{
|
{
|
||||||
assert(callsign != NULL);
|
assert(callsign.c_str() != NULL);
|
||||||
assert(brightness >= 0U && brightness <= 100U);
|
assert(brightness >= 0U && brightness <= 100U);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ void CNextion::setIdle()
|
|||||||
sendCommand("page MMDVM");
|
sendCommand("page MMDVM");
|
||||||
|
|
||||||
char command[30];
|
char command[30];
|
||||||
::sprintf(command, "t0.txt=\"%-6s / %u\"", m_callsign, m_dmrid);
|
::sprintf(command, "t0.txt=\"%-6s / %u\"", m_callsign.c_str(), m_dmrid);
|
||||||
|
|
||||||
sendCommand(command);
|
sendCommand(command);
|
||||||
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
class CNextion : public IDisplay
|
class CNextion : public IDisplay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CNextion(const char* callsign, unsigned int dmrid, const std::string& port, unsigned int brightness);
|
CNextion(const std::string& callsign, unsigned int dmrid, const std::string& port, unsigned int brightness);
|
||||||
virtual ~CNextion();
|
virtual ~CNextion();
|
||||||
|
|
||||||
virtual bool open();
|
virtual bool open();
|
||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
virtual void close();
|
virtual void close();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const char* m_callsign;
|
std::string m_callsign;
|
||||||
unsigned int m_dmrid;
|
unsigned int m_dmrid;
|
||||||
CSerialController m_serial;
|
CSerialController m_serial;
|
||||||
unsigned int m_brightness;
|
unsigned int m_brightness;
|
||||||
|
|||||||
Reference in New Issue
Block a user