Documentation / Cmds

/NormalMode

/ExpertMode

/Special

Next Section

NG Shell Commands - Normal Mode

help / ?

This command shows the commands help list. The output is depending of the Normal/Expert mode of the shell.

show version

Shows the version of the currently running NG OS firmware.

show authors

Shows the authors of the NG hardware and software.

show devices

The Device Table contains all possible devices which will get probed while startup. This command displays all devices marked as detected in the Device Table.

The output of the command show devices looks like this:

In the above configuration we had 4x Holger BL-Ctrl on I2C1 (the I2C actor bus), 3x ADXR3000 (on the first ADC), 1x LISL (on the first SPI bus), 1x u-Blox GPS (on the second UART) and a ACT DSL receiver (on the first UART).

show stats / iostat

This command shows the current i/o statistics.

The output of the command show stats looks like this:

In this case the 'amir' controller was activated. You see the statistics of the closed-loop cycle, the statistics of the different input device's interupt handlers and the statistics of the behavior system.

show tasks / ps

This command shows the content of the Process Table. Every running task has an entry in it.

The output of the command ps looks similar to:

In the above sample you see three console shell tasks active. Two of them are ready and wait to get their time slice, the task with process id 0 is running and currently executing the ps command.

show controller / show ctrl / list ctrl

This command shows the included closed-loop controllers in this firmware. Closed-loop controllers can be easily added by developers and use a common application interfact to interact with the rest of the system.

The output of the command 'list ctrl' looks like this:

Each line shows a included closed-loop controller. Behind each controller a flag is displayed which indicates the quality of the respective closed-loop controller.

show rc

This command shows the RC signal, as it goes into the different closed-loop controllers. This means, this is the signal the controller sees and acts on!

The output of the command show rc looks like this:

Depending on the configuration of the global variable RC.dev.mix the different RC inputs get mixed and used as input for the controllers. RC.dev.mix can have the values primary or secondary which mean that the primary or secondary configured RC device will be used. Further values include ts-switch for teacher/student using a switch, ts-mix for teacher/student using mix-mode and diversity. All three of these modes will mix the primary and secondary RC devices defined by the variables RC.dev.primary and RC.dev.secondary.

The variables RC.dev.primary and RC.dev.secondary can take the values rcsum, uart0 and uart1 to chose from the RC sum signal input or the two ACT DSL UART inputs.

See also: loop rc

show rcsum

This command shows the signal as it gets received by the RC sum signal input. This is the raw signal that get's mixed together with other RC signals when diversity or teacher/student mixing is activated.

{i} This is not always the signal that the closed-loop controllers will receive! What they receive depends on the configuration of the RC.dev.mix variable.

The output of the command show rcsum looks like this:

See also: loop rcsum

show dsl status

This command shows RC DSL status of the two DSL signal inputs.

The output of the command show dsl status shows the status of the two DSL channels:

show dsl channels

The command show dsl channels shows the channels of the two DSL inputs as it gets received by the RC DSL signal input. This is the raw signal that get's mixed together with other RC signals when diversity or teacher/student mixing is activated.

{i} This is not always the signal that the closed-loop controllers will receive! What they receive depends on the configuration of the RC.dev.mix variable.

See also: loop dsl

loop adc

This command continuously shows the sampled values of the ADC channels AD0.[1..4] until the user presses a key.

The output of the command loop adc looks like this:

loop compass

This command continuously shows the HMC6352 compass heading (HW-0.10) or the MM33 compass heading (HW-0.20) until the user presses a key:

The output of the command loop compass looks like this:

loop ctrl

The command loop ctrl continuously shows the current closed-loop controller's input and output data until the user presses a key:

loop acc

The command loop acc shows the sampled acceleromenter values continuously until the user presses a key:

loop gps

The command loop gps continuously parses GPS NMEA messages and displays them on the console until the user presses a key.

loop rc

