mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-04 14:07:36 +00:00
Change variable types for strings used in writeDMR
This commit is contained in:
parent
ba63f7fb19
commit
23738d97f6
10 changed files with 34 additions and 34 deletions
14
Nextion.cpp
14
Nextion.cpp
|
|
@ -125,10 +125,10 @@ void CNextion::clearDStar()
|
|||
sendCommand("t1.txt=\"\"");
|
||||
}
|
||||
|
||||
void CNextion::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
|
||||
void CNextion::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
|
||||
{
|
||||
assert(src != NULL);
|
||||
assert(dst != NULL);
|
||||
assert(src.c_str() != NULL);
|
||||
assert(dst.c_str() != NULL);
|
||||
assert(type != NULL);
|
||||
|
||||
if (m_mode != MODE_DMR) {
|
||||
|
|
@ -143,18 +143,18 @@ void CNextion::writeDMR(unsigned int slotNo, const char* src, bool group, const
|
|||
if (slotNo == 1U) {
|
||||
char text[30U];
|
||||
|
||||
::sprintf(text, "t0.txt=\"1 %s %s\"", type, src);
|
||||
::sprintf(text, "t0.txt=\"1 %s %s\"", type, src.c_str());
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%s%s\"", group ? "TG" : "", dst);
|
||||
::sprintf(text, "t1.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
|
||||
sendCommand(text);
|
||||
} else {
|
||||
char text[30U];
|
||||
|
||||
::sprintf(text, "t2.txt=\"2 %s %s\"", type, src);
|
||||
::sprintf(text, "t2.txt=\"2 %s %s\"", type, src.c_str());
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t3.txt=\"%s%s\"", group ? "TG" : "", dst);
|
||||
::sprintf(text, "t3.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
|
||||
sendCommand(text);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue