/Configs |
The NG Configurations
Contents
Introduction
Different Controllers need to be able to have different configuration parameters. To allow this, the NGOS has two types of configuration parameters, global parameters and controller dependent parameters. Both can be used with the same commands and some Controllers share parameters with other ones if the parameter represents the same variable.
Global Configuration Parameters
The Global Configuration Parameters are the same for all possible Controllers. They represent global variables which can be only changed by the user. The parameters can be viewed with the command show globals. The value of the parameters can be changed using the command set <var> <val>.
The output of the show globals parameters looks similar to this:
# show globals Current global configuration: Name UAVP Configuration name RC.ch.throttle 0 RC channel throttle RC.ch.nick 2 RC channel nick RC.ch.roll 1 RC channel roll RC.ch.yaw 3 RC channel yaw RC.ch.pot0 8 RC channel pot0 RC.ch.pot1 4 RC channel pot1 RC.ch.pot2 6 RC channel pot2 RC.ch.pot3 5 RC channel pot3 RC.ch.pot4 7 RC channel pot4 RC.ch.pot5 9 RC channel pot5 RC.ch.pot6 10 RC channel pot6 RC.ch.pot7 11 RC channel pot7 BAT.minimum 9.80000019 Battery minimum voltage TERM.mode normal Terminal mode HW.uart0.baud 115200 HW baud rate for UART0 HW.uart1.baud 115200 HW baud rate for UART1 HW.gyro.type MLX HW gyro type HW.acc.horizontal yes HW acc mount orientation HW.use.sound normal HW do use sound device HW.use.dtc yes HW do use dynamic throttle control HW.use.acc yes HW do use accelerometer HW.use.ngpp yes HW do use NG peripherial protocol HW.use.compass no HW do use compass HW.use.PT1.comp no HW do use PT1 compensation HW.PT1.comp.k1 800 HW PT1 parameter K1 HW.PT1.comp.t1.down 148 HW PT1 parameter T1 down HW.PT1.comp.t1.up 148 HW PT1 parameter T1 up RC.death.zone 1 RC death zone size RC.show.drops no RC show frame drops RC.dev.primary dsl0 RC primary input device RC.dev.secondary dsl1 RC secondary input device RC.dev.mix primary RC device mixing type
Controller Dependent Parameters
Each Controller has associated Controller Dependent Parameters. Some of them are shared between controllers because they represent the same parameters, some are not. They represent configuration parameters used by the currently configured Controller and affect the closed-loop control algorithm implemented by that Controller. The parameters of the currently configured controller can be viewed with the command show conf.
The output of the show conf parameters may look similar to this:
# show conf Current system configuration: Controller amir Tidle 20 Treserve 20 Tspinup 2 Pnick 35 Proll 35 Pyaw 200 Dnick 200 Droll 200 Dyaw 100 Inick 70 Iroll 70 Iyaw 140 Kalman.Gyro.Q 0.00030000 Kalman.ACC.Q 0.00010000 Kalman.ACC.R 3.00000000 Kalman.Cycle 1 RCnickcorr 0 RCrollcorr 0 RCyawcorr 0 RCthrottlehoover 100 ACCnickcorr 0 ACCrollcorr 0 ACCyawcorr 0 TRIMroll 0 TRIMnick 0 TRIMyaw 0 RC.fact.nick 40 RC.fact.roll 40 RC.fact.yaw 80
How to use different configurations
The different configurations can be configured on the NG Shells. Each controller will have its own controller dependant configuration variables. Some of them are shared between controllers because they represent the same parameters, some are not. Switching to a Controller also switches to its associated controller dependent configuration parameters.
The needed Shell Commands
The Global Configuration Parameters can be viewed using the command show globals. The parameters of the Controller Dependent Parameters can be viewed with the command show conf after having choosen a controller using the command 'set controller <ctrl>'.
The command set controller <ctrl> configures the currently used closed-loop controller amd switches to its associated controller dependent configuration parameters.
The values of the parameters can be changed with the command set <var> <val>. For controller dependent integer parameters there's a second command called edit <var>.
The global and and controller dependent parameters can be stored with the command conf store [<slot>] and loaded with the command conf load [<slot>]. The commands always store global parameters, configured controller and all controller dependent variables in one slot.
Behavior triggered Configuration Change
There exists a behavior action which can change the configured controller. It is called ctrl.switch.conf(x). It can switch to the next or the previous configuration or to a specific one.