This command continuously shows the RC signal, as it goes into the different closed-loop controllers. This means, this is the signal the controller sees and acts on!

The output of the command loop rc looks like this:

loop rcsum

This command continuously shows the signal as it gets received by the RC sum signal input. This is the raw signal that get's mixed together with other RC signals when diversity or teacher/student mixing is activated.

{i} This is not always the signal that the closed-loop controllers will receive! What they receive depends on the configuration of the RC.dev.mix variable.

The output of the command show rcsum looks like this:

loop dsl [uart0|uart1]

The command loop dsl uart0 or loop dsl uart1 continuously shows the channels of the respective DSL input as it gets received by the RC DSL signal input. This is the raw signal that get's mixed together with other RC signals when diversity or teacher/student mixing is activated.

{i} This is not always the signal that the closed-loop controllers will receive! What they receive depends on the configuration of the RC.dev.mix variable.

The output of the command loop dsl uart0 looks like this:

print adc

This command shows the current samples on the four AD channels AD0.[1..4]. It's output looks like this:

print time

This command prints the current system uptime:

print battery

This command prints the current voltage of the LiPo battery attached:

print position

The command print position outputs the received GPS information:

# print position

Current GPS position:

Status: valid

Longitude: 8.6204552 degree
Latitude: 47.4615264 degree
Altitude: 629.2000122 meters

Speed: 0.448 meters
Course: 288.2399902 degrees

Satellites: 7 (Quality: 1)

See also: gps track

enable motors / on

The command enable motors or on will activate the configured controller and actors. It's the same command that get's executed when the NG starts. It changes the controller flight-state to SPINUP and activates the actors.

<!> Take care! This will spinup the motors!

disable motors / off

The command disable motors or off will disable the configured controller and actor. It's the same command that get's executed when the NG switches it's motors off after landing. It changes the controller flight-state to LANDED and deactivates the actors.

enable simulation / sim on

The command enable simulation or sim on will activate the configured controller but NOT activate the actors. It's a simulated start of the NG. It changes the controller flight-state to SPINUP.

disable simulation / sim off

The command disable simulation or sim off will disable the configured controller while not changing the actor's states. It's the end of a simulated start of the NG. It changes the controller flight-state to LANDED.

list controller / list ctrl

The command list controller or list ctrl shows the list of the available closed-loop controllers:

Behind each controller a flag shows current controller code quality.

show globals

The command show globals shows the list of the global variables and their values:

list conf

The command list conf lists the content of all configuration slots availabe:

The Default slot is the slot used when your NG starts up. It contains the default configuration automatically loaded on poweron.

show conf

The command show conf shows the configuration of the currently configured closed-loop controller. The variables shown depend on the controller set. Each controller can define his own variables. These variables may or may not be the same as variables with the same name of another controller.

The output of the show conf command for the controller 'amir' looks like this, for example:

conf store [slot]

The command conf store stores the current configuration in the default configuration slot. The command can take an argument which represents the slot number. When executed the system stores the current controller dependent variables and the global variables together with the current behavior rules in the given configuration slot or in the default slot, if no slot has been given.

The output of the command conf store looks like this:

conf load [slot]

The command conf load overwrites the current in-memory configuration with the configuration in the default configuration slot. The command can take an argument which represents the slot number. When executed the system overwrites the current in-memory controller dependent variables and the global variables together with the current behavior rules with the configuration in the given configuration slot or in the default slot, if no slot has been given. The command also sets the currently active controller to the one stored in the configuration slot.

The output of the command conf load looks like this:

set defaults

The command set defaults overwrites the current in-memory configuration with the configuration in the default configuration chooses by the programmers of the NG firmware. The default configuration is the best configuration to start with when activating a controller. It's also the configuratin which get's loaded when the stored default configuration is empty or non-compatible.

The output of the command set defaults looks like this:

set <key> <val>

The command set <key> <val> can be used to manipulate all global and controller dependent variables. The <key> represents the name of the variable and <val> the value. You can use it to set all data types.

