diff --git a/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc b/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc index d9b5a3953f718c732933231ab8d6e37cdbdf45f2..956ec1abab2fba1f16b638da5de8b15d784c731e 100644 --- a/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc +++ b/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc @@ -900,11 +900,12 @@ void MACScheduler::_updatePlannedList() for ( ; idx2 >= 0; idx2--) { Json::Value subtask = upcomingSubTasks[idx2]; - // get subtask_id from url. I know, ugly, needs to be in json itself. - vector<string> tmp; + // get subtask_id + string id(subtask["id"].asString()); + int subtask_id = stoi(id); + + // get url string url(subtask["url"].asString()); - boost::split(tmp, url, [](char c){return c == '/';}); - int subtask_id = stoi(tmp[tmp.size()-2]); // construct name and timings info for observation string obsName(observationName(subtask_id)); @@ -1068,11 +1069,12 @@ void MACScheduler::_updateActiveList() // continue; // } - // get subtask_id from url. I know, ugly, needs to be in json itself. - vector<string> tmp; + // get subtask_id + string id(subtask["id"].asString()); + int subtask_id = stoi(id); + + // get url string url(subtask["url"].asString()); - boost::split(tmp, url, [](char c){return c == '/';}); - int subtask_id = stoi(tmp[tmp.size()-2]); // construct name info for observation string obsName(observationName(subtask_id)); @@ -1161,11 +1163,13 @@ void MACScheduler::_updateFinishedList() // continue; // } - // get subtask_id from url. I know, ugly, needs to be in json itself. - vector<string> tmp; + + // get subtask_id + string id(subtask["id"].asString()); + int subtask_id = stoi(id); + + // get url string url(subtask["url"].asString()); - boost::split(tmp, url, [](char c){return c == '/';}); - int subtask_id = stoi(tmp[tmp.size()-2]); // construct name info for observation string obsName(observationName(subtask_id));