I think you're really beating yourself up the hard way. ;-)

My suggestion:

get a board from

http://www.diolan.com/i2c/u2c12_doc/u2c_spi_config_ss_fun.html

and 7-segment driver chips from Maxim (7219) with an SPI interface (drives
8 alpha-numeric per chip) or a Maxim 6954 that drives 16 alpha-numerics or
any combination of discrete LEds. Run the chips as slaves on your SPI bus
and the diolan board as a master.

ATM my 747 sim has over 37 discrete alpha-numerics (MCP, nav/radio panels,
digital clocks, etc)- one master, (1) 6954 and (3) 7219s.    The 737 that
was delivered to NASA/Ames two years ago had a comparable number plus 54
discrete LEDs for warning lights, annunciators, etc

Use the Network code in FG as examples on writing a socket connection and
write a small program to run your hardware and connect to FG over a LAN. 
If you can program a micro-processor sounds like you're more than capable
of handling some higher level coding....

If you get your present design approach to work, great; if not, and want
to try my scheme. glad to help with design and code, your call....

Just my $0.02

John

  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.
>
>> I'm working on something similar too:
>> http://leeds.hackspace.org.uk/wiki/index.php/Projects/FlightSimHardware
>
> Good to know Jon, I'll be glad to talk about that with you.
> I like your hardware approach, getting your hands "dirty" on a naked
ATMega16 should be fun too :-)
>
>> The simplest solution seems to be to simply send the active and standby
frequencies whenever there's a change (up/down of the standby
frequency,
>> or swap of active/standby), and define a protocol that expects the two
frequencies, comma separated from the serial port. It doesn't appear to
matter that there's not a continuous data stream - the last received
value is used if there's no new data. I run the incoming protocol at
10Hz, which seems to give a quick enough response for the on screen
version of the display.
>
> I've settled down on sending the standby-mhz only cause I will send the
swap freq <-> button state too, that will swap the frequencies inside
fgfs
> property tree itself, without the need to send the active freq too.
Still I think it's better to make the external hardware send only the
rotary encoder's rotations from a design perspective, and not the
frequencies at all; I know that's debatable. I'm sending freq now for
easy
> of development only.
>
> I agree sending only changing values should be more desirable but
serially
> sent data should be sent all together, there's no way to send an input
chunk and leaving the others as-is; since my approach aims at
integrating
> several (not thousands but quite a few anyway!) physical input/output
devices, I think for simplicity everything should be sent at a constant
frequency. And no, I find 10hz is way too low for some other devices
(maybe frequency settings updates can tolerate a 10th of a second delay,
but it's still noticeable).
>
> I'm still wondering if you too have noticed that FGFS updates it's
property tree with not exact standby-mhz values when using such input
devices. Can you confirm? Did you solved this issue?
>
> I've also noticed you use <format>%03.3f</format> in an input chunk ...
I
> did try that too, I hoped that would get me a 3.3 digit format but
nothing! It's ignored. How's that at your side?
>
>
>
>
>
>
>
>> I'd like to be able to send values from flightgear back to the panel,
so
>> that updates to the properties are reflected on the radio panel
hardware, but it appears I've got some bugs in my code at the moment
(seems like a race condition or memory leak) that cause things to lock
up or randomly reset. I need to get it hooked up to a JTAGICE to debug
it.
>> Jon
>> ------------------------------------------------------------------------------
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
>
> --
> 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
>





------------------------------------------------------------------------------
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