Index: dialin/dg/calibration_record.py =================================================================== diff -u -rd2a920fb57105d383a9845a4491e74b5af0f15ff -r25f809b32b853b716bae7d6f3b0d4ad676c8e3aa --- dialin/dg/calibration_record.py (.../calibration_record.py) (revision d2a920fb57105d383a9845a4491e74b5af0f15ff) +++ dialin/dg/calibration_record.py (.../calibration_record.py) (revision 25f809b32b853b716bae7d6f3b0d4ad676c8e3aa) @@ -55,6 +55,18 @@ _DEFAULT_ULTRAFILTER_VOLUME_ML = 700 _DEFAULT_COND_SENSOR_TEMP_COMP_COEFF = 0.0207 + _DEFAULT_FILL_1251_1_ACID_SNSR_US_PER_CM = 11518.05 + _DEFAULT_FILL_1251_1_BIC_SNSR_US_PER_CM = 13616.23 + _DEFAULT_FILL_2251_0_ACID_SNSR_US_PER_CM = 11645.05 + _DEFAULT_FILL_2251_0_BIC_SNSR_US_PER_CM = 13734.88 + _DEFAULT_FILL_3251_9_ACID_SNSR_US_PER_CM = 11773.1 + _DEFAULT_FILL_3251_9_BIC_SNSR_US_PER_CM = 13854.49 + _DEFAULT_ACID_TEST_1251_1_US_PER_CM = 12118.71 + _DEFAULT_ACID_TEST_2251_0_US_PER_CM = 12252.1 + _DEFAULT_ACID_TEST_3251_9_US_PER_CM = 12386.57 + _DEFAULT_BIC_TEST_ACID_SNSR_US_PER_CM = 0.0 + _DEFAULT_BIC_TEST_BIC_SNSR_US_PER_CM = 3890.0 + # Maximum allowed bytes that are allowed to be written to EEPROM in firmware # The padding size then is calculated to be divisions of 16 _EEPROM_MAX_BYTES_TO_WRITE = 16 @@ -326,6 +338,7 @@ self._prepare_bicarb_concentrates_record(), self._prepare_filters_record(), self._prepare_fans_record(), self._prepare_accelerometer_sensor_record(), self._prepare_heating_constants_record()] + #self._prepare_acid_bicarb_fill_conductivity_record()] for record, byte_size in records_with_sizes: # Update the groups bytes size so far to be use to padding later @@ -721,3 +734,54 @@ hardware_group[group_name] = hardware return hardware_group, group_byte_size + + def _prepare_acid_bicarb_fill_conductivity_record(self): + """ + Handles creating the calibration dictionary of the acid/bicarb fill conductivities group. + + @return: acid/bicarb fill conductivities hardware group dictionary and the byte size of this hardware group + """ + hardware_names = ['acid_08_1251_1', 'acid_08_2251_0', 'acid_08_3251_9'] + group_byte_size = 0 + group_name = 'acid_and_bicarb_fill_cond' + hardware_group = OrderedDict({group_name: OrderedDict()}) + hardware = OrderedDict() + + for i in hardware_names: + fill_acid_cond = 0 + fill_bicarb_cond = 0 + acid_test_acid_bicarb_cond = 0 + + if i == 'acid_08_1251_1': + fill_acid_cond = self._DEFAULT_FILL_1251_1_ACID_SNSR_US_PER_CM + fill_bicarb_cond = self._DEFAULT_FILL_1251_1_BIC_SNSR_US_PER_CM + acid_test_acid_bicarb_cond = self._DEFAULT_ACID_TEST_1251_1_US_PER_CM + elif i == 'acid_08_2251_0': + fill_acid_cond = self._DEFAULT_FILL_2251_0_ACID_SNSR_US_PER_CM + fill_bicarb_cond = self._DEFAULT_FILL_2251_0_BIC_SNSR_US_PER_CM + acid_test_acid_bicarb_cond = self._DEFAULT_ACID_TEST_2251_0_US_PER_CM + elif i == 'acid_08_3251_9': + fill_acid_cond = self._DEFAULT_FILL_3251_9_ACID_SNSR_US_PER_CM + fill_bicarb_cond = self._DEFAULT_FILL_3251_9_BIC_SNSR_US_PER_CM + acid_test_acid_bicarb_cond = self._DEFAULT_ACID_TEST_3251_9_US_PER_CM + + hardware[i] = {# Normal fill target conductivities in uS/cm + 'fill_target_acid_cond': ['