Rev 761 | Rev 777 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 761 | Rev 764 | ||
---|---|---|---|
Line 129... | Line 129... | ||
129 | LicenseS_t *tmp_license; |
129 | LicenseS_t *tmp_license; |
130 | tmp_license = (LicenseS_t *) LicensePtr; |
130 | tmp_license = (LicenseS_t *) LicensePtr; |
Line 131... | Line 131... | ||
131 | 131 | ||
Line 132... | Line -... | ||
132 | Check16File = 0x55AA; |
- | |
133 | - | ||
134 | - | ||
135 | - | ||
136 | 132 | Check16File = 0x55AA; |
|
137 | 133 | ||
138 | if(doc == NULL) return(0); |
134 | if(doc == NULL) return(0); |
Line 139... | Line 135... | ||
139 | GPX_DocumentInit(doc); // intialize the document with resetvalues |
135 | GPX_DocumentInit(doc); // intialize the document with resetvalues |
Line 145... | Line 141... | ||
145 | if(doc->file != NULL) // could the file be opened? |
141 | if(doc->file != NULL) // could the file be opened? |
146 | { |
142 | { |
147 | retvalue = 1; // the document could be created on the drive. |
143 | retvalue = 1; // the document could be created on the drive. |
148 | doc->state = GPX_DOC_OPENED; // change document state to opened. At next a placemark has to be opened. |
144 | doc->state = GPX_DOC_OPENED; // change document state to opened. At next a placemark has to be opened. |
149 | fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document. |
145 | fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document. |
- | 146 | if(OEM_String[0] == 255) |
|
150 | 147 | { |
|
- | 148 | sprintf(string, "<link href=\"http://www.mikrokopter.de\">\r\n<text>MikroKopter</text>\r\n</link>\r\n"); |
|
- | 149 | CheckSumAndWrite(&Check16File,string, doc->file); |
|
- | 150 | } |
|
151 | sprintf(string, "<desc>FC HW:%d.%d SW:%d.%02d%c + NC HW:%d.%d SW:%d.%02d%c + BL HW:V%d SW:%d.%02d", (FC_Version.Hardware & 0x7F)/10,(FC_Version.Hardware & 0x7F)%10, FC_Version.Major, FC_Version.Minor, 'a'+FC_Version.Patch, UART_VersionInfo.HWMajor/10, UART_VersionInfo.HWMajor%10, VERSION_MAJOR, VERSION_MINOR, 'a'+ VERSION_PATCH,BLv,UART_VersionInfo.BL_Firmware/100,UART_VersionInfo.BL_Firmware%100); |
151 | sprintf(string, "<desc>FC HW:%d.%d SW:%d.%02d%c + NC HW:%d.%d SW:%d.%02d%c + BL HW:V%d SW:%d.%02d", (FC_Version.Hardware & 0x7F)/10,(FC_Version.Hardware & 0x7F)%10, FC_Version.Major, FC_Version.Minor, 'a'+FC_Version.Patch, UART_VersionInfo.HWMajor/10, UART_VersionInfo.HWMajor%10, VERSION_MAJOR, VERSION_MINOR, 'a'+ VERSION_PATCH,BLv,UART_VersionInfo.BL_Firmware/100,UART_VersionInfo.BL_Firmware%100); |
152 | CheckSumAndWrite(&Check16File,string, doc->file); |
152 | CheckSumAndWrite(&Check16File,string, doc->file); |
153 | if(SimulationFlags) { sprintf(string, " SIMULATED"); CheckSumAndWrite(&Check16File,string, doc->file);}; |
153 | if(SimulationFlags) { sprintf(string, " SIMULATED"); CheckSumAndWrite(&Check16File,string, doc->file);}; |
154 | if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE) sprintf(string, " (Redundant)</desc>\r\n"); |
154 | if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE) sprintf(string, " (Redundant)</desc>\r\n"); |
155 | else sprintf(string, "</desc>\r\n"); |
155 | else sprintf(string, "</desc>\r\n"); |
Line 168... | Line 168... | ||
168 | sprintf(string, "<License>\r\n"); CheckSumAndWrite(&Check16File,string, doc->file); |
168 | sprintf(string, "<License>\r\n"); CheckSumAndWrite(&Check16File,string, doc->file); |
169 | if(tmp_license->User[0] != 0) |
169 | if(tmp_license->User[0] != 0) |
170 | { |
170 | { |
171 | sprintf(string, "<name>%s</name>\r\n",tmp_license->User); CheckSumAndWrite(&Check16File,string, doc->file); |
171 | sprintf(string, "<name>%s</name>\r\n",tmp_license->User); CheckSumAndWrite(&Check16File,string, doc->file); |
172 | sprintf(string, "<email>%s</email>\r\n",tmp_license->eMail); CheckSumAndWrite(&Check16File,string, doc->file); |
172 | sprintf(string, "<email>%s</email>\r\n",tmp_license->eMail); CheckSumAndWrite(&Check16File,string, doc->file); |
173 | if(OEM_String[0] != 255) {sprintf(string, "<manufact>%s</manufact>\r\n",OEM_String); CheckSumAndWrite(&Check16File,string, doc->file);} |
173 | if(OEM_String[0] != 255) {sprintf(string, "<manufacturer>%s</manufacturer>\r\n",OEM_String); CheckSumAndWrite(&Check16File,string, doc->file);} |
- | 174 | else {sprintf(string, "<manufacturer>HiSystems GmbH</manufacturer>\r\n"); CheckSumAndWrite(&Check16File,string, doc->file);} |
|
174 | sprintf(string, "<features>%s</features>\r\n",tmp_license->Feature); CheckSumAndWrite(&Check16File,string, doc->file); |
175 | sprintf(string, "<features>%s</features>\r\n",tmp_license->Feature); CheckSumAndWrite(&Check16File,string, doc->file); |
175 | sprintf(string, "<expires>%s</expires>\r\n",tmp_license->Expire);CheckSumAndWrite(&Check16File,string, doc->file); |
176 | sprintf(string, "<expires>%s</expires>\r\n",tmp_license->Expire);CheckSumAndWrite(&Check16File,string, doc->file); |
176 | } |
177 | } |
177 | else |
178 | else |
178 | { |
179 | { |