On 31/03/11 21:28, Roberto Inzerillo wrote: > 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.
I'm working on something similar too: http://leeds.hackspace.org.uk/wiki/index.php/Projects/FlightSimHardware 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'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