Commit ac311718 authored by Trung Tran's avatar Trung Tran Committed by michael-west

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.
parent fcae26a8
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment