Skip to content

Commit

Permalink
[PcbDraw][Fixed] Problems with 0 ohms THT resistors
Browse files Browse the repository at this point in the history
When creating the resitor bands

Fixes #689
  • Loading branch information
set-soft committed Oct 14, 2024
1 parent 78c7f5a commit 91eadbf
Show file tree
Hide file tree
Showing 6 changed files with 1,138 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Copy Files: problems when using from compress and using worksheets.
- Export Project: problems when downloading KiCad models and trying to compress
the result.
- PcbDraw: problems with 0 ohms THT resistors (#689)


## [1.8.1] - 2024-09-25
Expand Down
1 change: 1 addition & 0 deletions docs/source/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Fixed
- Copy Files: problems when using from compress and using worksheets.
- Export Project: problems when downloading KiCad models and trying to
compress the result.
- PcbDraw: problems with 0 ohms THT resistors (#689)

[1.8.1] - 2024-09-25
--------------------
Expand Down
2 changes: 2 additions & 0 deletions kibot/PcbDraw/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,8 @@ def _apply_resistor_code(self, root: etree.Element, id_prefix: str, ref: str, va
return
try:
res, tolerance = self._get_resistance_from_value(value)
if not res:
return
power = math.floor(res.log10()) - 1
res = str(Decimal(int(res / Decimal(10) ** power)))
if power == -3:
Expand Down
Loading

0 comments on commit 91eadbf

Please sign in to comment.