def save(self): self.cfg.SetPath("/") self.cfg.WriteBool('saveWarn', self.saveWarn) self.fileHistory.Save(self.cfg) self.cfg.WriteBool('annotate', self.annotate) self.cfg.WriteBool('retainScans', self.retainScans) self.cfg.WriteBool('fadeScans', self.fadeScans) self.cfg.WriteInt('maxScans', self.maxScans) self.cfg.WriteInt('start', self.start) self.cfg.WriteInt('stop', self.stop) self.cfg.WriteInt('mode', self.mode) self.cfg.WriteFloat('dwell', self.dwell) self.cfg.WriteInt('nfft', self.nfft) self.cfg.WriteBool('liveUpdate', self.liveUpdate) self.cfg.WriteFloat('calFreq', self.calFreq) self.cfg.WriteBool('autoScale', self.autoScale) self.cfg.WriteInt('yMax', self.yMax) self.cfg.WriteInt('yMin', self.yMin) self.cfg.WriteInt('index', self.index) if self.devices: for device in self.devices: self.cfg.SetPath("/Devices/" + format_device_name(device.name)) self.cfg.Write('serial', device.serial) self.cfg.WriteBool('isDevice', device.isDevice) self.cfg.Write('server', device.server) self.cfg.WriteInt('port', device.port) self.cfg.WriteFloat('gain', device.gain) self.cfg.WriteFloat('lo', device.lo) self.cfg.WriteFloat('calibration', device.calibration) self.cfg.WriteFloat('offset', device.offset)
def save(self): self.cfg.SetPath("/") self.cfg.WriteInt('display', self.display) self.cfg.WriteBool('saveWarn', self.saveWarn) self.fileHistory.Save(self.cfg) self.cfg.Write('dirScans', self.dirScans) self.cfg.Write('dirExport', self.dirExport) self.cfg.WriteBool('annotate', self.annotate) self.cfg.WriteBool('retainScans', self.retainScans) self.cfg.WriteBool('fadeScans', self.fadeScans) self.cfg.WriteFloat('lineWidth', self.lineWidth) self.cfg.WriteInt('retainMax', self.retainMax) self.cfg.Write('colourMap', self.colourMap) self.cfg.Write('background', self.background) self.cfg.WriteBool('wireframe', self.wireframe) self.cfg.WriteBool('average', self.average) self.cfg.WriteBool('pointsLimit', self.pointsLimit) self.cfg.WriteInt('pointsMax', self.pointsMax) self.cfg.WriteBool('grid', self.grid) self.cfg.WriteInt('start', self.start) self.cfg.WriteInt('stop', self.stop) self.cfg.WriteInt('mode', self.mode) self.cfg.WriteFloat('dwell', self.dwell) self.cfg.WriteInt('nfft', self.nfft) self.cfg.WriteFloat('overlap', self.overlap) self.cfg.Write("winFunc", self.winFunc) self.cfg.WriteBool('liveUpdate', self.liveUpdate) self.cfg.WriteFloat('calFreq', self.calFreq) self.cfg.WriteBool('autoF', self.autoF) self.cfg.WriteBool('autoL', self.autoL) self.cfg.WriteBool('autoT', self.autoT) self.cfg.WriteBool('showMeasure', self.showMeasure) self.cfg.WriteBool('alert', self.alert) self.cfg.WriteFloat('alertLevel', self.alertLevel) self.cfg.WriteInt('index', self.index) self.clear_servers() if self.devices: for device in self.devices: if device.isDevice: name = device.name else: name = "{0}:{1}".format(device.server, device.port) self.cfg.SetPath("/Devices/" + format_device_name(name)) self.cfg.Write('serial', device.serial) self.cfg.WriteBool('isDevice', device.isDevice) self.cfg.Write('server', device.server) self.cfg.WriteInt('port', device.port) self.cfg.WriteFloat('gain', device.gain) self.cfg.WriteFloat('lo', device.lo) self.cfg.WriteFloat('calibration', device.calibration) self.cfg.WriteFloat('offset', device.offset) self.cfg.WriteInt('tuner', device.tuner) self.cfg.DeleteEntry('autoScale') self.cfg.DeleteEntry('yMax') self.cfg.DeleteEntry('yMin')