Hallo everybody,
 I purchased a few rotary encoder and a bunch of 7segment displays to build a 
physical replacement of the Bendix KX165. I'm using Arduino which feeds data to 
FGFS on a serial connection. I'd like to update 
"instrumentation/comm[0]/frequencies/standby-mhz" property using the rotary 
encoder, I wonder what's the best strategy.

My current setup lets me read the rotary encoder rotation (it's a signed int 
value that measures it's direction and the amount of rotation; e.g. +3 equals 
three steps CW, -1 is 1 step CCW and 0 means it's not rotating) and send it to 
fgsf at 30Hz. This encoder is meant to be the KX165 physical equivalent of the 
frequency selector knob.

I can send those values to FGFS but that's useless as it is now; I should make 
FGFS increment the "standby-mhz" property accordingly; problem is that using 
the generic protocol to feed those data I can't use the same approach as in 
kx165-1.xml where the "property-adjust" (with a proper <step> value) command 
has been used.

I wonder how could I attack this part of the problem. Suggestions?

My first thought was to feed the raw increment to fgfs, store it in a custom 
property and let fgfs run a nasal script to update standby-mhz accordingly in 
the background. I'm only guessing now, I don't even know if it's even possible.

This scenario is of course of great interest to me since I'd like to use those 
rotary encoders for more stuff on FGFS.

cheers,
  Roberto
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!                       
Jetzt informieren: http://www.gmx.net/de/go/freephone

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to