Index: dialin/dg/hd_proxy.py =================================================================== diff -u -rbe5fbabd50dc31e5e5a5e4b99893fb8b92d016bd -rcb8d11b54d3d823181afbdb3717f612e0a533179 --- dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision be5fbabd50dc31e5e5a5e4b99893fb8b92d016bd) +++ dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision cb8d11b54d3d823181afbdb3717f612e0a533179) @@ -18,7 +18,7 @@ from ..common.msg_defs import MsgIds from ..protocols.CAN import DenaliMessage, DenaliChannels from ..utils.base import AbstractSubSystem -from ..utils.conversions import integer_to_bytearray +from ..utils.conversions import integer_to_bytearray, float_to_bytearray class DGHDProxy(AbstractSubSystem): @@ -74,19 +74,20 @@ self.logger.debug("Timeout!!!!") return False - def cmd_fill(self, volume: int = 1500, start: int = 1) -> int: + def cmd_fill(self, volume: int = 1500, tgt_fill_flow_lpm: float = 0.8, start: int = 1) -> int: """ Constructs and sends the fill command. Constraints: DG must be in re-circulate water state of re-circulate mode. Given fill to volume must be between 0 and 1950 mL. @param volume: unsigned int - volume (in mL) to fill inactive reservoir to. + @param tgt_fill_flow_lpm: float - target fill flow rate in L/min. @param start: unsigned int - 1 = start fill, 0 = stop fill. @return: 1 if successful, zero otherwise """ - payload = integer_to_bytearray(volume) + integer_to_bytearray(start) + payload = integer_to_bytearray(volume) + integer_to_bytearray(start) + float_to_bytearray(tgt_fill_flow_lpm) message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, message_id=MsgIds.MSG_ID_DG_FILL_CMD.value,