I wrote:

> Melchior FRANZ wrote:
> > * Stuart Buchanan -- Tuesday 03 February 2009:
> > > I was looking at the tag for the property-adjust, which I
> > > noticed wasn't previously used in the kx165. However, when I tried
> > > it I found two problems. [...]
> > 
> > > 1) The decimal affected high-order integer values as well
> > 
> > That should be fixable.
> 
> I hope so - I'm going to look at it myself.

OK. I think I've got to the bottom of this.

The underlying problem is the way that property-adjust works when 
<mask>decimal</mask> is set along with <min> and <max> tags. 

For example, consider this binding:

        <command>property-adjust</command>
        <property alias="../../../../params/nav-frq-standby"/>
        <step>0.05</step>
        <min>108.0</min>
        <max>118.0</max>
        <resolution>0.05</resolution>
        <wrap>true</wrap>
        <mask>decimal</mask>

At first glance, one might expect this to be reasonable, but the behaviour
is bizarre.

The property-adjust command splits the current property value into the 
masked and unmasked part. After incrementing the masked part (in 
this case the decimal bit), it them attempts to limit it to the range 
108.0 -> 118.0. Naturally, a value < 1.0 will always need to be 
increased to the minimum limit. This integer part is then added to 
this (rather large) decimal part. This results in the property being continually
incremented by 108.05.

This can be worked around by setting <min> and <max> to 0.0 and 1.0. 
This is what has been done in many aircraft, and makes sense.

However, given that <mask>decimal</mask> has been set, it seems
to me that the min/max values should be forced to 0.0/1.0. Anyone got
an opinion on this?

The attached patch sets the mask and min/max values appropriately 
for the kx165-1, and merges in Torsten's changes for shift-scrollwheel.

-Stuart


      

Attachment: kx165-1.xml.diff.gz
Description: GNU Zip compressed data

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to