DialThrottle

Serial console

Debug commands and screen captures over USB.

The throttle takes commands over USB serial at 115200 baud. Type a command and press Enter.

make monitor                   # or: make monitor PORT=/dev/ttyACM1

Throttle and loco

CommandAction
statusPrint WiFi, server and loco state
acqAcquire the configured loco
relRelease the loco
loco <addr> <s/l>Set the active loco, short or long, and acquire it
stealTake a loco another throttle holds
speed <0-126>Set the speed step
notch <n>Set the throttle notch, from 0 to the notch count
dir <f/r/t>Forward, reverse or toggle
fn <0-28> <on/off/t>Function on, off or toggle
estopEmergency stop
clearClear the E-Stop latch (estop clear also works)

Connection

CommandAction
wifiReconnect WiFi
wtReconnect to the server
send <raw>Send a raw WiThrottle line, e.g. send M0A*<;>qV
lccLCC node ID, alias and controller state

Settings

CommandAction
settingsPrint the settings and open the settings menu
set ssid <name>Set and save the WiFi name
set pass <password>Set and save the WiFi password
set ip <a.b.c.d>Set and save the server address
set port <n>Set and save the server port
set proto <wt/lcc>Choose WiThrottle or LCC GridConnect
defaultsReset every setting to the config.h defaults

Power and diagnostics

CommandAction
diagIdle timer, last input source, encoder count, notch and pending half-step, redraw and loop timing. Doesn’t reset the idle timer
batBattery reading, power source and charge state
tier <0/1/2>Force a backlight tier. tier 2 checks that the screen really goes dark
offPower off now
helpList every command

Testing

CommandAction
enc <counts>Inject raw encoder counts, 2 per detent
btn [long]Fake a dial button press, or a long press
simbat <pct/-1>Fake a battery percentage; -1 clears it
wtin <line>Inject a line as if the WiThrottle server sent it
lccin <frame>Inject a GridConnect frame
shotDump the screen as hex

To see what the throttle would send without a layout, build with make flash DEFINES=-DSERIAL_OUTPUT_ONLY_DEFAULT=1. Outgoing WiThrottle lines are printed as WT> ... instead of being transmitted.

Screenshots

tools/screenshot.py sends shot, decodes the frame and writes a PNG. It needs pyserial and Pillow. Every screenshot on this site was captured this way.

make screenshot PORT=/dev/ttyACM0
python3 tools/screenshot.py --setup "notch 5" --settle 3 shot.png

--setup runs a serial command before the capture and can be repeated. --settle waits that many seconds afterwards, which lets momentum ramp the speed up. Without Pillow the raw hex dump is saved next to the output, and --decode dump.hex out.png converts it later.