Rev 582 | Rev 592 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 582 | Rev 587 | ||
---|---|---|---|
Line 125... | Line 125... | ||
125 | else sprintf(string, "</desc>\r\n"); |
125 | else sprintf(string, "</desc>\r\n"); |
126 | fputs_(string, doc->file); |
126 | fputs_(string, doc->file); |
127 | sprintf(string, "<extensions>\r\n"); fputs_(string, doc->file); |
127 | sprintf(string, "<extensions>\r\n"); fputs_(string, doc->file); |
128 | sprintf(string, "<MK_Time>%imin</MK_Time>\r\n",FlugMinutenGesamt);fputs_(string, doc->file); |
128 | sprintf(string, "<MK_Time>%imin</MK_Time>\r\n",FlugMinutenGesamt);fputs_(string, doc->file); |
129 | sprintf(string, "<GpsVersion>%d.%03d</GpsVersion>\r\n",GPS_Version/1000,GPS_Version%1000);fputs_(string, doc->file); |
129 | sprintf(string, "<GpsVersion>%d.%03d</GpsVersion>\r\n",GPS_Version/1000,GPS_Version%1000);fputs_(string, doc->file); |
- | 130 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
130 | sprintf(string, "<License>\r\n"); fputs_(string, doc->file); |
131 | sprintf(string, "<License>\r\n"); fputs_(string, doc->file); |
131 | if(tmp_license->User[0] != 0) |
132 | if(tmp_license->User[0] != 0) |
132 | { |
133 | { |
133 | sprintf(string, "<name>%s</name>\r\n",tmp_license->User); fputs_(string, doc->file); |
134 | sprintf(string, "<name>%s</name>\r\n",tmp_license->User); fputs_(string, doc->file); |
134 | sprintf(string, "<email>%s</email>\r\n",tmp_license->eMail); fputs_(string, doc->file); |
135 | sprintf(string, "<email>%s</email>\r\n",tmp_license->eMail); fputs_(string, doc->file); |
Line 138... | Line 139... | ||
138 | else |
139 | else |
139 | { |
140 | { |
140 | sprintf(string, "<info>No License installed</info>\r\n"); fputs_(string, doc->file); |
141 | sprintf(string, "<info>No License installed</info>\r\n"); fputs_(string, doc->file); |
141 | } |
142 | } |
142 | sprintf(string, "</License>\r\n"); fputs_(string, doc->file); |
143 | sprintf(string, "</License>\r\n"); fputs_(string, doc->file); |
- | 144 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
143 | sprintf(string, "<settings>\r\n"); fputs_(string, doc->file); |
145 | sprintf(string, "<settings>\r\n"); fputs_(string, doc->file); |
144 | sprintf(string, "<Number>%i</Number>\r\n",Parameter.ActiveSetting);fputs_(string, doc->file); |
146 | sprintf(string, "<Number>%i</Number>\r\n",Parameter.ActiveSetting);fputs_(string, doc->file); |
- | 147 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
- | 148 | // Reciever Type |
|
- | 149 | sprintf(string, "<Receiver>");fputs_(string, doc->file); |
|
- | 150 | switch(Parameter.ReceiverType) |
|
- | 151 | { |
|
- | 152 | case RECEIVER_PPM: sprintf(string, "PPM"); break; |
|
- | 153 | case RECEIVER_SPEKTRUM: sprintf(string, "SPEKTRUM"); break; |
|
- | 154 | case RECEIVER_SPEKTRUM_HI_RES: sprintf(string, "SPEKTRUM_HI_RES"); break; |
|
- | 155 | case RECEIVER_SPEKTRUM_LOW_RES: sprintf(string, "SPEKTRUM_LOW_RES"); break; |
|
- | 156 | case RECEIVER_JETI: sprintf(string, "JETI"); break; |
|
- | 157 | case RECEIVER_ACT_DSL: sprintf(string, "ACT_DSL"); break; |
|
- | 158 | case RECEIVER_HOTT: sprintf(string, "HOTT"); break; |
|
- | 159 | case RECEIVER_SBUS: sprintf(string, "SBUS"); break; |
|
- | 160 | case RECEIVER_USER: sprintf(string, "USER"); break; |
|
- | 161 | default: sprintf(string, "? %d",Parameter.ReceiverType); break; |
|
- | 162 | } |
|
- | 163 | fputs_(string, doc->file); |
|
- | 164 | sprintf(string, "</Receiver>\r\n"); fputs_(string, doc->file); |
|
- | 165 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
145 | sprintf(string, "<CompassOffset>%i</CompassOffset>\r\n",FC.FromFC_CompassOffset/10);fputs_(string, doc->file); |
166 | sprintf(string, "<CompassOffset>%i</CompassOffset>\r\n",FC.FromFC_CompassOffset/10);fputs_(string, doc->file); |
146 | sprintf(string, "<FCOrientation>%i</FCOrientation>\r\n",Parameter.OrientationAngle*15);fputs_(string, doc->file); |
167 | sprintf(string, "<FCOrientation>%i</FCOrientation>\r\n",Parameter.OrientationAngle*15);fputs_(string, doc->file); |
147 | sprintf(string, "<GeoMag>%i.%1d</GeoMag>\r\n",GeoMagDec/10,GeoMagDec%10);fputs_(string, doc->file); |
168 | sprintf(string, "<GeoMag>%i.%1d</GeoMag>\r\n",GeoMagDec/10,abs(GeoMagDec)%10);fputs_(string, doc->file); |
148 | sprintf(string, "<Neutral>%d,%d,%d</Neutral>\r\n", FC.AdNeutralNick,FC.AdNeutralRoll,FC.AdNeutralYaw);fputs_(string, doc->file); |
169 | sprintf(string, "<Neutral>%d,%d,%d</Neutral>\r\n", FC.AdNeutralNick,FC.AdNeutralRoll,FC.AdNeutralYaw);fputs_(string, doc->file); |
- | 170 | sprintf(string, "<Kalibr.>%d,%d,%d</Kalibr.>\r\n", FC.BoatNeutralNick,FC.BoatNeutralRoll,FC.BoatNeutralYaw);fputs_(string, doc->file); |
|
149 | if((FC.StatusFlags3 & FC_STATUS3_BOAT)) {sprintf(string, "<BoatMode>On</BoatMode>\r\n");fputs_(string, doc->file);} |
171 | if((FC.StatusFlags3 & FC_STATUS3_BOAT)) {sprintf(string, "<BoatMode>On</BoatMode>\r\n");fputs_(string, doc->file);} |
150 | if(Parameter.Driftkomp) {sprintf(string, "<DriftComp>%i</DriftComp>\r\n",Parameter.Driftkomp);fputs_(string, doc->file);}; |
172 | if(Parameter.Driftkomp) {sprintf(string, "<DriftComp>%i</DriftComp>\r\n",Parameter.Driftkomp);fputs_(string, doc->file);}; |
- | 173 | ||
- | 174 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
- | 175 | // Magnetometer |
|
151 | if(Compass_I2CPort == NCMAG_PORT_EXTERN) sprintf(string, "<MagSensor>external (%i)</MagSensor>\r\n",NCMAG_Orientation); |
176 | if(Compass_I2CPort == NCMAG_PORT_EXTERN) sprintf(string, "<MagSensor>external,(%i),",NCMAG_Orientation); |
- | 177 | else sprintf(string, "<MagSensor>internal,"); |
|
- | 178 | fputs_(string, doc->file); |
|
- | 179 | switch(NCMAG_SensorType) |
|
- | 180 | { |
|
- | 181 | case TYPE_HMC5843: sprintf(string, "HMC"); break; |
|
- | 182 | case TYPE_LSM303DLH: sprintf(string, "DLH"); break; |
|
- | 183 | case TYPE_LSM303DLM: sprintf(string, "DLM"); break; |
|
- | 184 | default: sprintf(string, "? %d",NCMAG_SensorType); break; |
|
- | 185 | } |
|
- | 186 | fputs_(string, doc->file); |
|
152 | else sprintf(string, "<MagSensor>internal</MagSensor>\r\n");fputs_(string, doc->file); |
187 | sprintf(string, "</MagSensor>\r\n");fputs_(string, doc->file); |
- | 188 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
- | 189 | ||
153 | if(AbsoluteFlyingAltitude) {sprintf(string, "<MaxAltitude>%i</MaxAltitude>\r\n",AbsoluteFlyingAltitude);fputs_(string, doc->file);} |
190 | if(AbsoluteFlyingAltitude) {sprintf(string, "<MaxAltitude>%i</MaxAltitude>\r\n",AbsoluteFlyingAltitude);fputs_(string, doc->file);} |
154 | if(AbsoluteFlyingRange_m) {sprintf(string, "<FlyRange>%i</FlyRange>\r\n",AbsoluteFlyingRange_m);fputs_(string, doc->file);} |
191 | if(AbsoluteFlyingRange_m) {sprintf(string, "<FlyRange>%i</FlyRange>\r\n",AbsoluteFlyingRange_m);fputs_(string, doc->file);} |
155 | if(AutoDescendRange_m) {sprintf(string, "<Descend>%i</Descend>\r\n",AutoDescendRange_m);fputs_(string, doc->file);}; |
192 | if(AutoDescendRange_m) {sprintf(string, "<Descend>%i</Descend>\r\n",AutoDescendRange_m);fputs_(string, doc->file);}; |
Line 156... | Line 193... | ||
156 | 193 | ||
Line 160... | Line 197... | ||
160 | if(!(Parameter.GlobalConfig & FC_CFG_ACHSENKOPPLUNG_AKTIV)) {sprintf(string, "<AxisCoupling>OFF!</AxisCoupling>\r\n");fputs_(string, doc->file);} |
197 | if(!(Parameter.GlobalConfig & FC_CFG_ACHSENKOPPLUNG_AKTIV)) {sprintf(string, "<AxisCoupling>OFF!</AxisCoupling>\r\n");fputs_(string, doc->file);} |
161 | if(!(Parameter.GlobalConfig & FC_CFG_KOMPASS_AKTIV)) {sprintf(string, "<CompassActive>OFF!</CompassActive>\r\n");fputs_(string, doc->file);} |
198 | if(!(Parameter.GlobalConfig & FC_CFG_KOMPASS_AKTIV)) {sprintf(string, "<CompassActive>OFF!</CompassActive>\r\n");fputs_(string, doc->file);} |
162 | if((Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE)) {sprintf(string, "<VarioFailsafe>On</VarioFailsafe>\r\n");fputs_(string, doc->file);} |
199 | if((Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE)) {sprintf(string, "<VarioFailsafe>On</VarioFailsafe>\r\n");fputs_(string, doc->file);} |
163 | if((Parameter.ExtraConfig & CFG_3_3V_REFERENCE)) {sprintf(string, "<3.3V_Reference>On</3.3V_Reference>\r\n");fputs_(string, doc->file);} |
200 | if((Parameter.ExtraConfig & CFG_3_3V_REFERENCE)) {sprintf(string, "<3.3V_Reference>On</3.3V_Reference>\r\n");fputs_(string, doc->file);} |
164 | if((Parameter.ExtraConfig & CFG_IGNORE_MAG_ERR_AT_STARTUP)) {sprintf(string, "<IgnoreMagnetError>ON!</IgnoreMagnetError>\r\n");fputs_(string, doc->file);} |
201 | if((Parameter.ExtraConfig & CFG_IGNORE_MAG_ERR_AT_STARTUP)) {sprintf(string, "<IgnoreMagnetError>ON!</IgnoreMagnetError>\r\n");fputs_(string, doc->file);} |
- | 202 | if(FC.FromFC_DisableDeclination) {sprintf(string, "<DisableDeclinationCalc>ON!</DisableDeclinationCalc>\r\n");fputs_(string, doc->file);} |
|
Line 165... | Line 203... | ||
165 | 203 | ||
166 | sprintf(string, "<Bytes>%02x,%02x,%02x</Bytes>\r\n",Parameter.GlobalConfig,Parameter.ExtraConfig,Parameter.GlobalConfig3);fputs_(string, doc->file); |
204 | sprintf(string, "<Bytes>%02x,%02x,%02x</Bytes>\r\n",Parameter.GlobalConfig,Parameter.ExtraConfig,Parameter.GlobalConfig3);fputs_(string, doc->file); |
167 | sprintf(string, "</settings>\r\n"); fputs_(string, doc->file); |
205 | sprintf(string, "</settings>\r\n"); fputs_(string, doc->file); |
Line 437... | Line 475... | ||
437 | sprintf(string, "<Capacity>%d</Capacity>\r\n", NaviData.UsedCapacity); |
475 | sprintf(string, "<Capacity>%d</Capacity>\r\n", NaviData.UsedCapacity); |
438 | fputs_(string, doc->file); |
476 | fputs_(string, doc->file); |
439 | break; |
477 | break; |
440 | case 4: |
478 | case 4: |
441 | // Compass in deg |
479 | // Compass in deg |
442 | if(SimulationFlags) sprintf(string, "<Compass>%03d,%03d,%03d,%03d</Compass>\r\n",SimulatedDirection,SimulatedDirection,CompassSetpointCorrected/10,SimulatedDirection); |
480 | if(SimulationFlags) sprintf(string, "<Compass>%03d,%03d,%03d.%1d,%03d.0</Compass>\r\n",SimulatedDirection,SimulatedDirection,CompassSetpointCorrected/10,CompassSetpointCorrected%10,SimulatedDirection); |
443 | else sprintf(string, "<Compass>%03d,%03d,%03d,%03d</Compass>\r\n",FromFlightCtrl.GyroHeading/10,ToFlightCtrl.CompassHeading,CompassSetpointCorrected/10,GyroCompassCorrected/10); |
481 | else sprintf(string, "<Compass>%03d,%03d,%03d.%1d,%03d.%1d</Compass>\r\n",FromFlightCtrl.GyroHeading/10,ToFlightCtrl.CompassHeading,CompassSetpointCorrected/10,CompassSetpointCorrected%10,GyroCompassCorrected/10,GyroCompassCorrected%10); |
444 | fputs_(string, doc->file); |
482 | fputs_(string, doc->file); |
445 | // magnetic field |
483 | // magnetic field |
446 | sprintf(string, "<MagnetField>%03d</MagnetField>\r\n",(u16) (EarthMagneticFieldFiltered/5)); |
484 | sprintf(string, "<MagnetField>%03d</MagnetField>\r\n",(u16) (EarthMagneticFieldFiltered/5)); |
447 | fputs_(string, doc->file); |
485 | fputs_(string, doc->file); |
448 | // magnetic inclination & error |
486 | // magnetic inclination & error |