PcbDraw
PcbDraw copied to clipboard
Bug: Resistor value of `R` raises OverflowError exception
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 likeR
andM
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.