

DemonDNF
Members-
Content Count
10 -
Donations
$0.00 -
Joined
-
Last visited
Community Reputation
0 NeutralProfile Information
-
Gender
Male
Flight Sim Profile
-
Commercial Member
No
-
Online Flight Organization Membership
VATSIM
-
Virtual Airlines
Yes
-
Solution (can't edit my post above to add Degrees): PointsTo is how the needle is drawn in the BMP, not how it is drawn by XML. Pointing up is North, right is East, etc. XML will draw the needle as it is drawn in the BMP, PointsTo is only telling it the direction for rotation calculation. Degrees is relative to PointsTo, and can sweep clockwise or counterclockwise, depending on the sequence of values. My Flaps gauge did not work because I told XML my needle was drawn pointing West, it was painted facing North (up), hence the 90 degree offset but the proper rotation. The Brake Pressure needle worked out of stupid luck. I told XML the needle was drawn pointing East, but it was also pointing North (up). So a value = 0 with 90 degrees will intend to rotate the needle from East to South using a needle drawn on its side. But since my needle is drawn pointing North, it rotates 90 degrees for value 0 and ends facing East, giving the correct position totally out of sheer luck.
-
Thanks for your time Vololiberista, but adding an entry for value -1 would not have made a difference. The gauge works fine without that entry. You supplied an example from the VC10, but this Brake Pressure is for the Level-D 767 and comes from Lekseecon (variable 761 offfset 0x8b90). There is no -1 value for cold & dark. Lekseecon uses another technique to manage cockpit state. And yes, I did take the time to use parts of the examples to test. But no amount of testing is going to help if I do not understand why code behaves as it does. I didn't understand properly the concept of PointsTo until Tom illustrated the meaning on FSdevelopper. PointsTo is how the needle is drawn in the BMP; this is never mentionned in the SDK. Now I understand why Flap Position gauge was offset by 90 degrees, and why Brake Pressure gauge worked fine out out of pure luck. And I don't see anything wrong asking the same question in two sites. Now if I had posted in two sub-forums on Avsim, then I'd agree that would be spamming and considered wrong. I also posted on Level-D General forum, and still have a total of 0 answers there. I did get the answer to why my Compass needle was not working from an Avsim thread; I needed a mask colour of 1,1,1. But it's Alan on FSdevelopper that confirmed I was using the wrong type of BMP file and needed 24bit, not 256 colours. Unless there's an exclusivity clause I missed when I signed up...? Robert
-
I reverted back to coordinates for both needles, and pointed Right needle to North, Left needle to West. Right needle is working fine, Left is offset 90 degrees. PointsTo is behaving really weird. I thought it was just a starting point to paint the needle until all the data came in, and then the rotation entries would take over. Apparently there's more going on. <Gauge Name="KK_FlapPosition" Version="1.0"> <Image Name="FlapPositionBackground.bmp"/> <!-- ========================= Flap Position - Left ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapLeftNeedle.bmp" PointsTo="West"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapLeft,number)</Value> <Nonlinearity> <Item Value="0" X="2" Y="60"/> <Item Value="1062" X="19" Y="19"/> <Item Value="2560" X="60" Y="2"/> <Item Value="5120" X="101" Y="19"/> <Item Value="5888" X="118" Y="60"/> <Item Value="8525" X="101" Y="101"/> <Item Value="10624" X="60" Y="118"/> </Nonlinearity> </Rotate> </Element> <!-- ========================= Flap Position - Right ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapRightNeedle.bmp" PointsTo="North"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapRight,number)</Value> <Nonlinearity> <Item Value="0" X="2" Y="60"/> <Item Value="1062" X="19" Y="19"/> <Item Value="2560" X="60" Y="2"/> <Item Value="5120" X="101" Y="19"/> <Item Value="5888" X="118" Y="60"/> <Item Value="8525" X="101" Y="101"/> <Item Value="10624" X="60" Y="118"/> </Nonlinearity> </Rotate> </Element> </Gauge> I'm just going to point the needle North.
-
Ok, so I simplified the XML to a single needle with only 3 positions; - Left Flap = 0 - PointsTo="North" - <Item Value="0" Degrees="0"/> This is what I was trying to explain, the needle behaves at a 90 degree offset from where it should. <Gauge Name="KK_FlapPosition" Version="1.0"> <Image Name="FlapPositionBackground.bmp"/> <!-- ========================= Flap Position - Left ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapLeftNeedle.bmp" PointsTo="North"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapLeft,number)</Value> <Nonlinearity> <Item Value="0" Degrees="0"/> <Item Value="1062" Degrees="45"/> <Item Value="2560" Degrees="90"/> </Nonlinearity> </Rotate> </Element> </Gauge> The needle should have been pointing North. Robert
-
Compass tape not showing
DemonDNF replied to DemonDNF's topic in FSX/FSX-SE Aircraft and Panel Design Forum - How To
SOLVED! 24bit BMP using 1,1,1 as colour for the mask was the answer. -
That's what I ended up doing, but it's wrong. Using 270 or -90 degrees makes no difference, both work fine. But for some reason that eludes me, I have to use East in this case. I fired up FS-X and loaded a flight with the Alternate Flap Selector and Flaps already at 5 degrees. For a fraction of a second the needle was pointing West, and then blipped to the proper direction for 5 degrees. And yet the XML instructs to point the needle East as an initial state. <Gauge Name="KK_FlapPosition" Version="1.0"> <Image Name="FlapPositionBackground.bmp"/> <!-- ========================= Flap Position - Left ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapLeftNeedle.bmp" PointsTo="East"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapLeft,number)</Value> <Nonlinearity> <Item Value="0" Degrees="-90"/> <Item Value="1062" Degrees="-45"/> <Item Value="2560" Degrees="0"/> <Item Value="5120" Degrees="45"/> <Item Value="5888" Degrees="90"/> <Item Value="8525" Degrees="135"/> <Item Value="10624" Degrees="180"/> </Nonlinearity> </Rotate> </Element> <!-- ========================= Flap Position - Right ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapRightNeedle.bmp" PointsTo="East"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapRight,number)</Value> <Nonlinearity> <Item Value="0" Degrees="-90"/> <Item Value="1062" Degrees="-45"/> <Item Value="2560" Degrees="0"/> <Item Value="5120" Degrees="45"/> <Item Value="5888" Degrees="90"/> <Item Value="8525" Degrees="135"/> <Item Value="10624" Degrees="180"/> </Nonlinearity> </Rotate> </Element> </Gauge> Totally stumped. Either I'm clearly not seeing the forest, or there's a bug. I'm a programmer by trade and this makes no sense to me. I can easily imagine an average person facing a situation like this and just giving up. Robert EDIT: Weird, that's the second time the bottom of my post beyond the code gets trimmed off and I have to edit.
-
Nope, the needle has a 90degree offset this way. Thanks, but that was one of the many combinations I had tried. All my needles are drawn pointing upwards. <Gauge Name="KK_FlapPosition" Version="1.0"> <Image Name="FlapPositionBackground.bmp"/> <!-- ========================= Flap Position - Left ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapLeftNeedle.bmp" PointsTo="North"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapLeft,number)</Value> <Nonlinearity> <Item Value="0" Degrees="-90"/> <Item Value="1062" Degrees="-45"/> <Item Value="2560" Degrees="0"/> <Item Value="5120" Degrees="45"/> <Item Value="5888" Degrees="90"/> <Item Value="8525" Degrees="135"/> <Item Value="10624" Degrees="180"/> </Nonlinearity> </Rotate> </Element> <!-- ========================= Flap Position - Right ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapRightNeedle.bmp" PointsTo="North"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapRight,number)</Value> <Nonlinearity> <Item Value="0" Degrees="-90"/> <Item Value="1062" Degrees="-45"/> <Item Value="2560" Degrees="0"/> <Item Value="5120" Degrees="45"/> <Item Value="5888" Degrees="90"/> <Item Value="8525" Degrees="135"/> <Item Value="10624" Degrees="180"/> </Nonlinearity> </Rotate> </Element> </Gauge> I'm stumped. The Brake Pressure gauge was done using the Flap Position XML, and yet the Brake Pressure gauge works fine but the Flap Position is wonky. Robert
-
Hi, My first time trying to make a tape shift. Any idea why the compass remains a black box with only the white line in the center? <Gauge Name="Compass" Version="1.0"> <Image Name="Compassbackground.bmp"/> <!-- Size = 102 x 42, black BMP --> <Element> <Position X="1" Y="1"/> <Image Name="CompassStrip.bmp"> <!-- Size = 520 x 40, white text on black BMP --> <Nonlinearity> <Item Value="0" X="440" Y="0"/> <Item Value="359" X="81" Y="0"/> </Nonlinearity> </Image> <MaskImage Name="CompassWindow.bmp"> <!-- Size = 100 x 40, black BMP --> <Axis X="50" Y="0"/> </MaskImage> <Shift> <Value>(L:KK_Compass,number)</Value> </Shift> </Element> <Element> <Position X="50" Y="0"/> <Image Name="CompassLine.bmp"> <!-- Size = 2 x 40, white BMP --> </Image> </Element> </Gauge> LUA displays 58 degrees onscreen (taken from offset x2B00 and rounded), this matches the existing compass reading. I've tried painting the Mask file 1,1,1 as indicated here: http://www.avsim.com/topic/445943-kohlsman-strip-not-showing-in-customized-gauge/?p=3025479 Same thing, no tape in gauge, just black with my white centerline. Robert P.S.: The size lines were added as comments to help here, they are not part of my source.
-
Hi, Searched the forum but couldn't find something for this (doesn't mean there was none, just that I couldn't see it in front of my face). The flap position needle is defined towards west and the brake pressure needle is defined towards east. But the flap needle points the same way as the brake pressure needle when both are 0. Both needles behave and turn as they should once I move data to them. <Gauge Name="KK_BrakePressure" Version="1.0"> <Image Name="BrakePressureBackground.bmp"/> <!-- ========================= BrakePressure ===================== --> <Element> <Position X="50" Y="50"/> <Image Name="BrakePressureNeedle.bmp" PointsTo="East"> <Axis X="13" Y="35"/> </Image> <Rotate> <Value Minimum="0" Maximum="40">(L:KK_BrakePressure,number)</Value> <Delay DegreesPerSecond="18"/> <Nonlinearity> <Item Value="0" Degrees="90"/> <Item Value="10" Degrees="150"/> <Item Value="20" Degrees="210"/> <Item Value="30" Degrees="270"/> <Item Value="40" Degrees="330"/> </Nonlinearity> </Rotate> </Element> </Gauge> <Gauge Name="KK_FlapPosition" Version="1.0"> <Image Name="FlapPositionBackground.bmp"/> <!-- ========================= Flap Position - Left ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapLeftNeedle.bmp" PointsTo="East"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapLeft,number)</Value> <Nonlinearity> <Item Value="0" Degrees="270"/> <Item Value="1062" Degrees="315"/> <Item Value="2560" Degrees="0"/> <Item Value="5120" Degrees="45"/> <Item Value="5888" Degrees="90"/> <Item Value="8525" Degrees="135"/> <Item Value="10624" Degrees="180"/> </Nonlinearity> </Rotate> </Element> <!-- ========================= Flap Position - Right ============== --> <Element> <Position X="60" Y="60"/> <Image Name="FlapRightNeedle.bmp" PointsTo="East"> <Axis X="8" Y="55"/> </Image> <Rotate> <Value Minimum="0" Maximum="10624">(L:KK_FlapRight,number)</Value> <Nonlinearity> <Item Value="0" Degrees="270"/> <Item Value="1062" Degrees="315"/> <Item Value="2560" Degrees="0"/> <Item Value="5120" Degrees="45"/> <Item Value="5888" Degrees="90"/> <Item Value="8525" Degrees="135"/> <Item Value="10624" Degrees="180"/> </Nonlinearity> </Rotate> </Element> </Gauge> I don't get it. I've tried DegreesPointTo=270 for west and 90 for east; same results. The flap needle would point backwards from where it should. All needle BMPs are painted the same way; vertically with tip pointing upwards. I defined the flap position needle as east for a temporary fix, but there has to be something wrong. Robert