Skip to content

Commit

Permalink
led: Also generate LEDs with green/red/yellow body
Browse files Browse the repository at this point in the history
  • Loading branch information
ubruhin committed Oct 16, 2023
1 parent 8df5c57 commit 89375c4
Show file tree
Hide file tree
Showing 2 changed files with 289 additions and 1 deletion.
8 changes: 7 additions & 1 deletion generate_led.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,15 +732,21 @@ def _uuid(identifier: str) -> str:
# Commonly used LED dimensions were determined by looking at various LED
# datasheets. The bottom diameter, body height and standoff height vary
# between the many different LEDs since there's no standard and because
# the the specified tolerances are huge (>1mm). However, for these generic
# the specified tolerances are huge (>1mm). However, for these generic
# packages we just use some average dimensions for simplicity. For exact
# dimensions, a separate package needs to be created for each LED model.
#
# Note: The standoff specifies the distance between the bottom of the
# LED body and the surface of the PCB.
configs.append(LedConfig(3.00, 3.80, 2.54, 4.5, 1.0, False, 'Clear', (0.7, 0.7, 0.7, 0.5)))
configs.append(LedConfig(3.00, 3.80, 2.54, 4.5, 1.0, False, 'Green', (0, 0.8, 0, 0.5)))
configs.append(LedConfig(3.00, 3.80, 2.54, 4.5, 1.0, False, 'Red', (0.8, 0, 0, 0.5)))
configs.append(LedConfig(3.00, 3.80, 2.54, 4.5, 1.0, False, 'Yellow', (0.8, 0.8, 0, 0.5)))
configs.append(LedConfig(3.00, 3.80, 2.54, 4.5, 5.0, True, 'Clear', (0.7, 0.7, 0.7, 0.5)))
configs.append(LedConfig(5.00, 5.80, 2.54, 8.7, 1.0, False, 'Clear', (0.7, 0.7, 0.7, 0.5)))
configs.append(LedConfig(5.00, 5.80, 2.54, 8.7, 1.0, False, 'Green', (0, 0.8, 0, 0.5)))
configs.append(LedConfig(5.00, 5.80, 2.54, 8.7, 1.0, False, 'Red', (0.8, 0, 0, 0.5)))
configs.append(LedConfig(5.00, 5.80, 2.54, 8.7, 1.0, False, 'Yellow', (0.8, 0.8, 0, 0.5)))
configs.append(LedConfig(5.00, 5.80, 2.54, 8.7, 5.0, True, 'Clear', (0.7, 0.7, 0.7, 0.5)))

generate_pkg(
Expand Down
Loading

0 comments on commit 89375c4

Please sign in to comment.