Skip to content

Commit 952e052

Browse files
committed
Don't generate 3 band resistor when it can't represent the value
1 parent 98f3a63 commit 952e052

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

LabelGenerator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ def draw_resistor_colorcode(
332332
num_codes: int,
333333
tolerance_value: Optional[float],
334334
) -> None:
335+
if num_codes == 3 and value.ohms_val % 10:
336+
return
335337

336338
resistance_values: List[int] = []
337339
for i in range(num_codes-1):

0 commit comments

Comments
 (0)