velxio/frontend/src
David Montero e6fdd54ba3 fix(joystick): map wokwi-analog-joystick direction (-1/0/+1) to ADC voltage
The PartSimulationRegistry handler for 'analog-joystick' was reading
`el.xValue` / `el.yValue` and computing `(value / 1023) * vcc` as if the
component were a potentiometer producing a raw 0..1023 reading.  It is
not — `@wokwi/elements/analog-joystick-element` emits xValue / yValue as
a tri-state DIRECTION signal:

  *   xValue = -1  → "left"   (mousedown on left zone)
  *   xValue =  0  → centered (mouseup snap-back)
  *   xValue = +1  → "right"  (mousedown on right zone)
  (same for yValue with up/down)

`(±1) / 1023 ≈ ±0.001`, so the ADC channel sat at ~0 V no matter which
directional zone was clicked.  Center-button clicks worked because that
path is digital (`setPinState(SEL, …)`) and bypasses the analog map.

Fix:
  * Tri-state → voltage with explicit map: -1 → 0V, 0 → Vcc/2, +1 → Vcc.
  * Vcc was hardcoded to 5V for "not RP2040" — wrong for ESP32 / S3 /
    Nano-ESP32 / etc., which all run at 3.3V like the Pi Pico.  Detect
    ESP32 via the BridgeShim's `setAdcVoltage` method and select 3.3V
    for everything that isn't pure AVR.

Reported on /example/esp32-joystick where center-button-only worked but
directional zones did nothing.  Verification via Chrome MCP after deploy.
2026-05-22 18:57:26 +02:00
..
__pro_stub__
…
__tests__ Merge pull request #202 from davidmonterocrespo24/fix/circuit-sim-service-stop 2026-05-19 22:52:08 -03:00
assets
…
components fix(esp32): add GPIO 16/17 pin aliases on DevKit V1 (RX2/TX2) 2026-05-20 21:16:33 +02:00
data feat(attiny85+customchip): full ATtiny85 ADC/Timer0 + custom-chip pipeline fixes 2026-05-19 18:10:08 -03:00
desktop feat(frontend): desktop overlay (welcome, grace banner, ESP32 prompt) 2026-05-21 04:50:51 +02:00
hooks refactor(oss-split): remove auth/admin/profile frontend from OSS 2026-05-14 15:31:12 -03:00
i18n feat(landing): "Try Simulator Free Online" + download CTA slot below 2026-05-22 03:33:21 +02:00
lib feat(frontend): runtime API base + desktop overlay extension points 2026-05-21 04:50:19 +02:00
pages feat(landing): "Try Simulator Free Online" + download CTA slot below 2026-05-22 03:33:21 +02:00
services feat(frontend): runtime API base + desktop overlay extension points 2026-05-21 04:50:19 +02:00
simulation fix(joystick): map wokwi-analog-joystick direction (-1/0/+1) to ADC voltage 2026-05-22 18:57:26 +02:00
store Merge pull request #193 from davidmonterocrespo24/esp32-cleanup-broadcast-pwm 2026-05-18 23:23:05 -03:00
tokens feat(landing+theme): multiplier pricing copy + softer canvas 2026-05-13 21:02:48 +02:00
types fix(spice+pipeline): LED visualization, INPUT_PULLUP, ESP32-C3, PWM fade, examples 2026-05-18 21:52:07 -03:00
utils feat(board-options): per-board options modal + persistence 2026-05-18 21:50:45 -03:00
velxio-elements
…
App.css
…
App.tsx feat(examples): /example/<id> route with pinned URL 2026-05-15 00:14:36 -03:00
entry-server.tsx
…
index.css
…
main.tsx feat(frontend): runtime API base + desktop overlay extension points 2026-05-21 04:50:19 +02:00
seoRoutes.ts
…
vite-env.d.ts
…