Index: tests/test_hd_dg_fans.py =================================================================== diff -u -r82f60d6de5414db96b1c44c3d6fdb12a56e39880 -r3a70bfb451b74106348c064c34f19934aadd9119 --- tests/test_hd_dg_fans.py (.../test_hd_dg_fans.py) (revision 82f60d6de5414db96b1c44c3d6fdb12a56e39880) +++ tests/test_hd_dg_fans.py (.../test_hd_dg_fans.py) (revision 3a70bfb451b74106348c064c34f19934aadd9119) @@ -1,3 +1,18 @@ +########################################################################### +# +# Copyright (c) 2021-2022 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 test_hd_dg_fans.py +# +# @author (last) Dara Navaei +# @date (last) 31-Oct-2021 +# @author (original) Dara Navaei +# @date (original) 04-Aug-2021 +# +############################################################################ from dialin import HD, DG from dialin.hd.temperatures import HDTemperaturesNames @@ -29,21 +44,28 @@ # Create an instance of the DG Class hd = HD(log_level='DEBUG') - dg = DG(log_level="DEBUG") + #dg = DG(log_level="DEBUG") - if hd.cmd_log_in_to_hd() == 0 or dg.cmd_log_in_to_dg() == 0: + if hd.cmd_log_in_to_hd() == 0: #or dg.cmd_log_in_to_dg() == 0: exit(1) - #hd.fans.cmd_dg_fan_rpm_override(FansNames.FAN_INLET_1.value, 4000) + #hd.fans.cmd_dg_fan_rpm_override(FansNames.FAN_INLET_1.value, 4000.0) #sleep(1) #hd.fans.cmd_dg_fan_rpm_override(FansNames.FAN_INLET_1.value, 4000, reset=1) - hd.temperatures.cmd_hd_temperatures_value_override(HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.value, 122.00) - sleep(1) - hd.temperatures.cmd_hd_temperatures_value_override(HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.value, 90.00, reset=1) + test = 'THERMISTOR_ONBOARD_NTC' + test2 = HDTemperaturesNames.test + print(type(HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.name), type(test2)) + hd.temperatures.cmd_hd_temperatures_value_override(HDTemperaturesNames.test2.value, 60.0, 1) + #sleep(1) + #hd.temperatures.cmd_hd_temperatures_value_override(HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.value, 90.00, reset=1) while True: - fans = get_fans_info() - switches = get_hd_switches_info() + #fans = get_fans_info() + #switches = get_hd_switches_info() - print(fans + switches) - sleep(1) \ No newline at end of file + #print(fans + switches) + sleep(1) + + test = hd.fans.get_fans_target_duty_cycle() + + print(test)