forked from M-Labs/artiq
1
0
Fork 0

devices/dds_core: fix merging of back-to-back pulses of different frequencies

This commit is contained in:
Sebastien Bourdeauducq 2014-10-13 23:58:32 +08:00
parent 8a06f93eb2
commit a303293e8f
1 changed files with 3 additions and 2 deletions

View File

@ -50,9 +50,10 @@ class DDS(AutoContext):
"""
if self.previous_frequency != frequency:
if self.sw.previous_timestamp != time_to_cycles(now()):
merge = self.sw.previous_timestamp == time_to_cycles(now())
if not merge:
self.sw.sync()
if self.sw.previous_value:
if merge or bool(self.sw.previous_value):
# Channel is already on.
# Precise timing of frequency change is required.
fud_time = time_to_cycles(now())