summaryrefslogtreecommitdiffstats
path: root/src/output/UHD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/UHD.cpp')
-rw-r--r--src/output/UHD.cpp9
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
{