mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 16:23:46 +08:00
Revert "params: safe and efficient async writing parameters (#25912)"
This reverts commit 780669c33fea1b2a14a0bd6e2eac82c9b8893aa5. old-commit-hash: ec479322d3d8d789290bee68919d14b040481d53
This commit is contained in:
@@ -669,10 +669,9 @@ void Localizer::configure_gnss_source(const LocalizerGnssSource &source) {
|
||||
}
|
||||
|
||||
int Localizer::locationd_thread() {
|
||||
Params params;
|
||||
LocalizerGnssSource source;
|
||||
const char* gps_location_socket;
|
||||
if (params.getBool("UbloxAvailable")) {
|
||||
if (Params().getBool("UbloxAvailable")) {
|
||||
source = LocalizerGnssSource::UBLOX;
|
||||
gps_location_socket = "gpsLocationExternal";
|
||||
} else {
|
||||
@@ -729,7 +728,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.putNonBlocking("LastGPSPosition", lastGPSPosJSON);
|
||||
|
||||
std::thread([] (const std::string gpsjson) {
|
||||
Params().put("LastGPSPosition", gpsjson);
|
||||
}, lastGPSPosJSON).detach();
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user