Index: dialin/common/dg_defs.py =================================================================== diff -u -r818d439ae9c03d90902013ae07872e4e58f52890 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- dialin/common/dg_defs.py (.../dg_defs.py) (revision 818d439ae9c03d90902013ae07872e4e58f52890) +++ dialin/common/dg_defs.py (.../dg_defs.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -66,12 +66,14 @@ DG_FAULT_STATE_START = 0 NUM_OF_DG_FAULT_STATES = 1 + @unique class DGSoloStates(DialinEnum): DG_SOLO_STANDBY_STATE_START = 0, DG_SOLO_IDLE_STATE = 1, NUM_OF_DG_SOLO_STANDBY_STATES = 2 + @unique class DGStandByModeStates(DialinEnum): DG_STANDBY_MODE_STATE_START = 0 # Start standby mode state @@ -81,13 +83,15 @@ DG_STANDBY_MODE_STATE_SAMPLE_WATER = 4 # Sample water state NUM_OF_DG_STANDBY_MODE_STATES = 5 # Number of standby mode states + @unique class DGGenIdleModeStates(DialinEnum): DG_GEN_IDLE_MODE_STATE_START = 0 DG_GEN_IDLE_MODE_STATE_FLUSH_WATER = 1 DG_GEN_IDLE_MODE_STATE_HANDLE_BAD_FILL = 2 NUM_OF_DG_GEN_IDLE_MODE_STATES = 3 + @unique class DGGenIdleModeBadFillSubStates(DialinEnum): DG_HANDLE_BAD_FILL_STATE_START = 0 @@ -98,6 +102,7 @@ DG_HANDLE_BAD_FILL_STATE_CLEAR_ALARM = 5 NUM_OF_DG_HANDLE_BAD_FILL_STATES = 6 + @unique class DGFillModeStates(DialinEnum): DG_FILL_MODE_STATE_START = 0 # Start fill mode state Index: dialin/common/msg_ids.py =================================================================== diff -u -r818d439ae9c03d90902013ae07872e4e58f52890 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- dialin/common/msg_ids.py (.../msg_ids.py) (revision 818d439ae9c03d90902013ae07872e4e58f52890) +++ dialin/common/msg_ids.py (.../msg_ids.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -323,6 +323,7 @@ MSG_ID_HD_HEPRIN_BOLUS_TARGET_RATE_OVERRIDE = 0x807A MSG_ID_HD_REQ_CURRENT_TREATMENT_PARAMETERS = 0x807B MSG_ID_HD_RES_CURRENT_TREATMENT_PARAMETERS = 0x807C + MSG_ID_HD_SET_FANS_RPM_ALARM_START_TIME_OFFSET = 0x807D MSG_ID_DG_TESTER_LOGIN_REQUEST = 0xA000 MSG_ID_DG_ALARM_STATE_OVERRIDE = 0xA001 @@ -406,7 +407,6 @@ MSG_ID_FILL_MODE_DATA_PUBLISH_INTERVAL_OVERRIDE = 0xA051 MSG_ID_BAD_FILL_STATES_PUBLISH_INTERVAL_OVERRIDE = 0xA052 - MSG_ID_HD_DEBUG_EVENT = 0xFFF1 MSG_ID_DG_DEBUG_EVENT = 0xFFF2 MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK = 0xFFFF Index: dialin/dg/conductivity_sensors.py =================================================================== diff -u -r7fda529ba6cd2ca3c64028735979c0b65b32b306 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- dialin/dg/conductivity_sensors.py (.../conductivity_sensors.py) (revision 7fda529ba6cd2ca3c64028735979c0b65b32b306) +++ dialin/dg/conductivity_sensors.py (.../conductivity_sensors.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -7,8 +7,8 @@ # # @file conductivity_sensors.py # -# @author (last) Micahel Garthwaite -# @date (last) 17-Feb-2022 +# @author (last) Dara Navaei +# @date (last) 31-Mar-2022 # @author (original) Quang Nguyen # @date (original) 20-Jul-2020 # Index: dialin/dg/dialysate_generator.py =================================================================== diff -u -r818d439ae9c03d90902013ae07872e4e58f52890 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision 818d439ae9c03d90902013ae07872e4e58f52890) +++ dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -14,15 +14,13 @@ # ############################################################################ -from enum import unique - from .accelerometer import DGAccelerometer from .alarms import DGAlarms from .calibration_record import DGCalibrationNVRecord from .chemical_disinfect import ChemicalDisinfect from .concentrate_pumps import ConcentratePumps from .conductivity_sensors import ConductivitySensors -from .constants import RESET, NO_RESET +from .constants import RESET from .drain_pump import DGDrainPump from .fans import Fans from .dialysate_fill import DialysateFill @@ -51,12 +49,13 @@ from .events import DGEvents from .sw_configs import DGSoftwareConfigs from ..common.msg_defs import MsgIds, MsgFieldPositions +from enum import unique +from .constants import NO_RESET from ..protocols.CAN import DenaliCanMessenger, DenaliMessage, DenaliChannels from ..utils import * from ..utils.base import AbstractSubSystem, publish, LogManager, DialinEnum from ..utils.conversions import integer_to_bytearray, unsigned_short_to_bytearray - @unique class DGOperationModes(DialinEnum): # DG operation modes Index: dialin/ui/dg_simulator.py =================================================================== diff -u -r628a7b586e102eabed5db5bd4ab6651cd300d11c -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- dialin/ui/dg_simulator.py (.../dg_simulator.py) (revision 628a7b586e102eabed5db5bd4ab6651cd300d11c) +++ dialin/ui/dg_simulator.py (.../dg_simulator.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -7,8 +7,8 @@ # # @file dg_simulator.py # -# @author (last) Micahel Garthwaite -# @date (last) 09-Mar-2022 +# @author (last) Behrouz NematiPour +# @date (last) 16-Mar-2022 # @author (original) Peter Lucia # @date (original) 16-Mar-2021 # @@ -448,7 +448,7 @@ fpga_id: int, fpga_major: int, fpga_minor: int, fpga_lab: int, compatibility_rev: int) -> None: """ - [0x1E00] # 30 0x080 Rsp Y DG All + [0x1E00] # 30 0x080 Rsp Y DG All DG f/w version U08=Major U08=Minor Index: dialin/utils/conversions.py =================================================================== diff -u -r87dc9906f3c7002181ab9366bf6f7761a5462e78 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- dialin/utils/conversions.py (.../conversions.py) (revision 87dc9906f3c7002181ab9366bf6f7761a5462e78) +++ dialin/utils/conversions.py (.../conversions.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -8,7 +8,7 @@ # @file conversions.py # # @author (last) Behrouz NematiPour -# @date (last) 14-Feb-2022 +# @date (last) 13-Mar-2022 # @author (original) Peter Lucia # @date (original) 02-Apr-2020 # Index: tests/dg_nvm_scripts.py =================================================================== diff -u -r818d439ae9c03d90902013ae07872e4e58f52890 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 818d439ae9c03d90902013ae07872e4e58f52890) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -15,29 +15,58 @@ ############################################################################ from dialin import DG -if __name__ == "__main__": - dg = DG(log_level="DEBUG") +def run_sw_configs_commands(): + # NOTE: For further details, please refer to 'Instructions to Change the Software Configurations Dynamically' in + # the development section of the DevOps OneNote file - if dg.cmd_log_in_to_dg(): + # Comment and un-comment any of the functions that you would like to use or you can use your own scripts. - # NOTE: For further details, please refer to 'Instructions to Calibrate a Device Using the Calibration Report' - # in the development section of the DevOps OneNote file + # Use cmd_get_dg_sw_config_record() to get the software configurations record in an excel + # This function gets an address to locate the report there (i.e. /home/fw/projects/) + # It creates a folder called DG_NV_Records in the destination that is called + # If no address is provided, the default location is one folder above the dialin folder wherever it is installed + # in your computer. + #dg.sw_configs.cmd_get_dg_sw_config_record() - # Comment and un-comment any of the functions that you would like to use or you can use your own scripts. + # Use cmd_set_dg_sw_config_record() set the changes back to firmware + # This function requires an address for the excel report. Use the absolute address of your excel report like the + # example below + dg.sw_configs.cmd_update_dg_sw_config_record('/home/fw/projects/DG_NV_Records/2022-04-20-DG-SW-CONFIGS-Record.xlsx') - # Use cmd_get_dg_calibration_record_report() to get the calibration record in an excel - # This function gets an address to locate the report there (i.e. /home/fw/projects/) - # It creates a folder called DG_NV_Records in the destination that is called - # If no address is provided, the default location is one folder above the dialin folder wherever it is installed - # in you computer. - #dg.calibration_record.cmd_get_dg_calibration_record_report() + # Use this function to reset the configuration records to all be 0 + #dg.sw_configs.cmd_reset_dg_sw_config_record() - # Use cmd_set_dg_calibration_excel_to_fw() set the changes back to firmware - # This function requires an address for the excel report. Use the absolute address of your excel report like the - # example below - #dg.calibration_record.cmd_set_dg_calibration_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-03-31-DG-Record.xlsx') - # For resetting the calibration record to benign values, use the function below - dg.calibration_record.cmd_reset_dg_calibration_record() +def run_calibration_commands(): + # NOTE: For further details, please refer to 'Instructions to Calibrate a Device Using the Calibration Report' + # in the development section of the DevOps OneNote file + # Comment and un-comment any of the functions that you would like to use or you can use your own scripts. + + # Use cmd_get_dg_calibration_record_report() to get the calibration record in an excel + # This function gets an address to locate the report there (i.e. /home/fw/projects/) + # It creates a folder called DG_NV_Records in the destination that is called + # If no address is provided, the default location is one folder above the dialin folder wherever it is installed + # in you computer. + # dg.calibration_record.cmd_get_dg_calibration_record_report() + + # Use cmd_set_dg_calibration_excel_to_fw() set the changes back to firmware + # This function requires an address for the excel report. Use the absolute address of your excel report like the + # example below + # dg.calibration_record.cmd_set_dg_calibration_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-03-31-DG-Record.xlsx') + + # For resetting the calibration record to benign values, use the function below + dg.calibration_record.cmd_reset_dg_calibration_record() + + +if __name__ == "__main__": + + dg = DG(log_level="DEBUG") + + if dg.cmd_log_in_to_dg(): + + run_sw_configs_commands() + + #run_calibration_commands() + Index: tests/dg_tests.py =================================================================== diff -u -r818d439ae9c03d90902013ae07872e4e58f52890 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- tests/dg_tests.py (.../dg_tests.py) (revision 818d439ae9c03d90902013ae07872e4e58f52890) +++ tests/dg_tests.py (.../dg_tests.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -26,15 +26,18 @@ from dialin.dg.temperatures import DGTemperaturesNames from dialin.dg.dialysate_generator import DGOperationModes from dialin.hd.temperatures import HDTemperaturesNames +from dialin.dg.concentrate_pumps import DGConcentratePumpsStates from dialin.dg.uv_reactors import ReactorsNames -from dialin.common.hd_defs import HDOpModes, HDOpSubModes +from dialin.common.hd_defs import HDOpModes, HDOpSubModes, PreTreatmentWetSelfTesStates, PostTreatmentStates +from dialin.hd.post_treatment import HDPostTreatmentDrainStates from dialin.common.dg_defs import DGEventList from dialin.common.hd_defs import HDEventList from dialin.hd.reservoirs import HDReservoirStates from dialin.dg.reservoirs import DGReservoirsNames from dialin.common.dg_defs import DGGenIdleModeBadFillSubStates from dialin.common.alarm_defs import AlarmList from dialin.dg.fans import DGFansNames +from dialin.dg.pressures import DGPressures from dialin.dg.conductivity_sensors import ConductivitySensorsEnum from time import sleep from datetime import datetime @@ -46,14 +49,15 @@ def get_chemical_disinfect_mode_info(): info = ('State, {}, Overall_elapsed_time, {}, State_elapsed_time, {}, Disinfect_elapsed_time, {}, ' 'Cancellation_mode, {}, R1_level, {:5.3f}, R2_level, {:5.3f}, Current_rinse_count, {}, ' - 'Total_rinse_count, {}, UI_state, {}, ' + 'Total_rinse_count, {}, UI_state, {}, Top_alarm, {}, ' .format(DGChemicalDisinfectStates(dg.chemical_disinfect.chemical_disinfect_state).name, dg.chemical_disinfect.overall_elapsed_time, dg.chemical_disinfect.state_elapsed_time, dg.chemical_disinfect.chemical_disinfect_elapsed_time, ChemCancellationModes(dg.chemical_disinfect.cancellation_mode).name, dg.chemical_disinfect.r1_level, dg.chemical_disinfect.r2_level, dg.chemical_disinfect.current_post_rinse_count, dg.chemical_disinfect.target_post_rinse_count, - DGChemDisinfectUIStates(dg.chemical_disinfect.chemical_disinfect_ui_state).name)) + DGChemDisinfectUIStates(dg.chemical_disinfect.chemical_disinfect_ui_state).name, + hd.alarms.alarm_top)) return info @@ -70,9 +74,13 @@ def get_hd_run_info(): info = ('HD_op_mode, {}, HD_sub_mode, {}, Top_alarm, {}, Target_UF_ml, {:5.3f}, Meas_UF_ml, {:5.3f}, ' + 'Wet_test_state, {}, Post_tx_state, {}, Post_tx_drain_state, {}, ' .format(HDOpModes(hd.hd_operation_mode).name, hd.hd_operation_sub_mode, hd.alarms.alarm_top, hd.dialysate_outlet_flow.reference_dialysate_outlet_uf_volume, - hd.dialysate_outlet_flow.measured_dialysate_outlet_uf_volume)) + hd.dialysate_outlet_flow.measured_dialysate_outlet_uf_volume, + PreTreatmentWetSelfTesStates(hd.pretreatment.pre_treatment_wet_self_test_state).name, + PostTreatmentStates(hd.post_treatment.post_treatment_sub_mode).name, + HDPostTreatmentDrainStates(hd.post_treatment.post_treatment_drain_state).name)) return info @@ -99,17 +107,12 @@ def get_dg_reservoirs_info(): info = ('Time_rsrvr_cycle, {}, Time_rsrvr_fill_2_switch, {}, Time_uf_decay, {:5.3f}, Temp_uf_fill, {:5.3f}, ' 'Temp_rsrvr_use_actual, {:5.3f}, Temp_rsrvr_end_fill, {:5.3}, Temp_avg_fill, {:5.3f}, ' - 'Temp_last_fill, {:5.3f}, Time_rsrvr_fill, {:5.3f}, drain_flow, {:5.3f}, load_cell_w, {:5.3f}, start_time, {}, ' - .format(dg.reservoirs.time_reservoir_cycle, - dg.reservoirs.time_reservoir_fill_2_switch, - dg.reservoirs.time_uf_decay, - dg.reservoirs.temp_uf_fill, - dg.reservoirs.temp_reservoir_use_actual, - dg.reservoirs.temp_reservoir_end_fill, - dg.reservoirs.temp_avg_fill, - dg.reservoirs.temp_last_fill, - dg.reservoirs.time_rsrvr_fill, - 0, 0, 0)) + 'Temp_last_fill, {:5.3f}, Time_rsrvr_fill, ' + .format(dg.reservoirs.time_reservoir_cycle, dg.reservoirs.time_reservoir_fill_2_switch, + dg.reservoirs.time_uf_decay, dg.reservoirs.temp_uf_fill, dg.reservoirs.temp_reservoir_use_actual, + dg.reservoirs.temp_reservoir_end_fill, dg.reservoirs.temp_avg_fill, dg.reservoirs.temp_last_fill, + dg.reservoirs.time_rsrvr_fill)) + return info @@ -215,22 +218,22 @@ dg.temperatures.temperatures[DGTemperaturesNames.FPGA_BOARD_SENSOR.name], dg.temperatures.temperatures[DGTemperaturesNames.LOAD_CELL_A1_B1.name], dg.temperatures.temperatures[DGTemperaturesNames.LOAD_CELL_A2_B2.name], - dg.fans.rpm_alarm_time_offset)) + dg.fans.rpm_alarm_time)) return info def get_hd_fans_info(): info = ('HD_Fan_DC, {:5.3f}, Target_HD_RPM, {:5.3f}, Inlet1_RPM, {:5.3f}, HD_Board_temp, {:5.3f}, ' 'HD_Power_supply, {:5.3f}, HD_FPGA_temp, {:5.3f}, PBA_ADC_temp, {:5.3f}, Venous_temp, {:5.3f}, ' - 'Arterial_temp, {:5.3f}, RPM_time_offset, {}, Start_time, {} ' + 'Arterial_temp, {:5.3f}, RPM_time_offset, {}, ' .format(hd.fans.duty_cycle, hd.fans.target_rpm, hd.fans.inlet_1_rpm, hd.temperatures.hd_temperatures[HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.THERMISTOR_POWER_SUPPLY_1.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_FPGA_BOARD.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_PBA_ADC_SENSOR.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_VENOUS_PRESS_TEMP.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_ARTERIAL_PRESS_TEMP.name], - hd.fans.rpm_alarm_time_offset, hd.fans.remove)) + hd.fans.rpm_alarm_time)) return info @@ -242,27 +245,40 @@ def get_concentrate_pumps_info(): info = ('Bicarb_tgt_speed, {:5.3f}, Bicarb_speed, {:5.3f}, Acid_tgt_speed, {:5.3f}, Acid_speed, {:5.3f}, ' - 'CPo, {:5.3f}, CD1, {:5.3f}, CD2, {:5.3f}, ' + 'CPo, {:5.3f}, CD1, {:5.3f}, CD2, {:5.3f}, CP1_state, {}, CP2_state, {}, CPi_status, {}, CPo_status, {}, ' + 'CD1_status, {}, CD2_status, {}, CP1_pulse, {:5.3f}, CP2_pulse, {:5.3f}, ' .format(dg.concentrate_pumps.concentrate_pump_cp2_current_set_speed, dg.concentrate_pumps.concentrate_pump_cp2_measured_speed, dg.concentrate_pumps.concentrate_pump_cp1_current_set_speed, dg.concentrate_pumps.concentrate_pump_cp1_measured_speed, dg.conductivity_sensors.conductivity_sensor_cpo, dg.conductivity_sensors.conductivity_sensor_cd1, - dg.conductivity_sensors.conductivity_sensor_cd2)) + dg.conductivity_sensors.conductivity_sensor_cd2, + DGConcentratePumpsStates(dg.concentrate_pumps.concentrate_pump_cp1_current_state).name, + DGConcentratePumpsStates(dg.concentrate_pumps.concentrate_pump_cp2_current_state).name, + dg.conductivity_sensors.cpi_sensor_status, dg.conductivity_sensors.cpo_sensor_status, + dg.conductivity_sensors.cd1_sensor_status, dg.conductivity_sensors.cd2_sensor_status, + dg.concentrate_pumps.cp1_temp_pulse, dg.concentrate_pumps.cp2_temp_pulse)) return info def get_blood_leak_info(): info = ('Blood_leak_status, {}, Blood_leak_zero_status_counter, {}, Blood_leak_zeroed_status, {}, ' 'Blood_leak_detect_set_point, {}, Blood_leak_detect_level, {}, Blood_leak_st_count, {}, ' - 'Blood_leak_led_intensity, {}, ' + 'Blood_leak_led_intensity, {}, Blood_leak_state, {}, ' .format(hd.blood_leak.get_blood_leak_status(), hd.blood_leak.get_blood_leak_zero_status_counter(), hd.blood_leak.get_blood_leak_zeroed_status(), hd.blood_leak.get_blood_leak_detect_set_point(), hd.blood_leak.get_blood_leak_detect_level(), hd.blood_leak.get_blood_leak_st_count(), - hd.blood_leak.get_blood_leak_led_intensity())) + hd.blood_leak.get_blood_leak_led_intensity(), hd.blood_leak.blood_leak_state)) return info +def get_hd_pumps_info(): + info = ('DialIn_tgt_flow, {}, DialIn_meas_flow, {:5.3f}, ' + .format(hd.dialysate_inlet_flow.target_dialysate_inlet_flow_rate, + hd.dialysate_inlet_flow.measured_dialysate_inlet_flow_rate)) + return info + + def get_dg_fill_info(): info = ('Avg_acid_cond, {:5.3f}, Avg_bicarb_cond, {:5.3f}, Is_this_first_fill, {}, Diff_cond_pct, {:5.3f}, ' 'Used_acid, {:5.3f}, Used_bicarb, {:5.3f}, Total_vol, {:5.3f}, ' @@ -338,12 +354,18 @@ def collect_treatment_data(): f = open("/home/fw/projects/dialin/tests/treatment_run.log", "w") + """ dg.conductivity_sensors.cmd_conductivity_sensor_override(ConductivitySensorsEnum.CD2.value, 6900.00) sleep(1) dg.conductivity_sensors.cmd_conductivity_sensor_override(ConductivitySensorsEnum.CD1.value, 12100.00) sleep(1) + #dg.dialysate_fill.cmd_used_bicarb_volume_override(3700.0) + #sleep(1) + + counter = 1 start = False + """ try: while True: @@ -360,19 +382,33 @@ dg_fans = get_dg_fans_info() conc_pumps = get_concentrate_pumps_info() blood_leak = get_blood_leak_info() + hd_pumps = get_hd_pumps_info() fill_info = get_dg_fill_info() idle_bad_fill = get_dg_idle_bad_fill_info() - #var = str(datetime.now()) + ', ' + hd_run + dg_run + hd_rsrvrs + dg_rsrvrs + load_cell + drain + ro + \ - # temp + heaters + conc_pumps + dg_fans + valves + blood_leak + '\r' - + var = str(datetime.now()) + ', ' + hd_run + dg_run + hd_rsrvrs + dg_rsrvrs + load_cell + drain + ro + \ + temp + heaters + conc_pumps + dg_fans + valves + blood_leak + hd_pumps + fill_info + '\r' + """ var = str(datetime.now()) + ', ' + hd_run + dg_run + load_cell + drain + ro + conc_pumps + valves + \ idle_bad_fill + fill_info + '\r' - if dg.dg_operation_mode == 6 and dg.dg_operation_sub_mode == 5 and start is False: - dg.conductivity_sensors.cmd_conductivity_sensor_override(ConductivitySensorsEnum.CD2.value, 12000.00) +<<<<<<< HEAD + #if dg.dg_operation_mode == 6 and dg.dg_operation_sub_mode == 5 and start is False: + # dg.conductivity_sensors.cmd_conductivity_sensor_override(ConductivitySensorsEnum.CD2.value, 12000.00) + # start = True +======= + if dg.dg_operation_mode == 6 and dg.dg_operation_sub_mode == 4 and start is False: + #dg.conductivity_sensors.cmd_conductivity_sensor_override(ConductivitySensorsEnum.CD2.value, 12000.00) + dg.pressures.cmd_pressure_override(dg.pressures.PRESSURE_SENSOR_RO_PUMP_INLET, 14) start = True +>>>>>>> DEN-12224-dg_hd_dev-switches-monitor + if start is True: + counter += 1 + + if 10 < counter < 14: + dg.pressures.cmd_pressure_override(dg.pressures.PRESSURE_SENSOR_RO_PUMP_INLET, 14, reset=1) + """ print(var) f.write(var) sleep(1) @@ -522,7 +558,7 @@ ack = True if ack: if i == 0 and counter == 50: - hd.fans.cmd_fans_rpm_alarm_start_time_offset_override(86401) + hd.fans.cmd_fans_rpm_alarm_start_time_offset(86300) i += 1 elif alarm_state and i > 0: break @@ -565,7 +601,7 @@ ack = True if ack: if i == 0 and counter == 50: - dg.fans.cmd_fans_rpm_alarm_start_time_offset_override(86390) + dg.fans.cmd_fans_rpm_alarm_start_time_offset(86390) i += 1 elif alarm_state and i > 0: break @@ -598,3 +634,4 @@ # test_hd_fans_alarms() # test_dg_fans_alarms() + Index: tests/hd_nvm_scripts.py =================================================================== diff -u -r818d439ae9c03d90902013ae07872e4e58f52890 -r79ed3e7d26065bb2f2155be984c4381175299cd7 --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 818d439ae9c03d90902013ae07872e4e58f52890) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 79ed3e7d26065bb2f2155be984c4381175299cd7) @@ -32,7 +32,7 @@ # Use cmd_update_hd_sw_config_record() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below - hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-03-09-HD-SW-CONFIGS-Record_EP_File.xlsx') + hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-04-20-HD-SW-CONFIGS-Record.xlsx') # Use this function to reset the configuration records to all be 0 # hd.sw_configs.cmd_reset_hd_sw_config_record() @@ -49,15 +49,15 @@ # It creates a folder called HD_NV_Records in the destination that is called # If no address is provided, the default location is one folder above the dialin folder wherever it is installed # in your computer. - #hd.calibration_record.cmd_get_hd_calibration_record_report() + hd.calibration_record.cmd_get_hd_calibration_record_report() # Use cmd_set_hd_calibration_excel_to_fw() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below #hd.calibration_record.cmd_set_hd_calibration_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-02-21-HD-Record.xlsx') # For resetting the calibration record to benign values, use the function below - hd.calibration_record.cmd_reset_hd_calibration_record() + #hd.calibration_record.cmd_reset_hd_calibration_record() if __name__ == "__main__":