TinyTapeout / tt-micropython-firmware

TinyTapeout demo pcb's RP2040 functionality
GNU Lesser General Public License v2.1
4 stars 7 forks source link

Switching project doesn't reset control state #18

Closed smunaut closed 3 days ago

smunaut commented 4 days ago

First, I'm not sure if it's a commander or SDK thing.

But the issue is that when plugging a board, connected to commander factory test, selecting "Factory Test" ( project 1 ). ui_in[0] ends up already being driven to 1 by default ...

urish commented 4 days ago

I believe this is by design:

https://github.com/TinyTapeout/tt-micropython-firmware/blob/3288485bf974f8b5498ddc21c86174abe9741ee2/src/config.ini#L61

However, looks like config.ini could use some cleanup + have the naming updated to match the new SDK pin names.

Also, IMHO, setting the inputs by default is "too much magic" and we shouldn't do it (maybe only for tt_um_factory_test, and only upon boot)

smunaut commented 4 days ago

Especially since this magic state isn't reflected in the commander where the ui lets you believe nothign has been configured and ui_in is undriven ...

urish commented 4 days ago

The plan is to eventually sync back the state to commander, but even if that will be the case, you won't know that the magic happens unless you visit the Interact tab, and you won't know why it happened

psychogenic commented 3 days ago

I resolved this in commander with https://github.com/TinyTapeout/tt-commander-app/commit/fd93b1ec8c267026a1cd2eabd805bb1ca07bb9e4 and https://github.com/TinyTapeout/tt-commander-app/commit/3b3167705d701005074baf3b7e73f7b0e4ccb105