More sensible bool values for enums
This commit is contained in:
parent
502c8a1c78
commit
6d1df49ede
@ -33,14 +33,14 @@ class PumpDryStatus(ParameterEnum):
|
|||||||
INACTIVE_OR_ACTIVE_WITH_FLUID = 4
|
INACTIVE_OR_ACTIVE_WITH_FLUID = 4
|
||||||
|
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
return self.value == 4
|
return self.value == 1
|
||||||
|
|
||||||
class PumpOverloadStatus(ParameterEnum):
|
class PumpOverloadStatus(ParameterEnum):
|
||||||
ACTIVE_AND_OVERLOAD = 1
|
ACTIVE_AND_OVERLOAD = 1
|
||||||
INACTIVE_OR_ACTIVE_NO_OVERLOAD = 4
|
INACTIVE_OR_ACTIVE_NO_OVERLOAD = 4
|
||||||
|
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
return self.value == 4
|
return self.value == 1
|
||||||
|
|
||||||
class BreakerStatus(ParameterEnum):
|
class BreakerStatus(ParameterEnum):
|
||||||
OPEN = True
|
OPEN = True
|
||||||
@ -312,4 +312,4 @@ class Nucon:
|
|||||||
return list(super().__dir__()) + list(self._parameters.keys())
|
return list(super().__dir__()) + list(self._parameters.keys())
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(self._parameters)
|
return len(self._parameters)
|
||||||
|
Loading…
Reference in New Issue
Block a user