def set_freq(self, freq): print("\tSetting frequency") parameters.set_freq(freq) gsocket.write(struct.pack('<I', 1 << 28 | int(1.0e6 * freq))) # 2^28 = 268,435,456 for frequency setting if not self.idle: print("Acquiring data")
def set_freq(self, freq): # Setting frequency without triggering aquisition: parameters.set_freq print("Setting frequency.") parameters.set_freq(freq) gsocket.write(struct.pack('<I', 1 << 28 | int(1.0e6 * freq))) # 2^28 = 268,435,456 for frequency setting if not self.idle: print("\tAcquiring data.")