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: C12832_lcd CMPS03 FatFileSystemCpp GPS MMA7660 mbed
Fork of CompleteMbed by
Diff: main.cpp
- Revision:
- 2:64ff9d8b2aa1
- Parent:
- 1:cdfeb3e3d25d
- Child:
- 3:05d2d090b8b0
diff -r cdfeb3e3d25d -r 64ff9d8b2aa1 main.cpp --- a/main.cpp Wed May 07 09:58:21 2014 +0000 +++ b/main.cpp Wed May 07 10:07:45 2014 +0000 @@ -70,11 +70,11 @@ // GPS code if(gps.sample()) { - fprintf(GPSFile, "\n%f %f\n", gps.latitude, gps.longitude); + fprintf(GPSFile, "\n%f %f\r\n", gps.latitude, gps.longitude); } else { - pc.printf("\nOh Dear! No lock :(\n") && fprintf(GPSFile, "\n0.000 0.000\n"); + pc.printf("\nOh Dear! No lock :(\n") && fprintf(GPSFile, "\n0.000 0.000\r\n"); } // Accelerometer code @@ -82,18 +82,18 @@ ax=MMA.x(); // read accelerometer values ay=MMA.y(); az=MMA.z(); - fprintf(AccelFile, "%f %f %f\n",ax,ay,az); + fprintf(AccelFile, "%f %f %f\r\n",ax,ay,az); // Compass code bearing = (compass.readBearing()/10 - refPoint/10); if(bearing < 0.0) { bearing = 360 + bearing; - fprintf(CompassFile, "Bearing : %f\n\n", bearing); + fprintf(CompassFile, "Bearing : %f\r\n", bearing); } else { - fprintf(CompassFile, "Bearing : %f\n\n", bearing); + fprintf(CompassFile, "Bearing : %f\r\n" << endl, bearing); } i = i + 1; }