PcbDraw icon indicating copy to clipboard operation
PcbDraw copied to clipboard

Bug: Resistor value of `R` raises OverflowError exception

Open Electro707 opened this issue 2 years ago • 0 comments

There is a bug where if a resistor value is just R, an OverflowError is raised by power = math.floor(res.log10()) - 1 and crashes the application.

The reason is because the read_resistance interprets R as 0 ohms if one is to run that function manually. This means that we need to solve two issues:

  • The read_resistance function should return an invalid value if numbers like R and M are set for the resistance, so essentially a prefix/suffix without a number
  • We need the _apply_resistor_code to handle resistor values of zeros.

I do plan on fixing the above issues, I just wanted to raise this Issue to keep track of it and not forget about it.

Electro707 avatar Nov 21 '22 20:11 Electro707