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 MODSERIAL FATFileSystem
Diff: ConfigFileIO/ConfigFileIO.cpp
- Revision:
- 79:3688c3a0d7f4
- Parent:
- 76:c802e1da4179
- Child:
- 82:0981b9ada820
diff -r 17abcd1f08bf -r 3688c3a0d7f4 ConfigFileIO/ConfigFileIO.cpp --- a/ConfigFileIO/ConfigFileIO.cpp Fri Aug 17 16:52:00 2018 +0000 +++ b/ConfigFileIO/ConfigFileIO.cpp Tue Oct 23 20:35:16 2018 +0000 @@ -28,8 +28,11 @@ sprintf(string_zeroCounts, "%d", batt_zeroOffset); write_Batt_txt.setValue("\n#string pot parameters\nzeroCounts", string_zeroCounts); - //hard-coded values - write_Batt_txt.setValue("PistonTravelLimit", "73.0"); + //modified this from hard-coded values to set to whatever is in the file on startup + char string_batt_travel_limit[128]; + sprintf(string_batt_travel_limit, "%f", batt().getTravelLimit()); + write_Batt_txt.setValue("PistonTravelLimit", string_batt_travel_limit); + write_Batt_txt.setValue("slope", "0.12176"); char string_filter_freq[128]; @@ -115,8 +118,11 @@ sprintf(string_zeroCounts, "%d", bce_zeroOffset); write_BCE_txt.setValue("\n#string pot parameters\nzeroCounts", string_zeroCounts); - //hard-coded values - write_BCE_txt.setValue("PistonTravelLimit", "320.0"); + //modified this from hard-coded values to set to whatever is in the file on startup + char string_bce_travel_limit[128]; + sprintf(string_bce_travel_limit, "%f", batt().getTravelLimit()); + write_BCE_txt.setValue("PistonTravelLimit", string_bce_travel_limit); + write_BCE_txt.setValue("slope", "0.12176"); char string_filter_freq[128];