April 16, 201115 yr First the goal, I want to create a non-working (hooked to FS9) gauge than simulates a Foster 511 RNAV device. All I want is to simulate the input thumbwheel switches using mouse clicks and vertical sliding mask. The following code segments illustrate I think the basic idea however they don't work. Using Blackbox2 to observe the L:RNAV_WP1_BEARING variable in segment 1 and the G:Var1 variable in segment 2. My question is why do these code segments work differently and what is the trick to getting the number strip to move up and down? A second question is how do I limit the range to 0 to 9 when incrementing/decrementing?I'd really appreciate some help (HINT, HINT Arne Bartels).David1: Will not increment RNAV_WP1_BEARING nor will the vertical number strip (0 to 9) move.<Gauge Name="Foster RNAV 511" Version="1.0"> <Image Name="Foster1_FP.bmp"/> <Element> <Position X="0" Y="0"/> <MaskImage Name="Foster1_FP_Mask.bmp" Luminous="No"> <Axis X="6" Y="27"/> </MaskImage> <Image Name="Bearing_Dec_Wht_strip.bmp" Luminous="Yes"> <Axis X="6" Y="90"/> <Nonlinearity> <Item Value="0" X="0" Y="9"/> <Item Value="9" X="0" Y="171"/> </Nonlinearity> </Image> </Element> <Shift> <Value>(L:RNAV_WP1_BEARING,number)</Value> </Shift> <Mouse> <Area Left="0" Top="18" Right="12" Bottom="36"> <Cursor Type="UpArrow"/> <Click> (L:RNAV_WP1_BEARING,number) ++ (>L:RNAV_WP1_BEARING,number) Repeat="No"> </Click> </Area> <Area Left="0" Top="36" Right="12" Bottom="54"> <Cursor Type="DownArrow"/> <Click> (L:RNAV_WP1_BEARING,number) -- (>L:RNAV_WP1_BEARING,number) Repeat="No"> </Click> </Area> </Mouse></Gauge>2: Will increment/decrement G:Var1 but will not move number strip.<Gauge Name="Foster RNAV 511" Version="1.0"> <Image Name="Foster1_FP.bmp"/> <Update> (G:Var1) (>L:GVar1, number) </Update> <Element> <Position X="0" Y="0"/> <MaskImage Name="Foster1_FP_Mask.bmp" Luminous="No"> <Axis X="6" Y="27"/> </MaskImage> <Image Name="Bearing_Dec_Wht_strip.bmp" Luminous="Yes"> <Axis X="6" Y="90"/> <Nonlinearity> <Item Value="0" X="0" Y="9"/> <Item Value="9" X="0" Y="171"/> </Nonlinearity> </Image> </Element> <Shift> <Value>(G:Var1)</Value> </Shift> <Mouse> <Area Left="0" Top="18" Right="12" Bottom="36"> <Cursor Type="UpArrow"/> <Click> (G:Var1) ++ (>G:Var1) Repeat="No"> </Click> </Area> <Area Left="0" Top="36" Right="12" Bottom="54"> <Cursor Type="DownArrow"/> <Click> (G:Var1) -- (>G:Var1) Repeat="No"> </Click> </Area> </Mouse></Gauge>
April 16, 201115 yr Moderator Syntax errors in the <Click ...> sections. The Repeat="No" is a subparameter of the <Click ...> tag. <Click Repeat="No"> (L:RNAV_WP1_BEARING,number) ++ (>L:RNAV_WP1_BEARING,number)</Click><Click Repeat="No"> (L:RNAV_WP1_BEARING,number) -- (>L:RNAV_WP1_BEARING,number)</Click> Also, the <Nonlinearity> table should be a child of the <Shift> section.To limit something like a thumbwheel to the range 0 - 9, simply include the correct min and max parameters. Note that they are "backwards" in XML's Polish Notation... :( (L:T38_Xpdr_Mode1_1s,enum) -- 9 min 0 max (>L:T38_Xpdr_Mode1_1s,enum)(L:T38_Xpdr_Mode1_1s,enum) ++ 9 min 0 max (>L:T38_Xpdr_Mode1_1s,enum) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment