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 PulseSensor2 SCP1000 mbed-rtos 4DGL-uLCD-SE LSM9DS1_Library_cal PinDetect FatFileSystemCpp GP-20U7
Revision 43:81f314c92d9f, committed 2020-04-28
- Comitter:
- dyu2021
- Date:
- Tue Apr 28 20:00:56 2020 +0000
- Parent:
- 42:30d1dfc5adaf
- Commit message:
- Changed serial_USB to output all lines of prev_text, not hard set to 7
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Apr 28 18:06:35 2020 +0000
+++ b/main.cpp Tue Apr 28 20:00:56 2020 +0000
@@ -512,8 +512,8 @@
if(fp == NULL) {
error("Could not open file for write\n");
}
- for (int i = 0; i<7; i++) {
- fscanf(fp,"%s\t%d\t%d\t%f\t%f\n\r", &buf_date[0], &buf_steps[0], &buf_flights[0], &buf_calories[0], &buf_distance[0]);
+ while (fscanf(fp,"%s\t%d\t%d\t%f\t%f\n\r", &buf_date[0], &buf_steps[0], &buf_flights[0], &buf_calories[0], &buf_distance[0]) != EOF) {
+ //fscanf(fp,"%s\t%d\t%d\t%f\t%f\n\r", &buf_date[0], &buf_steps[0], &buf_flights[0], &buf_calories[0], &buf_distance[0]);
sprintf(buffer,"%s\t%d\t%d\t%f\t%f\n", buf_date, buf_steps[0], buf_flights[0], buf_calories[0], buf_distance[0]);
pc.printf("%s",buffer);
}

