########################################################################### # # Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file set_flow_sensors_cal.py # # @date 05-Aug-2020 # @author S. Nash # # @brief This script sets the HD blood and dialysate flow sensor calibration # factors (gain and offset). These calibration factors must be determined # beforehand and typed in below prior to running this script. # ############################################################################ import sys sys.path.append("..") from dialin.hd.hemodialysis_device import HD from time import sleep if __name__ == "__main__": # create an HD object called hd hd = HD() sleep(2) # log in to HD as tester if hd.cmd_log_in_to_hd() == 0: exit(1) sleep(1) #set calibrations ******** MUST PROVIDE GAIN/OFFSET FOR EACH SENSOR HERE ********* hd.bloodflow.cmd_set_blood_flow_calibration(1.27, -50.0) hd.dialysate_inlet_flow.cmd_set_dialysate_flow_calibration(1.14, -3.67)