Throttle and Ignite
Writing a control file is a command. Set a value, get a result. That is the whole deal.
throttle is a setpoint from 0 to 1. ignite and shutdown are one-shots. The engine master,
ctl/engine, is the read-back-friendly version for a switch or a UI.
# Keep a hand near shutdown. This is a real engine command.echo 0.25 > /sim/vessels/active/ctl/throttleecho 1 > /sim/vessels/active/ctl/ignite
cat /sim/vessels/active/ctl/engine # 1 when engines are onecho 1 > /sim/vessels/active/ctl/shutdownecho 0 > /sim/vessels/active/ctl/throttlecurl -X POST --data '0.25' http://127.0.0.1:4242/v1/fs/vessels/active/ctl/throttlecurl -X POST --data '1' http://127.0.0.1:4242/v1/fs/vessels/active/ctl/ignite
curl http://127.0.0.1:4242/v1/fs/vessels/active/ctl/enginecurl -X POST --data '1' http://127.0.0.1:4242/v1/fs/vessels/active/ctl/shutdowncurl -X POST --data '0' http://127.0.0.1:4242/v1/fs/vessels/active/ctl/throttleFrame-phase controls take effect on the next game-frame drain. A rejected value returns a real errno:
EINVAL for a bad value, EACCES when control is disabled or forbidden, and EBUSY for a one-shot
that cannot fire again right now.
Next: Staging and modules, where controls start to have indexes.
Next: Staging and modulesFire a stage and discover the parts fitted to this particular vessel.