|
@@ -23,7 +23,8 @@ class VariableType(RowClass):
|
23
|
23
|
|
24
|
24
|
def cast(self):
|
25
|
25
|
# Function to convert numbers > 2**15 to negative numbers (issue #30)
|
26
|
|
- complement = lambda x: x - (1 << 16 if x & (1 << 15) else 0)
|
|
26
|
+ #complement = lambda x: x - (1 << 16 if x & (1 << 15) else 0)
|
|
27
|
+ complement = lambda x: x - (1 << 16) if x >> 15 else x
|
27
|
28
|
|
28
|
29
|
if self.type == 'bool':
|
29
|
30
|
# returns a boolean
|
|
@@ -69,7 +70,7 @@ class VariableType(RowClass):
|
69
|
70
|
values = Variable.getall_values_of_type(self)
|
70
|
71
|
res = {}
|
71
|
72
|
for address, variable in values.items():
|
72
|
|
- logger.error('address: %s, start_addres: %s, calc: %s',
|
|
73
|
+ logger.debug('address: %s, start_addres: %s, calc: %s',
|
73
|
74
|
address, self.start_address, address - self.start_address + 1)
|
74
|
75
|
res[str(address - self.start_address + 1)] = variable
|
75
|
76
|
return res
|