[cli] suppression du sleep

This commit is contained in:
Maxime Alves LIRMM@home 2020-12-20 21:38:22 +01:00
commit 078e1cf534
2 changed files with 5 additions and 2 deletions

View file

@ -228,7 +228,6 @@ def supervise(since):
verify=False, verify=False,
timeout=200 timeout=200
) )
time.sleep(5)
if post_resp.status_code == 200: if post_resp.status_code == 200:
logger.info('POST to supervisor succeeded') logger.info('POST to supervisor succeeded')
continue continue

View file

@ -24,7 +24,8 @@ class VariableType(RowClass):
def cast(self): def cast(self):
# Function to convert numbers > 2**15 to negative numbers (issue #30) # Function to convert numbers > 2**15 to negative numbers (issue #30)
#complement = lambda x: x - (1 << 16 if x & (1 << 15) else 0) #complement = lambda x: x - (1 << 16 if x & (1 << 15) else 0)
complement = lambda x: x - (1 << 16) if x >> 15 else x #complement = lambda x: x - (1 << 16) if x >> 15 else x
complement = lambda x: int.from_bytes(bytes(x), 'big', signed=True)
if self.type == 'bool': if self.type == 'bool':
# returns a boolean # returns a boolean
@ -107,8 +108,11 @@ class VariableType(RowClass):
# Value is stored as integers in database # Value is stored as integers in database
value = int(f_value) value = int(f_value)
"""
if address not in range(self.start_address, self.end_address + 1): if address not in range(self.start_address, self.end_address + 1):
continue continue
"""
if not Variable(**{ if not Variable(**{
'type': self, 'type': self,