Skip to content

Commit ee88171

Browse files
Make phone-first the default strategy for now (#119)
1 parent f5965d9 commit ee88171

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Set the connection strategy to use
2-
# 0 - Dongle mode (default). Waits for both dongle and headunit bluetooth connections and then starts the wifi and usb connections.
3-
# 1 - Phone first. Waits for the phone bluetooth and wifi to connect first, and then starts the usb connection.
2+
# 0 - Dongle mode. Waits for both dongle and headunit bluetooth connections and then starts the wifi and usb connections.
3+
# 1 - Phone first (default). Waits for the phone bluetooth and wifi to connect first, and then starts the usb connection.
44
# 2 - Usb first. Waits for the usb to connect first, and then starts the bluetooth and wifi connection with phone.
5-
AAWG_CONNECTION_STRATEGY=0
5+
AAWG_CONNECTION_STRATEGY=1

aa_wireless_dongle/package/aawg/src/common.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,20 @@ WifiInfo Config::getWifiInfo() {
5151

5252
ConnectionStrategy Config::getConnectionStrategy() {
5353
if (!connectionStrategy.has_value()) {
54-
const int32_t connectionStrategyEnv = getenv("AAWG_CONNECTION_STRATEGY", 0);
54+
const int32_t connectionStrategyEnv = getenv("AAWG_CONNECTION_STRATEGY", 1);
5555

5656
switch (connectionStrategyEnv) {
57+
case 0:
58+
connectionStrategy = ConnectionStrategy::DONGLE_MODE;
59+
break;
5760
case 1:
5861
connectionStrategy = ConnectionStrategy::PHONE_FIRST;
5962
break;
6063
case 2:
6164
connectionStrategy = ConnectionStrategy::USB_FIRST;
6265
break;
6366
default:
64-
connectionStrategy = ConnectionStrategy::DONGLE_MODE;
67+
connectionStrategy = ConnectionStrategy::PHONE_FIRST;
6568
break;
6669
}
6770
}

0 commit comments

Comments
 (0)