diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-11-18 17:39:22 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-11-18 17:39:22 +0100 |
commit | 7b0bd2675b7514e2292684bfe2bd647f87330727 (patch) | |
tree | 73f85d7b8f9dcabbb1c71f7956fd9f8cc2096a5d /src/output/UHD.cpp | |
parent | e84f532b9e97dc2ad53ad96cc9543a178d6f20fd (diff) | |
download | dabmod-7b0bd2675b7514e2292684bfe2bd647f87330727.tar.gz dabmod-7b0bd2675b7514e2292684bfe2bd647f87330727.tar.bz2 dabmod-7b0bd2675b7514e2292684bfe2bd647f87330727.zip |
Add SDR temperature to RC
Diffstat (limited to 'src/output/UHD.cpp')
-rw-r--r-- | src/output/UHD.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/output/UHD.cpp b/src/output/UHD.cpp index 1106fe0..9358072 100644 --- a/src/output/UHD.cpp +++ b/src/output/UHD.cpp @@ -451,6 +451,15 @@ const char* UHD::device_name(void) const return "UHD"; } +double UHD::get_temperature(void) const +{ + try { + return std::round(m_usrp->get_tx_sensor("temp", 0).to_real()); + } + catch (uhd::lookup_error &e) { + return std::numeric_limits<double>::quiet_NaN(); + } +} bool UHD::refclk_loss_needs_check() const { |