Skip to content

Conversation

@Bond-009
Copy link
Contributor

This patch prevents the generation of 3 band resistor images for values it can't accurately represent.

@Finomnis
Copy link
Owner

Finomnis commented Jul 23, 2025

I agree with this change, just out of curiousity, what resistors do you own that this is relevant for? E3/E6/E12/E24 don't have any that need more than two digits.

num_codes: int,
tolerance_value: Optional[float],
) -> None:
if value.ohms_val % (10 ** (4 - num_codes)):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a comment before this if? Like # Only display resistors that can accurately represent the given value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants