Explorar el Código

[variable_type] clean

Maxime Alves LIRMM@home hace 4 años
padre
commit
28ce9e05be
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1
    3
      pyheatpump/models/variable_type.py

+ 1
- 3
pyheatpump/models/variable_type.py Ver fichero

@@ -25,6 +25,7 @@ class VariableType(RowClass):
25 25
         # Function to convert numbers > 2**15 to negative numbers (issue #30)
26 26
         #complement = lambda x: x - (1 << 16 if x & (1 << 15) else 0)
27 27
         complement = lambda x: x - (1 << 16) if x >> 15 else x
28
+        #complement = lambda x: int.from_bytes(bytes(x), 'big', signed=True)
28 29
 
29 30
         if self.type == 'bool':
30 31
             # returns a boolean
@@ -107,9 +108,6 @@ class VariableType(RowClass):
107 108
             # Value is stored as integers in database
108 109
             value = int(f_value)
109 110
 
110
-            if address not in range(self.start_address, self.end_address + 1):
111
-                continue
112
-
113 111
             if not Variable(**{
114 112
                     'type': self,
115 113
                     'address': address}).exists():

Loading…
Cancelar
Guardar