diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-07-19 22:12:18 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-07-19 22:12:18 +0200 |
commit | 343df6eb8792b3efd33f4426766865ae03ccf316 (patch) | |
tree | b2c05c7adb4774a88d15a46ae040c3428194ed64 /src/output/SDR.cpp | |
parent | d521d4f0c5ad3b663a322453c5798626081cb1f3 (diff) | |
download | dabmod-343df6eb8792b3efd33f4426766865ae03ccf316.tar.gz dabmod-343df6eb8792b3efd33f4426766865ae03ccf316.tar.bz2 dabmod-343df6eb8792b3efd33f4426766865ae03ccf316.zip |
Add events
Diffstat (limited to 'src/output/SDR.cpp')
-rw-r--r-- | src/output/SDR.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/output/SDR.cpp b/src/output/SDR.cpp index 4fc3277..6c03b53 100644 --- a/src/output/SDR.cpp +++ b/src/output/SDR.cpp @@ -450,7 +450,7 @@ const string SDR::get_parameter(const string& parameter) const if (m_device) { const auto stat = m_device->get_run_statistics(); try { - const auto& value = stat.at(parameter).data; + const auto& value = stat.at(parameter).v; if (std::holds_alternative<string>(value)) { ss << std::get<string>(value); } @@ -489,19 +489,19 @@ const json::map_t SDR::get_all_values() const { json::map_t stat = m_device->get_run_statistics(); - stat["txgain"] = m_config.txgain; - stat["rxgain"] = m_config.rxgain; - stat["freq"] = m_config.frequency; - stat["muting"] = m_config.muting; - stat["temp"] = std::nullopt; + stat["txgain"].v = m_config.txgain; + stat["rxgain"].v = m_config.rxgain; + stat["freq"].v = m_config.frequency; + stat["muting"].v = m_config.muting; + stat["temp"].v = std::nullopt; if (m_device) { const std::optional<double> temp = m_device->get_temperature(); if (temp) { - stat["temp"] = *temp; + stat["temp"].v = *temp; } } - stat["queued_frames_ms"] = m_queue.size() * + stat["queued_frames_ms"].v = m_queue.size() * (size_t)chrono::duration_cast<chrono::milliseconds>(transmission_frame_duration(m_config.dabMode)) .count(); |