The output of the command set Pnick 40 looks like this:

edit <key>

The command edit <key> can be used to manipulate numerical controller dependent variables. The <key> represents the name of the variable. After issuing the command you are able to use the up/down cursor keys to change the value of the variable. The left/right key jumps to the previous or next variable. You can use this command to set integer data types only!

The output of the command edit Pnick looks like this:

list behaviors

The command list behaviors displays the list of currently defined behavior rules. A behavior rule consists of a behavior condition and a behavior action. Arbitrary behavior conditions and behavior actions can be programmed and implemented in a modular way by developers. The user is able to manipulate the behavior rules by adding and deleting behavior rules shown in this list.

The output of the command list behaviors looks like this:

list conditions

The command list conditions displays the list of currently available behavior conditions. All these behavior conditions can be used to build new behavior rules.

The output of the command list conditions looks like this:

list actions

The command list actions displays the list of currently available behavior actions. All these behavior actions can be used to build new behavior rules.

The output of the command list actions looks like this:

behavior add ...

The command behavior add <condition>([arg1][,arg2]]) <action>([arg1[,arg2]]) defines a new behavior rule. The required argument <condition> represents a behavior condition as shown by the command list conditions. The required argument <action> represents a behavior action as shown by the command list actions. Both, condition and action, can optionally receive one or two integer arguments.

Adding a new behavior rule is simple and looks like this:

behavior delete [index]

The command behavior delete [index] removes one of the existing behavior rules shown by the command list behavior. The argument represents the behavior slot number of the behavior rule to delete.

The output of the command behavior delete 14 looks like this:

gps track start

The command gps track start starts GPS tracking as soon as a vaild fix is found if a attached GPS was probed and found.

gps track stop

The command gps track stop stops GPS tracking.

gps track clear

The command gps track clear clears the currently stored track.

gps track dump kml

The command gps track dump kml dumps the currently stored GPS track as KML file suitable for Google Earth and similar tools.

gps track status

The command gps track status shows the current status of the GPS tracking subsystem.

print position

The command print position shows the curent GPS position if a valid fix is available.

The output of the command print position with a valid GPS fix looks like this:

calibrate acc

The command calibrate acc calibrates the acceleration sensor (LISL). This has to be done when the NG stands perfectly horizontal. The measured displacement gets stored in the default configuration afterwards.

The output of the commannd calibrate acc looks like this:

calibrate adc

The command calibrate adc calibrates the gyroscope sensors (ADXR). This can be done regularly before starting.

The output of the command calibrate adc looks like this:

calibrate all

The command calibrate all calibrates gyros and acceleration sensor. It's currently essentially a calibrate acc and calibrate adc at the same time.

scan sensors

The command scan sensors scans the I2C sensor bus and outputs devices found.

scan actors

The command scan actors scans the I2C actor bus and outputs devices found.

The output of the command scan actors looks like this:

yge newaddr [old-addr] [new-addr]

The command yge newaddr [old-addr] [new-addr] re-configures the address of a YGE30i controller from address [old-addr] to the new address [new-addr].

dump conf

The command dump conf dumps the current controller configuration as a script which can be copy/pasted into a shell console to configure the configuration again. This way it's possible to dump a controller configuration and store it somewhere else.

The output of the command dump conf for the controller amir looks like this:

dump globals

The command dump globals dumps the current global configuration as a script which can be copy/pasted into a shell console to configure the configuration again. This way it's possible to dump a global configuration and store it somewhere else.

The output of the command dump globals looks like this:

dump all

The command dump all dumps the current global and controller configuration as a script which can be copy/pasted into a shell console to configure the configuration again. This way it's possible to dump a full global and controller configuration and store it somewhere else.

The output of the command dump all looks like this:

Documentation/Commands/NormalMode (last edited 2011-01-07 21:47:24 by Andre Geiger)