From 7a588a564529a29389371b9990477c4dab8a1771 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 22 Dec 2017 16:47:50 -0800 Subject: mpm: n310: Fix setting time source --- mpm/python/usrp_mpm/periph_manager/n310.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mpm') diff --git a/mpm/python/usrp_mpm/periph_manager/n310.py b/mpm/python/usrp_mpm/periph_manager/n310.py index fff1e0970..4ffaaabc4 100644 --- a/mpm/python/usrp_mpm/periph_manager/n310.py +++ b/mpm/python/usrp_mpm/periph_manager/n310.py @@ -359,8 +359,6 @@ class n310(PeriphManagerBase): # Init clocking self.enable_ref_clock(enable=True) self._ext_clock_freq = None - self._clock_source = None - self._time_source = None self._init_ref_clock_and_time(args.default_args) self._init_meas_clock() # Init CHDR transports @@ -589,6 +587,10 @@ class n310(PeriphManagerBase): def set_time_source(self, time_source): " Set a time source " assert time_source in self.get_time_sources() + if time_source == self.get_time_source(): + self.log.trace("Nothing to do -- time source already set.") + return + self._time_source = time_source self.mboard_regs_control.set_time_source(time_source, self.get_ref_clock_freq()) def enable_pps_out(self, enable): -- cgit v1.2.3