From e21146472566f75c071798d63e388104e22c6001 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 31 May 2022 10:47:06 +0200 Subject: Implemented JDS6600 setFrequency --- lab_control/test/jds6600_test.py | 4 ++-- lab_control/test/mock_jds6600_device.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lab_control/test') diff --git a/lab_control/test/jds6600_test.py b/lab_control/test/jds6600_test.py index c53388a..e9089c0 100644 --- a/lab_control/test/jds6600_test.py +++ b/lab_control/test/jds6600_test.py @@ -44,8 +44,8 @@ def test_channelOnAndOff(uut, mockDevice): uut.setOff(ch) assert not mockDevice.isOn(ch) -def disabled_test_setFrequency(uut, mockDevice): - checkNumericalParameter([0.0, 100.0, 100000.0], uut.setFrequency, mockDevice.getFrequency) +def test_setFrequency(uut, mockDevice): + checkNumericalParameter([0.0, 100.0, 100000.0, 60000000.0], uut.setFrequency, mockDevice.getFrequency) def test_setInvalidFrequency(uut, mockDevice): checkInvalidNumericalParameter([-10.0, 60000000.1, None], uut.setFrequency, mockDevice.getFrequency) diff --git a/lab_control/test/mock_jds6600_device.py b/lab_control/test/mock_jds6600_device.py index 426b8ac..6db4f4c 100644 --- a/lab_control/test/mock_jds6600_device.py +++ b/lab_control/test/mock_jds6600_device.py @@ -52,9 +52,9 @@ class MockJDS6600Device(): # channel frequency elif function == 23 or function == 24: - # TODO implement correct behaviour + # Actual device takes a second argument for scaling, here we ignore it and always use 0 (Hz) ch = function - 23 - frequency = float(args[0]) + frequency = float(args[0]) / 100.0 self._channels[ch].frequency = frequency # channel amplitude -- cgit v1.2.3