534
edits
No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
switches=/opt/fgint/Config/switches.cfg | switches=/opt/fgint/Config/switches.cfg | ||
</syntaxhighlight> | </syntaxhighlight> | ||
There are 3 sections in the configuration : INT, MODULES and AUXCONF | |||
*INT : General Inteface configuration section. | |||
*MODULES : Modules configuration section. Modules that will be loaded into the interface object at creation. Should contain all devices configuration needed | |||
*AUXCONF : Auxiliary configuration section. Auxiliary configuration files that will be loaded into the interface object at creation. Should contain all cockpit element configuration connected to the inferface. | |||
=== Devices Configuration File === | === Devices Configuration File === | ||
/opt/fgint/Config/devices.cfg | |||
<syntaxhighlight lang="ini"> | |||
[CONF] | |||
confname=DEVICES | |||
[LEDPACK1] | |||
devicetype=HT16K33 | |||
devicename=LEDPACK1 | |||
deviceaddr=0x70 | |||
devicedummy=0 | |||
[IOPACK1] | |||
devicetype=MCP23017 | |||
devicename=IOPACK1 | |||
deviceaddr=0x20 | |||
devicedummy=0 | |||
</syntaxhighlight> | |||
=== Auxiliary Configuration File === | === Auxiliary Configuration File === | ||
/opt/fgint/Config/displays.cfg | |||
<syntaxhighlight lang="ini"> | |||
[CONF] | |||
confname=DISPLAYS | |||
library=FGIntSegDisplay | |||
module=SegDisplay | |||
properylist=device,dispname,nbdigit,port,com1,decdigit | |||
createmethod=createDisplays | |||
[PROPERTIES] | |||
prop01=device | |||
prop02=name | |||
prop03=nbdigit | |||
prop04=port | |||
prop05=com1 | |||
prop06=decdigit | |||
[ACTVFREQ] | |||
name=ACTVFREQ | |||
device=LEDPACK1 | |||
nbdigit=6 | |||
com1=1 | |||
port=A | |||
decdigit=3 | |||
[STBYFREQ] | |||
name=STBYFREQ | |||
device=LEDPACK1 | |||
nbdigit=6 | |||
com1=1 | |||
port=B | |||
decdigit=3 | |||
</syntaxhighlight> | |||
/opt/fgint/Config/switches.cfg | |||
<syntaxhighlight lang="ini"> | |||
[CONF] | |||
confname=SWITCHES | |||
library=FGIntSwitch | |||
module=Switch | |||
properylist=device,name,port,pin,values,valuestype,invert,node | |||
[PROPERTIES] | |||
prop01=device | |||
prop02=name | |||
prop03=port | |||
prop04=pin | |||
prop05=values | |||
prop06=valuestype | |||
prop07=invert | |||
prop08=node | |||
[POWERSW] | |||
name=powersw | |||
device=IOPACK1 | |||
port=B | |||
pin=2 | |||
values=0,1 | |||
valuestype=int | |||
node=None | |||
invert=0 | |||
</syntaxhighlight> | |||
=== FGInterface Class === | === FGInterface Class === | ||
edits