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):
|
def get_temp(self):
|
||||||
temp = self.com.send_and_wait('iot_g_temp|')
|
temp = self.com.send_and_wait('iot_g_temp|')
|
||||||
logging.info(f'Got temp from slave: {temp}ºC')
|
logging.info(f'Got temp from slave: {temp}ºC')
|
||||||
|
if temp:
|
||||||
return float("{:.1f}".format(float(temp.decode())))
|
return float("{:.1f}".format(float(temp.decode())))
|
||||||
|
return False
|
||||||
|
|
||||||
def get_hmdt(self):
|
def get_hmdt(self):
|
||||||
hmdt = self.com.send_and_wait('iot_g_hmdt|')
|
hmdt = self.com.send_and_wait('iot_g_hmdt|')
|
||||||
logging.info(f'Got hmdt from slave: {hmdt}')
|
logging.info(f'Got hmdt from slave: {hmdt}')
|
||||||
|
if hmdt:
|
||||||
return int(hmdt.decode())
|
return int(hmdt.decode())
|
||||||
|
return False
|
||||||
|
|
||||||
def run_pump(self, volume):
|
def run_pump(self, volume):
|
||||||
status = self.com.send_and_wait(f'iot_pmp_ctrl|{str(volume)}')
|
status = self.com.send_and_wait(f'iot_pmp_ctrl|{str(volume)}')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user