• 热门标签

当前位置: 主页 > 航空资料 > 国外资料 >

时间:2010-08-14 08:46来源:蓝天飞行翻译 作者:admin
曝光台 注意防骗 网曝天猫店富美金盛家居专营店坑蒙拐骗欺诈消费者

55
Configuration File Sections (General)
The configuration files are located in the main pmSystems Folder and need to have at least one txt file. The
naming convention of the file is pmsys????.txt (e.g. pmsys320.txt)
In addition to that, the elements of the file can be split up into several files, the default files that come with
pmSystems are pmsys????.txt (graphics base) and pmsys????.lgc (Logics)
You can also include user-defined files by adding the line:
include myfile.txt // this would load myfile.txt to define variables or add logics to the default files
[init]
initialization sequence with variable and offset values (this can be at the beginning of the file)
batt1 1
oilpress3 44
[bitmap]
definition of bitmap images in pmsystems.img
e.g.: bitmap [element name], [position], [x1, y1, x2, y2], [offsetx, offsety], [sizefactor]
[variables]
Any variable you wish to use in addition to those listed in SysVars.txt
e.g. offset variable_size varieble_name [factor]
Also, there are system specific variables such as:
elapsed
- will return the number of seconds since the logics loop was called last time
iohardware
- will return true if IOHardware is selected in the Menu/Ini
random
- returns an ever changing value between 0 and 1000
mainpwr
- governs whether lights and light based outputs (like text boxes) are operative (can be based on battery
switch position)
Project Magenta Revision: 26-May-07
56
basepwr
- governs whether digital texts and gauges are operative (can be based on battery switch position)
[constants]
Any constant that needs to be defined
e.g. UpperLimitTemp 200
[elements]
definition of graphics elements, text, color settings etc.
text HELLO WORLD,-142.4,-170.6
linewidth 4
element tswitch2,-169.1,-161.1,LandLightLOut
[logics]
definition of logics, i.e. how variables react to offsets and user inputs
if batteryon and (batteryrunning < 100) then
batteryrunning = batteryrunning + 1
endif
[script]
user-defined scripts to display texts and movements of the screen (more soon)
Section [init]
You can set the initialization of variables here.
The first set of variables are applied whenever pmSystems connects to FS, the ones in the Eng1, Eng2,
Eng3, Eng4 sections are only applied if the particular engine is running.
[variable name] [value]
To add options that can be changed by the user (via the pmSystems Menu), you can also add the following
command:
useroption [variable name] [description]
useroption HideSDPanel "Hides System Display Panel from the Overhead"
Project Magenta Revision: 26-May-07
57
The On/Off variable HideSDPanel can now be used both in the [elements] and the [logics] section:
e.g.
[elements]
if not HideSDPanel
___//draw graphics here
else
___//do nothing
endif
The value of this variable is either 1 or 0 and is also reflected in the [logics] section. This allows you to
make changes to the display and operation of the panel for various aircraft sub-types or whatever else you
see necessary.
These useroption commands and values are stored in a pmsysXXXXX.ini file for each selected
pmsysXXXXX.txt file.
Section [bitmaps]
pmSystems loads a file called pmsystems.img into memory and extracts the bitmap graphics for single
elements or units from it. This part is not documented initially, but examples can be found inside the
configuration files themselves.
bitmap [element name], [position], [x1, y1, x2, y2], [offsetx, offsety], [sizefactor]
The element name can be anything like Switch, MySwitch, SmallKnob.
Position defines the various positions the bitmaps reflect of one particular switch, starting from 0. I.e. if you
have a knob with three positions, they have to be defined sequentially 0, 1, 2.
The x1,y1,x2,y2 coordinates are used to extract the image from the bitmap file.
The offsetx,offsety can be used to correct possible pixel imprecisions relative to the anchor point of the
element.
sizefactor 1.0 for 1:1 size or 0.5 for half size
Section [variables] or [vars] and sysvar.txt
pmSystems can read and write various types of FSUIPC variables, both normal ones used by FS, special
ones for pmSystems, and any variables used by other programs. To learn more about FSUIPC please go to
www.schiratti.com/dowson.html and check the program itself as well as the FSUIPC SDK.
The [variables] section should be in the file before the variables are actually used in the logics or element
section.
The variable names used within pmSystems can be sequences of alphanumeric characters, in one word.
The variable offsets themselves are always understood as hex values, i.e. 0x1234.
 
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:航空资料12(106)