Skip to content

Commit

Permalink
Fixed Error return for divide by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Pdada1 committed Jul 14, 2024
1 parent 6c1f9b0 commit 39ef0c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/rlcs/rlcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def parse_kelvin_resistance(voltageP,voltageN,current):
try:
return (voltageP - voltageN) / current
except ZeroDivisionError as e:
print(e+". No current is flowing")
return 0.0


def parse_adc_to_voltage(adc_value,adc_bits, vref):
Expand Down

0 comments on commit 39ef0c6

Please sign in to comment.