Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/modules/common/hardware_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def valid_voltage(voltage) -> bool:
(valid_voltage(voltages[0]) and valid_voltage(voltages[1]) and valid_voltage((voltages[2])))):
return METER_BROKEN_VOLTAGES.format(voltages)
interdependent_values = [sum(counter_state.currents), counter_state.power]
if not (all(v == 0 for v in interdependent_values) or all(v != 0 for v in interdependent_values)):
if not (all(abs(v) < 0.5 for v in interdependent_values) or all(abs(v) > 0.5 for v in interdependent_values)):
return METER_IMPLAUSIBLE_VALUE.format(counter_state.powers, counter_state.currents, counter_state.voltages)
return None

Expand Down