• 热门标签

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

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

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: 12 March-08
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: 12 March-08
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.
Project Magenta Revision: 12 March-08
58
Various types of variables can be defined. Single bytes, word, double words and bits.
Syntax:
[offset] [length] [variable_name] [factor]
3102 1 fsBattery
// the variable fsBattery is defined by offset 0x3102 and is one byte long... the value can be 0 to 255
04F4 2 pm4F4
// this would be an example for a WORD (2 bytes)
0808 4 fsYawDamper
// this doe a DWORD (4 bytes)
5600 .0 APUMasterFault
// 0x5600 to 0x56FF are internally reserved for pmSystems variables in this case a bit 0 of 0x5600
// bits would be defined .0 .1 .2 ... .7 and would always be 8 maximum... thus no bit 11
// the values are of course 0 and 1
Section [constants]
This section is used to define constants that can be used in the [logics] section.
The syntax is simply [constant_name]=[value]
E.g.:
[constants]
APUEGTLimit=560
[logics]
if (APUEGT > APUEGTLimit)
____APUEGTLimitLight = 1
else
 
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:航空资料13(18)