mirror of
https://github.com/nqrduck/nqrduck-spectrometer.git
synced 2024-11-09 12:30:01 +00:00
Improved logging. Removed Decimals.
This commit is contained in:
parent
37796e5800
commit
adc088aae1
2 changed files with 5 additions and 1 deletions
|
@ -117,7 +117,7 @@ class PulseSequence:
|
||||||
def duration(self, duration: str):
|
def duration(self, duration: str):
|
||||||
# Duration needs to be a positive number
|
# Duration needs to be a positive number
|
||||||
try:
|
try:
|
||||||
duration = UnitConverter.to_decimal(duration)
|
duration = UnitConverter.to_float(duration)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise ValueError("Duration needs to be a number")
|
raise ValueError("Duration needs to be a number")
|
||||||
if duration < 0:
|
if duration < 0:
|
||||||
|
|
|
@ -156,6 +156,7 @@ class FloatSetting(NumericalSetting):
|
||||||
"""
|
"""
|
||||||
if state:
|
if state:
|
||||||
self.value = text
|
self.value = text
|
||||||
|
self.settings_changed.emit()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self):
|
def value(self):
|
||||||
|
@ -164,6 +165,7 @@ class FloatSetting(NumericalSetting):
|
||||||
|
|
||||||
@value.setter
|
@value.setter
|
||||||
def value(self, value):
|
def value(self, value):
|
||||||
|
logger.debug(f"Setting {self.name} to {value}")
|
||||||
self._value = float(value)
|
self._value = float(value)
|
||||||
self.settings_changed.emit()
|
self.settings_changed.emit()
|
||||||
|
|
||||||
|
@ -210,6 +212,7 @@ class IntSetting(NumericalSetting):
|
||||||
"""
|
"""
|
||||||
if state:
|
if state:
|
||||||
self.value = text
|
self.value = text
|
||||||
|
self.settings_changed.emit()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self):
|
def value(self):
|
||||||
|
@ -218,6 +221,7 @@ class IntSetting(NumericalSetting):
|
||||||
|
|
||||||
@value.setter
|
@value.setter
|
||||||
def value(self, value):
|
def value(self, value):
|
||||||
|
logger.debug(f"Setting {self.name} to {value}")
|
||||||
value = int(float(value))
|
value = int(float(value))
|
||||||
self._value = value
|
self._value = value
|
||||||
self.settings_changed.emit()
|
self.settings_changed.emit()
|
||||||
|
|
Loading…
Reference in a new issue