Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: RouteCalculation.cpp
- Revision:
- 6:a1fd0f1374e6
- Parent:
- 5:695c5531f65e
- Child:
- 12:811b1364679e
- Child:
- 14:0caa7b93af7a
--- a/RouteCalculation.cpp Sun Apr 29 11:48:33 2018 +0000 +++ b/RouteCalculation.cpp Mon Apr 30 13:53:09 2018 +0000 @@ -6,6 +6,7 @@ #include "Mapping.h" #include "AutoDrive.h" #include "RouteCalculation.h" +#include "SDFileSystem.h" // Routenberechnung // rückgabe 2d-Array route @@ -48,6 +49,7 @@ //char **route; char *route = (char *)malloc(sizeof(char)); // Speicher muss alloziert werden!! + SDFileSystem sd(PB_5, PB_4, PB_3, PB_10, "sd"); //mosi, miso, sclk, cs // Pos in route[X,0] @@ -77,6 +79,7 @@ char *str; //SD-Karte lesen + sd.mount(); printf("Reading from SD card..."); FILE *fp = fopen("/sd/map.csv", "r"); if (fp != NULL) { @@ -95,6 +98,7 @@ else { printf("Read-process failed!\nNo file available!\n\r"); } + sd.unmount(); //-----------------------------------------------------------------------