Index: leahi_dialin/dd/proxies/td_proxy.py =================================================================== diff -u -r252b89bc37ea3f3e104671dfa2c59231bffc7e52 -r807865a69903d012ecf8c2867b9fe91c26b1cc08 --- leahi_dialin/dd/proxies/td_proxy.py (.../td_proxy.py) (revision 252b89bc37ea3f3e104671dfa2c59231bffc7e52) +++ leahi_dialin/dd/proxies/td_proxy.py (.../td_proxy.py) (revision 807865a69903d012ecf8c2867b9fe91c26b1cc08) @@ -107,15 +107,24 @@ self.logger.debug("Sending TD gen dialysate data request to DD.") self.can_interface.send(message, 0) - def cmd_td_send_dd_start_pre_gen_request(self, start: bool = 0 ): + def cmd_td_send_dd_start_pre_gen_request(self, start: bool = 0, dialysate_rate: float = 0.0, dialysate_temp: float = 0.0, + acid_type: int = 0, bicarb_type: int = 0 ): """ - Constructs and sends a TD start pre gen dialysate request to the DD. - - @return: none + Constructs and sends a TD start pre gen dialysate request to the DD. + :param start: start and stop boolean + :param dialysate_rate: dialysate rate in ml/min + :param dialysate_temp: dialysate temp in c + :param acid_type: acid type + :param bicarb_type: bicarb type + :return: """ stt = integer_to_bytearray(start) + dial = float_to_bytearray(dialysate_rate) + temp = float_to_bytearray(dialysate_temp) + acd = integer_to_bytearray(acid_type) + bic = integer_to_bytearray(bicarb_type) + payload = stt + dial + temp + acd + bic - payload = stt message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dd_ch_id, message_id=MsgIds.MSG_ID_DD_PRE_GEN_DIALYSATE_REQUEST_DATA.value, payload=payload)