driver, example: fix typo

This commit is contained in:
linuswck 2025-01-24 17:45:11 +08:00
parent fb6fd47c69
commit 6f273e85cc
2 changed files with 4 additions and 3 deletions

View File

@ -115,7 +115,7 @@ async def ld_thermostat_cfg(kirdy: Kirdy):
async def main(): async def main():
kirdy = Kirdy() kirdy = Kirdy()
kirdy.start_session(host='192.168.1.128', port=1337) kirdy.start_session(host='192.168.1.134', port=1550)
await kirdy.wait_until_connected() await kirdy.wait_until_connected()
await ld_thermostat_cfg(kirdy) await ld_thermostat_cfg(kirdy)

View File

@ -516,12 +516,12 @@ class Thermostat:
async def set_tec_i_out(self, i_out): async def set_tec_i_out(self, i_out):
""" """
Set Tec Output Current (Settable Range: 0.0 - 3.0) Set Tec Output Current (Settable Range: -3.0 - 3.0)
This cmd is only effective in constant current control mode This cmd is only effective in constant current control mode
or your newly set value will be overwritten by PID Controller Output or your newly set value will be overwritten by PID Controller Output
- i_out: A - i_out: A
""" """
await self._send_cmd(self.tec_set_i_cmd._target, self.tec_set_i_cmd.tec_set_i, i_out) return await self._send_cmd(self.tec_set_i_cmd._target, self.tec_set_i_cmd.tec_set_i, i_out)
async def set_constant_current_control_mode(self): async def set_constant_current_control_mode(self):
""" """
@ -941,6 +941,7 @@ class Kirdy:
self._err_msg_sig.emit(f"{msg['msg_type']}:{str(msg['msg'])}") self._err_msg_sig.emit(f"{msg['msg_type']}:{str(msg['msg'])}")
else: else:
raise KirdyCmdError(f"{msg['msg_type']}:{str(msg['msg'])}") raise KirdyCmdError(f"{msg['msg_type']}:{str(msg['msg'])}")
print(msg)
return msg return msg
async def _send_cmd(self, target, cmd, data=None, msg_type="Acknowledge", sig=None): async def _send_cmd(self, target, cmd, data=None, msg_type="Acknowledge", sig=None):