Index: tests/test_dg_calibration.py =================================================================== diff -u -r6154b064dd181c32b09982c04ca9ddbca41bf509 -r4da359d875e41ceea5ed164a20636256da74e886 --- tests/test_dg_calibration.py (.../test_dg_calibration.py) (revision 6154b064dd181c32b09982c04ca9ddbca41bf509) +++ tests/test_dg_calibration.py (.../test_dg_calibration.py) (revision 4da359d875e41ceea5ed164a20636256da74e886) @@ -1,6 +1,7 @@ from ctypes import * from collections import OrderedDict from dialin.dg.dialysate_generator import DG +from dialin.ui import crc from time import sleep import struct @@ -10,7 +11,7 @@ if dg.cmd_log_in_to_dg() == 0: exit(1) - + sleep(2) cal = dg.calibration """" @@ -37,11 +38,12 @@ f = open("DG_Calibration.log", "w") - dara = [] + print(cal.DG_CALIBRATION_RECORD) + #dara = [] + #cal.get_dg_calibration_data() - cal.get_dg_calibration_data() - try: + """ while True: sleep(0.2) #print(cal.current_message, cal.total_messages, cal.cal_data) @@ -53,17 +55,8 @@ if cal.current_message == cal.total_messages: f.close() break - #[print(i) for i in dara] - #value = struct.unpack('f', bytearray(dara[0][18:(18+4)]))[0] - #print(cal.DG_CALIBRATION_RECORD.keys()) + """ + cal.set_dg_calibration_data() - #load_cells = OrderedDict({'group_name': OrderedDict()}) - #individual_sensor = OrderedDict() - #list1 = ['load_1', 'load_2', 'load_3'] - #for i in list1: - # individual_sensor[i] = {'gain': ['