Skip to content

Commit

Permalink
Fix for lteConnectionPath not set on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
andiradulescu committed Nov 23, 2023
1 parent 7dabb04 commit f578bc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions selfdrive/ui/qt/network/wifi_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ WifiManager::WifiManager(QObject *parent) : QObject(parent) {
tethering_ssid += "-" + dongle_id->left(4);
}

adapter = getAdapter();
adapter = getAdapter(NM_DEVICE_TYPE_WIFI);
if (!adapter.isEmpty()) {
qWarning() << "WifiManager setup";
setup();
Expand All @@ -61,6 +61,8 @@ WifiManager::WifiManager(QObject *parent) : QObject(parent) {
}

timer.callOnTimeout(this, &WifiManager::requestScan);

initConnections();
}

void WifiManager::setup() {
Expand All @@ -74,7 +76,6 @@ void WifiManager::setup() {
raw_adapter_state = call<uint>(adapter, NM_DBUS_INTERFACE_PROPERTIES, "Get", NM_DBUS_INTERFACE_DEVICE, "State");
activeAp = call<QDBusObjectPath>(adapter, NM_DBUS_INTERFACE_PROPERTIES, "Get", NM_DBUS_INTERFACE_DEVICE_WIRELESS, "ActiveAccessPoint").path();
qWarning() << "WifiManager::setup";
initConnections();
requestScan();
}

Expand Down
2 changes: 1 addition & 1 deletion selfdrive/ui/qt/network/wifi_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class WifiManager : public QObject {
QString activeAp;
QDBusObjectPath lteConnectionPath;

QString getAdapter(const uint = NM_DEVICE_TYPE_WIFI);
QString getAdapter(const uint adapter_type);
uint getAdapterType(const QDBusObjectPath &path);
QString getIp4Address();
void deactivateConnectionBySsid(const QString &ssid);
Expand Down

0 comments on commit f578bc1

Please sign in to comment.