Fixing nagging bug
This commit is contained in:
parent
9a5f7b9e6b
commit
3f775aeb91
File diff suppressed because one or more lines are too long
@ -74,12 +74,16 @@ class Master:
|
||||
def get_temp(self):
|
||||
temp = self.com.send_and_wait('iot_g_temp|')
|
||||
logging.info(f'Got temp from slave: {temp}ºC')
|
||||
if temp:
|
||||
return float("{:.1f}".format(float(temp.decode())))
|
||||
return False
|
||||
|
||||
def get_hmdt(self):
|
||||
hmdt = self.com.send_and_wait('iot_g_hmdt|')
|
||||
logging.info(f'Got hmdt from slave: {hmdt}')
|
||||
if hmdt:
|
||||
return int(hmdt.decode())
|
||||
return False
|
||||
|
||||
def run_pump(self, volume):
|
||||
status = self.com.send_and_wait(f'iot_pmp_ctrl|{str(volume)}')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user