|
From: Durk T. <du...@ba...> - 2009-01-31 08:36:19
|
Update of /var/cvs/FlightGear-0.9/source/src/Network In directory baron.flightgear.org:/tmp/cvs-serv6295 Modified Files: atlas.cxx Log Message: Brian Schack: Patch to the atlas protocol that allows nav1 &2 frequencies and radials, as well the selected ADF frequency to be transmitted to Atlas DT: Two minor modifications to the adf part to make it work, and some testing. Index: atlas.cxx =================================================================== RCS file: /var/cvs/FlightGear-0.9/source/src/Network/atlas.cxx,v retrieving revision 1.13 retrieving revision 1.14 diff -C 2 -r1.13 -r1.14 *** atlas.cxx 1 Dec 2008 13:58:04 -0000 1.13 --- atlas.cxx 31 Jan 2009 08:36:11 -0000 1.14 *************** *** 30,33 **** --- 30,35 ---- + + #include <FDM/flight.hxx> #include <Main/globals.hxx> *************** *** 70,78 **** static SGPropertyNode *adf_freq ! = fgGetNode("/instrumentation/adf/outputs/selected-khz", true); ! static SGPropertyNode *nav_freq = fgGetNode("/instrumentation/nav/frequencies/selected-mhz", true); ! static SGPropertyNode *nav_sel_radial = fgGetNode("/instrumentation/nav/radials/selected-deg", true); char rmc[256], gga[256], patla[256]; --- 72,84 ---- static SGPropertyNode *adf_freq ! = fgGetNode("/instrumentation/adf/frequencies/selected-khz", true); ! static SGPropertyNode *nav1_freq = fgGetNode("/instrumentation/nav/frequencies/selected-mhz", true); ! static SGPropertyNode *nav1_sel_radial = fgGetNode("/instrumentation/nav/radials/selected-deg", true); + static SGPropertyNode *nav2_freq + = fgGetNode("/instrumentation/nav[1]/frequencies/selected-mhz", true); + static SGPropertyNode *nav2_sel_radial + = fgGetNode("/instrumentation/nav[1]/radials/selected-deg", true); char rmc[256], gga[256], patla[256]; *************** *** 139,146 **** sprintf( patla, "PATLA,%.2f,%.1f,%.2f,%.1f,%.0f", ! nav_freq->getDoubleValue(), ! nav_sel_radial->getDoubleValue(), ! nav_freq->getDoubleValue(), ! nav_sel_radial->getDoubleValue(), adf_freq->getDoubleValue() ); sprintf( patla_sum, "%02X", calc_atlas_cksum(patla) ); --- 145,152 ---- sprintf( patla, "PATLA,%.2f,%.1f,%.2f,%.1f,%.0f", ! nav1_freq->getDoubleValue(), ! nav1_sel_radial->getDoubleValue(), ! nav2_freq->getDoubleValue(), ! nav2_sel_radial->getDoubleValue(), adf_freq->getDoubleValue() ); sprintf( patla_sum, "%02X", calc_atlas_cksum(patla) ); |