aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorTrung Tran <trung.tran@ettus.com>2018-11-11 17:52:16 -0800
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-11-13 17:12:38 -0800
commit48e83fa67664fbfcad54bb52b2ceb644edb79db1 (patch)
treea8a6d6d72e1d112c60777a9867f4a98d490d6275 /host/lib/usrp
parent07b0cc1b14ca8534234c89fdf0bd57a273f3f32a (diff)
downloaduhd-48e83fa67664fbfcad54bb52b2ceb644edb79db1.tar.gz
uhd-48e83fa67664fbfcad54bb52b2ceb644edb79db1.tar.bz2
uhd-48e83fa67664fbfcad54bb52b2ceb644edb79db1.zip
mpmd: increase rpc timeout during reading mb sensor
Reading motherboard sensor, sometimes, takes more than 2 seconds. We don't have asynchronous RPC, increase this timeout will help long sensor reading such as reading GPSD value when GPSD connection is unreliable.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/mpmd/mpmd_prop_tree.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_prop_tree.cpp b/host/lib/usrp/mpmd/mpmd_prop_tree.cpp
index 900846d54..c5982cb9a 100644
--- a/host/lib/usrp/mpmd/mpmd_prop_tree.cpp
+++ b/host/lib/usrp/mpmd/mpmd_prop_tree.cpp
@@ -166,11 +166,14 @@ void mpmd_impl::init_property_tree(
tree->create<sensor_value_t>(
mb_path / "sensors" / sensor_name)
.set_publisher([mb, sensor_name](){
- return sensor_value_t(
+ mb->set_timeout_init();
+ auto sensor_val = sensor_value_t(
mb->rpc->request_with_token<sensor_value_t::sensor_map_t>(
"get_mb_sensor", sensor_name
)
);
+ mb->set_timeout_default();
+ return sensor_val;
})
.set_coercer([](const sensor_value_t &){
throw uhd::runtime_error(