Commit a32df349 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Rename SignalGenerator to ClockGenerator, improve frequency check

parent f7d6a7f4
......@@ -28,7 +28,7 @@ class CamrasHpibDevice(HpibDevice):
"""Set the device to the specified frequency. Throws a RuntimeError if failed"""
self.command("freq {:d} Hz".format(int(freq)))
new_freq = self.frequency
if new_freq != freq:
if int(new_freq) != int(freq):
raise RuntimeError("Setting frequency failed: tried to set to {}, it is now {}".format(
freq, new_freq))
......@@ -44,8 +44,8 @@ class LocalOscillator(CamrasHpibDevice):
def __init__(self):
super(LocalOscillator, self).__init__(28)
class SignalGenerator(CamrasHpibDevice):
"""Wrapper around HPIB commands for the signal generator"""
class ClockGenerator(CamrasHpibDevice):
"""Wrapper around HPIB commands for the clock generator (should be at 140MHz)"""
def __init__(self):
super(SignalGenerator, self).__init__(14)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment