diff --git a/device/dds/ad9910/ad9910.go b/device/dds/ad9910/ad9910.go index 159cfa1..46384b5 100644 --- a/device/dds/ad9910/ad9910.go +++ b/device/dds/ad9910/ad9910.go @@ -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) diff --git a/device/dds/ad9910/ad9910_test.go b/device/dds/ad9910/ad9910_test.go index 1d69d42..f51b1d3 100644 --- a/device/dds/ad9910/ad9910_test.go +++ b/device/dds/ad9910/ad9910_test.go @@ -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,