params put in locationd async (#20713)

* params put in locationd async

* remove reference in thread call
pull/20733/head
Joost Wooning 2021-04-20 16:02:57 +02:00 committed by GitHub
parent 34328ba305
commit ed8acfa284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -365,7 +365,10 @@ int Localizer::locationd_thread() {
VectorXd posGeo = this->get_position_geodetic();
std::string lastGPSPosJSON = util::string_format(
"{\"latitude\": %.15f, \"longitude\": %.15f, \"altitude\": %.15f}", posGeo(0), posGeo(1), posGeo(2));
params.put("LastGPSPosition", lastGPSPosJSON); // TODO write async
std::thread([&params] (const std::string gpsjson) {
params.put("LastGPSPosition", gpsjson);
}, lastGPSPosJSON).detach();
}
}
}