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: SequenceController/SequenceController.cpp
- Revision:
- 100:a21bb2e4493d
- Parent:
- 99:9d0849f5fcd7
--- a/SequenceController/SequenceController.cpp Fri Jun 28 13:59:11 2019 +0000
+++ b/SequenceController/SequenceController.cpp Fri Jun 28 15:04:49 2019 +0000
@@ -310,9 +310,9 @@
/* max DEPTH TO cycle to */
- if ((signed int) randomstring.find("max_d") != -1) {
+ if ((signed int) randomstring.find("max_depth") != -1) {
- int depth_pos = randomstring.find("max_d") + 6; //11 in example literally "depth="
+ int depth_pos = randomstring.find("max_depth") + 10; //11 in example literally "depth="
char depth_array[256] = {0}; //clear memory
int depth_counter = 0;
for (int i = depth_pos; i < randomstring.length(); i++) {
@@ -326,15 +326,15 @@
}
}
loadStruct.max_depth = atof(depth_array);
- sprintf(bux2, "\n\r process legfile: key=max_d val=%g process(legstring)count=%d \n", atof(depth_array), callcount);
+ sprintf(bux2, "\n\r process legfile: key=max_depth val=%g process(legstring)count=%d \n", atof(depth_array), callcount);
mbedLogger().appendDiagFile(bux2,3);
}
- if ((signed int) randomstring.find("min_d") != -1) {
+ if ((signed int) randomstring.find("min_depth") != -1) {
- int depth_pos = randomstring.find("min_d") + 6; //11 in example literally "depth="
+ int depth_pos = randomstring.find("min_depth") + 10; //11 in example literally "depth="
char depth_array[256] = {0}; //clear memory
int depth_counter = 0;
for (int i = depth_pos; i < randomstring.length(); i++) {
@@ -348,13 +348,13 @@
}
}
loadStruct.min_depth = atof(depth_array);
- sprintf(bux2, "\n\r process legfile: key=min_d val=%g \n", atof(depth_array));
+ sprintf(bux2, "\n\r process legfile: key=min_depth val=%g \n", atof(depth_array));
mbedLogger().appendDiagFile(bux2,3);
}
/* Buoyancy Engine Offset on Dive */
- if ((signed int) randomstring.find("BCE_dive") != -1) {
+ /*if ((signed int) randomstring.find("BCE_dive") != -1) {
int BCE_dive_offset_pos = randomstring.find("BCE_dive") + 9 ; //11 in example literally "BCE_dive_offset="
char BCE_dive_offset_array[256] = {0}; //clear memory
@@ -372,12 +372,12 @@
loadStruct.BCE_dive_offset = atof(BCE_dive_offset_array);
sprintf(bux2, "\n\r process legfile: key=BCE_dive val=%g \n", atof(BCE_dive_offset_array));
mbedLogger().appendDiagFile(bux2,3);
- }
+ }*/
/* Buoyancy Engine Offset on Dive */
/* Battery Mass Mover Offset on Dive */
- if ((signed int) randomstring.find("BMM_dive") != -1) {
+ /*if ((signed int) randomstring.find("BMM_dive") != -1) {
int BMM_dive_offset_pos = randomstring.find("BMM_dive") + 9 ; //11 in example literally "BMM_dive_offset="
char BMM_dive_offset_array[256] = {0}; //clear memory
@@ -395,12 +395,12 @@
loadStruct.BMM_dive_offset = atof(BMM_dive_offset_array);
sprintf(bux2, "\n\r process legfile: key=BMM_dive val=%g \n", atof(BMM_dive_offset_array));
mbedLogger().appendDiagFile(bux2,3);
- }
+ }*/
/* Battery Mass Mover Offset on Dive */
/* Buoyancy Engine Offset on Rise */
- if ((signed int) randomstring.find("BCE_rise") != -1) {
+ /*if ((signed int) randomstring.find("BCE_rise") != -1) {
int BCE_rise_offset_pos = randomstring.find("BCE_rise") + 9 ; //11 in example literally "BCE_rise_offset="
char BCE_rise_offset_array[256] = {0}; //clear memory
@@ -418,12 +418,12 @@
loadStruct.BCE_rise_offset = atof(BCE_rise_offset_array);
sprintf(bux2, "\n\r process legfile: key=BCE_rise val=%g \n", atof(BCE_rise_offset_array));
mbedLogger().appendDiagFile(bux2,3);
- }
+ }*/
/* Buoyancy Engine Offset on Rise */
/* Battery Mass Mover Offset on Rise */
- if ((signed int) randomstring.find("BMM_rise") != -1) {
+ /*if ((signed int) randomstring.find("BMM_rise") != -1) {
int BMM_rise_offset_pos = randomstring.find("BMM_rise") + 9 ; //11 in example literally "BMM_rise_offset="
char BMM_rise_offset_array[256] = {0}; //clear memory
@@ -441,28 +441,28 @@
loadStruct.BMM_rise_offset = atof(BMM_rise_offset_array);
sprintf(bux2, "\n\r process legfile: key=BMM_rise val=%g \n", atof(BMM_rise_offset_array));
mbedLogger().appendDiagFile(bux2,3);
- }
+ }*/
/* Battery Mass Mover Offset on Rise */
- if ((signed int) randomstring.find("head") != -1) {
+ if ((signed int) randomstring.find("heading") != -1) {
- int heading_pos = randomstring.find("head") + 5; //11 in example literally "depth="
- char heading_array[256] = {0}; //clear memory
- int heading_counter = 0;
- for (int i = heading_pos; i < randomstring.length(); i++) {
+ int depth_pos = randomstring.find("heading") + 8; //11 in example literally "depth="
+ char depth_array[256] = {0}; //clear memory
+ int depth_counter = 0;
+ for (int i = depth_pos; i < randomstring.length(); i++) {
if (cstr[i] == ',')
break;
else if (cstr[i] == ';')
break;
else {
- heading_array[heading_counter] = cstr[i];
- heading_counter++;
+ depth_array[depth_counter] = cstr[i];
+ depth_counter++;
}
}
- loadStruct.heading = atof(heading_array);
- sprintf(bux2, "\n\r process legfile: key=head val=%g \n", atof(heading_array));
+ loadStruct.heading = atof(depth_array);
+ sprintf(bux2, "\n\r process legfile: key=heading val=%g \n", atof(depth_array));
mbedLogger().appendDiagFile(bux2,3);
}