From e0e611aea74c30607397e70e79fbde023271a10f Mon Sep 17 00:00:00 2001
From: Derek Kozel <derek.kozel@ettus.com>
Date: Wed, 22 Aug 2018 16:51:36 +0100
Subject: X300: Correctly initialize antenna mapping for TwinRX

---
 host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'host')

diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
index aca4a5f00..c81036962 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -715,8 +715,11 @@ void x300_radio_ctrl_impl::setup_radio(
                 // We need a desired subscriber for antenna/value because the experts don't coerce that property.
                 _tree->access<std::string>(db_path / "rx_frontends" / _rx_fe_map[i].db_fe_name / "antenna" / "value")
                     .add_desired_subscriber(boost::bind(&x300_radio_ctrl_impl::_update_atr_leds, this, _1, i));
+                _update_atr_leds(_tree->access<std::string>
+                        (db_path / "rx_frontends" / _rx_fe_map[i].db_fe_name / "antenna" / "value").get(), i);
+            } else {
+                _update_atr_leds("", i); //init anyway, even if never called
             }
-            _update_atr_leds("", i); //init anyway, even if never called
         }
     }
 
-- 
cgit v1.2.3