diff options
author | Julian Arnold <julian.arnold@ettus.com> | 2014-12-10 12:08:40 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-20 19:33:05 +0100 |
commit | 81f08ddff55fb5b181fb2575bd418eee2ac95937 (patch) | |
tree | 5de7307608606c6a508324f32b25c64f08696738 /host/lib/usrp/e300/e300_remote_codec_ctrl.cpp | |
parent | 93bd61a0fec4ea7e81ba78f62fb998116266ac96 (diff) | |
download | uhd-81f08ddff55fb5b181fb2575bd418eee2ac95937.tar.gz uhd-81f08ddff55fb5b181fb2575bd418eee2ac95937.tar.bz2 uhd-81f08ddff55fb5b181fb2575bd418eee2ac95937.zip |
e200: Expose temperature sensor through property tree (sensors/temp)
Diffstat (limited to 'host/lib/usrp/e300/e300_remote_codec_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/e300/e300_remote_codec_ctrl.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp index ed8131e2f..0ea837a85 100644 --- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp +++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp @@ -116,10 +116,20 @@ public: _args.bits = uhd::htonx<boost::uint32_t>(0); _transact(); - return sensor_value_t("RSSI", _retval.rssi, "dB"); } + sensor_value_t get_temperature() + { + _clear(); + _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_TEMPERATURE); + _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/ + _args.bits = uhd::htonx<boost::uint32_t>(0); + + _transact(); + return sensor_value_t("temp", _retval.temp, "C"); + } + private: void _transact() { { |