Skip to content

Commit 932eeb6

Browse files
authored
loose limits for hardware check (#2525)
* loose limits for hardware check * fix
1 parent 9479679 commit 932eeb6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/modules/common/hardware_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def valid_voltage(voltage) -> bool:
4343
(valid_voltage(voltages[0]) and valid_voltage(voltages[1]) and valid_voltage((voltages[2])))):
4444
return METER_BROKEN_VOLTAGES.format(voltages)
4545
interdependent_values = [sum(counter_state.currents), counter_state.power]
46-
if not (all(v == 0 for v in interdependent_values) or all(v != 0 for v in interdependent_values)):
46+
if not (all(abs(v) < 0.5 for v in interdependent_values) or all(abs(v) > 0.5 for v in interdependent_values)):
4747
return METER_IMPLAUSIBLE_VALUE.format(counter_state.powers, counter_state.currents, counter_state.voltages)
4848
return None
4949

0 commit comments

Comments
 (0)