use UserDBentry from findWithName() to writeDMR(), add writeDMREx()

This commit is contained in:
SASANO Takayoshi
2020-03-08 08:06:27 +09:00
parent abf17e19fc
commit 4ff77c50d6
5 changed files with 58 additions and 30 deletions

View File

@@ -151,6 +151,28 @@ void CDisplay::writeDMR(unsigned int slotNo, const std::string& src, bool group,
writeDMRInt(slotNo, src, group, dst, type);
}
void CDisplay::writeDMR(unsigned int slotNo, const class CUserDBentry& src, bool group, const std::string& dst, const char* type)
{
assert(type != NULL);
if (slotNo == 1U) {
m_timer1.start();
m_mode1 = MODE_IDLE;
} else {
m_timer2.start();
m_mode2 = MODE_IDLE;
}
if (writeDMRIntEx(slotNo, src, group, dst, type) < 0) {
std::string src_str;
src_str = src.get(keyCALLSIGN);
if (!src.get(keyFIRST_NAME).empty())
src_str += " " + src.get(keyFIRST_NAME);
writeDMRInt(slotNo, src_str, group, dst, type);
}
}
void CDisplay::writeDMRRSSI(unsigned int slotNo, unsigned char rssi)
{
if (rssi != 0U)
@@ -386,6 +408,11 @@ void CDisplay::writeDStarBERInt(float ber)
{
}
int CDisplay::writeDMRIntEx(unsigned int slotNo, const class CUserDBentry& src, bool group, const std::string& dst, const char* type)
{
return -1; // not supported
}
void CDisplay::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
{
}