-
Notifications
You must be signed in to change notification settings - Fork 9
firestep command line
The FireStep command line client provides higher level FireStep commands
and manages the serial connection with FireStep.
The firestep command line client is currently supported on:
- Linux (tested on Linux 3.14.0)
HELP : firestep command line client v0.0205
HELP :
HELP : EXAMPLES
HELP : Launch interactive console with prompt
HELP : firestep -p
HELP : firestep --prompt
HELP : Reset FireStep, ignore all commands and return -EAGAIN
HELP : firestep -r
HELP : firestep --reset
HELP : Specify serial device (default is /dev/ttyACM0)
HELP : firestep -d /dev/ttyACM0
HELP : firestep -device /dev/ttyACM0
HELP : Process single JSON command
HELP : firestep -e '{"hom":""}'
HELP : firestep --expr '{"hom":""}'
HELP : Process one command per line from JSON file
HELP : firestep < test/multiline.json
HELP : Show concise version, ignore all commands and return -EAGAIN
HELP : firestep -v
HELP : firestep --version
HELP : Enable logging at given message threshold to firestep.log
HELP : firestep --logerror
HELP : firestep --logwarn
HELP : firestep --loginfo
HELP : firestep --logdebug
HELP : firestep --logtrace
HELP : Show this help text
HELP : firestep -h
HELP : firestep --help
HELP :
HELP : DESCRIPTION
HELP : Establish serial connection to FireStep and provide
HELP : extended Firestep commands via command line interface.
HELP : Commands can be executed individually, from a file,
HELP : or from an optionally prompted interactive session.
HELP :
HELP : SEE ALSO
HELP : https://github.com/firepick1/FireStep/wiki/firestep-command-line
The [standard home auto-calibration sequence]
(https://github.com/firepick1/FireStep/wiki/Z-Bowl%20Error#calibration-home-angle-auto-calibration-haac)
takes six FireStep JSON commands. You can send them all using a single
firestep command line:
firestep --loginfo < scripts/cal-fpd-home.jsonThis example also illustrates how you can set up multi-line FireStep JSON
command files and execute them using firestep.
Logging is disabled by default. You can enable logging to any of 5 message thresholds:
-
--logerroronly show errors -
--logwarnonly show errors and warnings -
--loginfoonly show errors, warnings and generally useful information -
--logdebugshow all messages except trace messages -
--logtraceshow all messages
When logging is enabled, the output is sent to firestep.log.
See firestep-example.log
You can launch a logged, prompted interactive session with FireStep that acts much like the Arduino serial console:
firestep -p --loginfoYou will see something like this:
STATUS : firestep command line client v0.0205
CMD : _Just enter a JSON command and press ENTER:
STATUS : firestep command line client v0.0205
CMD : {"hom":""}
{"s":0,"r":{"hom":{"1":-10231,"2":-10231,"3":-10231,"4":0}},"t":2.973}The Arduino resets on DTR low (i.e., hang up on close or hup).
To support scripting, firestep does
not reset the Arduino unless you tell it do so:
firestep --loginfo -rYou can also use the firestep command line for scripting with the -e
parameter, which sends a single command:
firestep -e '{"hom":""}'Note that, for bash, you must single-quote the JSON command to escape the
JSON double-quotes.
The firestep client is provided is source form and you will need
to build it to run on your machine.
To build the firestep command line client on Linux (Debian):
git clone https://github.com/firepick1/FireStep.gitcd FireStep
Perform a complete build by invoking CMAKE to set up your makefiles:
./build clean all
Perform an incremental build on existing files:
make
Install firestep:
sudo make install