diff --git a/selfdrive/ui/qt/maps/map_settings.cc b/selfdrive/ui/qt/maps/map_settings.cc index c8a9627a35..bb00c9900a 100644 --- a/selfdrive/ui/qt/maps/map_settings.cc +++ b/selfdrive/ui/qt/maps/map_settings.cc @@ -299,6 +299,9 @@ NavigationRequest::NavigationRequest(QObject *parent) : QObject(parent) { QObject::connect(repeater, &RequestRepeater::requestDone, this, &NavigationRequest::parseLocationsResponse); } { + auto param_watcher = new ParamWatcher(this); + QObject::connect(param_watcher, &ParamWatcher::paramChanged, this, &NavigationRequest::nextDestinationUpdated); + // Destination set while offline QString url = CommaApi::BASE_URL + "/v1/navigation/" + *dongle_id + "/next"; HttpRequest *deleter = new HttpRequest(this); @@ -315,8 +318,8 @@ NavigationRequest::NavigationRequest(QObject *parent) : QObject(parent) { deleter->sendRequest(url, HttpRequest::Method::DELETE); } - // Update UI (athena can set destination at any time) - emit nextDestinationUpdated(resp, success); + // athena can set destination at any time + param_watcher->addParam("NavDestination"); }); } } diff --git a/selfdrive/ui/qt/maps/map_settings.h b/selfdrive/ui/qt/maps/map_settings.h index afa4f36052..94ded68bb7 100644 --- a/selfdrive/ui/qt/maps/map_settings.h +++ b/selfdrive/ui/qt/maps/map_settings.h @@ -29,7 +29,7 @@ public: signals: void locationsUpdated(const QJsonArray &locations); - void nextDestinationUpdated(const QString &response, bool success); + void nextDestinationUpdated(); private: NavigationRequest(QObject *parent);