mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-07 15:34:04 +00:00
Add JSON RSSI and BER to P25.
This commit is contained in:
parent
fb5e5b5fa1
commit
c52ae58816
3 changed files with 102 additions and 35 deletions
|
|
@ -265,7 +265,7 @@ bool CYSFControl::processVWData(bool valid, unsigned char *data)
|
|||
m_maxRSSI = m_rssi;
|
||||
m_aveRSSI = m_rssi;
|
||||
m_rssiCountTotal = 1U;
|
||||
|
||||
|
||||
m_rssiAccum = m_rssi;
|
||||
m_rssiCount = 1U;
|
||||
|
||||
|
|
@ -1286,35 +1286,6 @@ void CYSFControl::enable(bool enabled)
|
|||
m_enabled = enabled;
|
||||
}
|
||||
|
||||
void CYSFControl::writeJSONRF(const char* action, const char* mode, const unsigned char* source, unsigned char dgid)
|
||||
{
|
||||
assert(action != NULL);
|
||||
assert(mode != NULL);
|
||||
assert(source != NULL);
|
||||
|
||||
nlohmann::json json;
|
||||
|
||||
writeJSONRF(json, action, source, dgid);
|
||||
|
||||
json["mode"] = mode;
|
||||
|
||||
WriteJSON("YSF", json);
|
||||
}
|
||||
|
||||
void CYSFControl::writeJSONRF(const char* action, float duration, float ber)
|
||||
{
|
||||
assert(action != NULL);
|
||||
|
||||
nlohmann::json json;
|
||||
|
||||
writeJSONRF(json, action);
|
||||
|
||||
json["duration"] = duration;
|
||||
json["ber"] = ber;
|
||||
|
||||
WriteJSON("YSF", json);
|
||||
}
|
||||
|
||||
void CYSFControl::writeJSONRSSI()
|
||||
{
|
||||
m_rssiAccum += m_rssi;
|
||||
|
|
@ -1355,6 +1326,35 @@ void CYSFControl::writeJSONBER(unsigned int bits, unsigned int errs)
|
|||
}
|
||||
}
|
||||
|
||||
void CYSFControl::writeJSONRF(const char* action, const char* mode, const unsigned char* source, unsigned char dgid)
|
||||
{
|
||||
assert(action != NULL);
|
||||
assert(mode != NULL);
|
||||
assert(source != NULL);
|
||||
|
||||
nlohmann::json json;
|
||||
|
||||
writeJSONRF(json, action, source, dgid);
|
||||
|
||||
json["mode"] = mode;
|
||||
|
||||
WriteJSON("YSF", json);
|
||||
}
|
||||
|
||||
void CYSFControl::writeJSONRF(const char* action, float duration, float ber)
|
||||
{
|
||||
assert(action != NULL);
|
||||
|
||||
nlohmann::json json;
|
||||
|
||||
writeJSONRF(json, action);
|
||||
|
||||
json["duration"] = duration;
|
||||
json["ber"] = ber;
|
||||
|
||||
WriteJSON("YSF", json);
|
||||
}
|
||||
|
||||
void CYSFControl::writeJSONRF(const char* action, float duration, float ber, unsigned char minRSSI, unsigned char maxRSSI, unsigned int aveRSSI)
|
||||
{
|
||||
assert(action != NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue