* NSH Added support for set [{+|-}{e|x|xe|ex}] [<name> <value>]
Set the 'exit on error control' and/or 'print a trace' of
commands when parsing scripts in NSH.
The settinngs are in effect from the point of exection,
until they are changed again, or in the case of the init
script, the settings are returned to the default settings
when it exits.
Included child scripts will run with the parents settings
and changes made in the child script will effect the parent
on return.
Use 'set -e' to enable and 'set +e' to disable (ignore) the exit
condition on commands. The default is -e. Errors cause script to
exit.
Use 'set -x' to enable and 'set +x' to disable (silence) printing
a trace of the script commands as they are ececuted. The default
is +x. No printing of a trace of script commands as they are
executed.
Print expanded variables if -x
* Added comments only on how to use the set +e and and set -x
* Spelling NSH_PFALG_* -> NSH_PFLAG_*
This disables the safety switch when Pixracer is configured. It does not change existing setups and it can be re-enabled after. This might be the more sensible default for a racing board.
This reverts commit 126172d70c.
This commit is going in the wrong direction: it's actually the same as
it was before, but allows changing the autostart configuration to
something other than 4070, which means people could wrongly assume it
would work in other configurations.
This way user can set aftwards any other AUTOSTART value and it will
not be overwritten.
Also move the block up and set SYS_AUTOCONFIG, this way if air frame
configuration was reset in ground station it will wipe the parameters
before load new ones.
Right now it's only possible to use ttyS2 as the UART for connecting a
companion computer. Add a variable that can be set so other boards may
be better supported.
As ASC use a non-standard UART for mavlink it is necessary check for
the board name and set SYS_AUTOSTART to initialize mavlink on the
right interface otherwise there is no way to change the SYS_AUTOSTART.
pwm_input was not working correctly (only after a pwm_input reset) on
Pixracer because fmu was started on all PWM output channels.
This moves the check if PWM input is needed up before the fmu start.
fixes a 'test: syntax error' message on startup. There were two problems:
- the expansion of $MAVLINK_F lead to multiple arguments in the test
when the variable contained spaces. Fixed with ""
- the x prevents interpretation as a unary expression, if $MAVLINK_F starts
with a - character (in that case the expansion would be:
if [ -r 1200 ... and nsh interprets - as unary expression)