mirror of
https://github.com/nqrduck/nqrduck-spectrometer.git
synced 2024-12-30 12:18:09 +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):
|
||||
# Duration needs to be a positive number
|
||||
try:
|
||||
duration = UnitConverter.to_decimal(duration)
|
||||
duration = UnitConverter.to_float(duration)
|
||||
except ValueError:
|
||||
raise ValueError("Duration needs to be a number")
|
||||
if duration < 0:
|
||||
|
|
|
@ -156,6 +156,7 @@ class FloatSetting(NumericalSetting):
|
|||
"""
|
||||
if state:
|
||||
self.value = text
|
||||
self.settings_changed.emit()
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
|
@ -164,6 +165,7 @@ class FloatSetting(NumericalSetting):
|
|||
|
||||
@value.setter
|
||||
def value(self, value):
|
||||
logger.debug(f"Setting {self.name} to {value}")
|
||||
self._value = float(value)
|
||||
self.settings_changed.emit()
|
||||
|
||||
|
@ -210,6 +212,7 @@ class IntSetting(NumericalSetting):
|
|||
"""
|
||||
if state:
|
||||
self.value = text
|
||||
self.settings_changed.emit()
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
|
@ -218,6 +221,7 @@ class IntSetting(NumericalSetting):
|
|||
|
||||
@value.setter
|
||||
def value(self, value):
|
||||
logger.debug(f"Setting {self.name} to {value}")
|
||||
value = int(float(value))
|
||||
self._value = value
|
||||
self.settings_changed.emit()
|
||||
|
|
Loading…
Reference in a new issue