From 81f08ddff55fb5b181fb2575bd418eee2ac95937 Mon Sep 17 00:00:00 2001 From: Julian Arnold Date: Wed, 10 Dec 2014 12:08:40 -0800 Subject: e200: Expose temperature sensor through property tree (sensors/temp) --- host/lib/usrp/e300/e300_remote_codec_ctrl.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/e300/e300_remote_codec_ctrl.cpp') 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(0); _transact(); - return sensor_value_t("RSSI", _retval.rssi, "dB"); } + sensor_value_t get_temperature() + { + _clear(); + _args.action = uhd::htonx(transaction_t::ACTION_GET_TEMPERATURE); + _args.which = uhd::htonx(transaction_t::CHAIN_NONE); /*Unused*/ + _args.bits = uhd::htonx(0); + + _transact(); + return sensor_value_t("temp", _retval.temp, "C"); + } + private: void _transact() { { -- cgit v1.2.3