Skip to content

Commit

Permalink
fixed bug that fixed amplitude after using amplitude playback
Browse files Browse the repository at this point in the history
  • Loading branch information
bodokaiser committed Aug 4, 2018
1 parent 6aa2564 commit 5837768
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions device/dds/ad9910/ad9910.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (d *AD9910) SetAmplitude(x float64) {
if d.CFR2.RampEnabled() && d.CFR2.RampDest() == ad9910.RampDestAmplitude {
d.CFR2.SetRampEnabled(false)
}
d.CFR2.SetSTAmplScaleEnabled(true)

if !d.CFR1.RAMEnabled() {
d.STProfile0.SetAmplScaleFactor(asf)
Expand Down
1 change: 1 addition & 0 deletions device/dds/ad9910/ad9910_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func (s *AD9910TestSuite) TestSetAmplitude() {
s.d.CFR1.SetRAMEnabled(true)
s.d.CFR1.SetRAMDest(ad9910.RAMDestAmplitude)
s.d.SetAmplitude(0.230)
assert.True(s.T(), s.d.CFR2.STAmplScaleEnabled())
assert.InEpsilon(s.T(), 0.230,
ASFToAmplitude(s.d.ASF.AmplScaleFactor()), 1e-3)
assert.InEpsilon(s.T(), 0.230,
Expand Down

0 comments on commit 5837768

Please sign in to comment.