|
|
@ -299,6 +299,9 @@ NavigationRequest::NavigationRequest(QObject *parent) : QObject(parent) { |
|
|
|
QObject::connect(repeater, &RequestRepeater::requestDone, this, &NavigationRequest::parseLocationsResponse); |
|
|
|
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
|
|
|
|
// Destination set while offline
|
|
|
|
QString url = CommaApi::BASE_URL + "/v1/navigation/" + *dongle_id + "/next"; |
|
|
|
QString url = CommaApi::BASE_URL + "/v1/navigation/" + *dongle_id + "/next"; |
|
|
|
HttpRequest *deleter = new HttpRequest(this); |
|
|
|
HttpRequest *deleter = new HttpRequest(this); |
|
|
@ -315,8 +318,8 @@ NavigationRequest::NavigationRequest(QObject *parent) : QObject(parent) { |
|
|
|
deleter->sendRequest(url, HttpRequest::Method::DELETE); |
|
|
|
deleter->sendRequest(url, HttpRequest::Method::DELETE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Update UI (athena can set destination at any time)
|
|
|
|
// athena can set destination at any time
|
|
|
|
emit nextDestinationUpdated(resp, success); |
|
|
|
param_watcher->addParam("NavDestination"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|