fix(esp32): add GPIO 16/17 pin aliases on DevKit V1 (RX2/TX2)

On the ESP32 DevKit V1 the silkscreen labels GPIO 16 / 17 as RX2 / TX2,
and Esp32Element.PINS_ESP32 only exposed the silkscreen names. Examples
that wire to numeric pin "16" or "17" (e.g. ledcAttach(16, 5000, 8) on
esp32-pwm-led-rgb) couldn't resolve those names — pinPositionCalculator
failed lookups, the wire endpoint fell back to (0,0)/(50,50) and the
LED component visually floated off the board, breaking the SPICE
netlist for the example.

Add "16" and "17" as aliases pointing to the same (134,143) / (134,131)
coordinates as RX2 / TX2 so both naming conventions resolve to the same
physical pin tip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Montero 2026-05-20 21:16:33 +02:00
parent 4ee8fb59e8
commit be24243e4b
1 changed files with 7 additions and 0 deletions

View File

@ -50,7 +50,14 @@ const PINS_ESP32 = [
{ name: '2', x: 134, y: 169 },
{ name: '4', x: 134, y: 156 },
{ name: 'RX2', x: 134, y: 143 },
// RX2 is the silkscreen label for GPIO 16. Sketches that wire to pin
// '16' (e.g. ledcAttach(16, …) or any example referencing GPIO 16)
// must land on this same coordinate, otherwise pinPositionCalculator
// can't resolve the wire endpoint and the wire visually floats off
// the board. Same story for TX2 / 17 below.
{ name: '16', x: 134, y: 143 },
{ name: 'TX2', x: 134, y: 131 },
{ name: '17', x: 134, y: 131 },
{ name: '5', x: 134, y: 118 },
{ name: '18', x: 134, y: 105 },
{ name: '19', x: 134, y: 93 },