Rev 492 | Rev 495 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 492 | Rev 494 | ||
---|---|---|---|
Line 353... | Line 353... | ||
353 | } |
353 | } |
Line 354... | Line 354... | ||
354 | 354 | ||
355 | #define LINE_MAX 70 |
355 | #define LINE_MAX 70 |
356 | #define WP_FILE_VERSION_COMPATIBLE 3 |
356 | #define WP_FILE_VERSION_COMPATIBLE 3 |
357 | // save actual point list to SD card |
357 | // save actual point list to SD card |
358 | u8 PointList_SaveToFile(u8 place) |
358 | u8 PointList_SaveToFile(u8 place, s8 * name) |
359 | { |
359 | { |
360 | File_t *fp; |
360 | File_t *fp; |
361 | s8 wpline[LINE_MAX], retval = 0; |
361 | s8 wpline[LINE_MAX], retval = 0; |
Line 377... | Line 377... | ||
377 | UART1_PutString("ERROR: Creating waypoint file!\r\n"); |
377 | UART1_PutString("ERROR: Creating waypoint file!\r\n"); |
378 | return(retval); |
378 | return(retval); |
379 | } |
379 | } |
380 | // Create general section and key entries |
380 | // Create general section and key entries |
381 | fputs_("[General]\r\n", fp); |
381 | fputs_("[General]\r\n", fp); |
- | 382 | sprintf(wpline, "Name=%s\r\n", name); |
|
- | 383 | fputs_(wpline, fp); |
|
382 | sprintf(wpline, "FileVersion=%d\r\n", WP_FILE_VERSION_COMPATIBLE); |
384 | sprintf(wpline, "FileVersion=%d\r\n", WP_FILE_VERSION_COMPATIBLE); |
383 | fputs_(wpline, fp); |
385 | fputs_(wpline, fp); |
384 | sprintf(wpline, "NumberOfWaypoints=%d\r\n", PointCount); |
386 | sprintf(wpline, "NumberOfWaypoints=%d\r\n", PointCount); |
385 | fputs_(wpline, fp); |
387 | fputs_(wpline, fp); |
386 | // dump all points if existent |
388 | // dump all points if existent |