Skip to content

Commit 021042e

Browse files
committed
config: add quick_reconnect option
1 parent f3a5527 commit 021042e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ pub struct AppConfig {
8484
pub hexdump_level: HexdumpLevel,
8585
pub disable_console_debug: bool,
8686
pub legacy: bool,
87+
pub quick_reconnect: bool,
8788
pub connect: BluetoothAddressList,
8889
pub logfile: PathBuf,
8990
pub stats_interval: u16,
@@ -224,6 +225,7 @@ impl Default for AppConfig {
224225
hexdump_level: HexdumpLevel::Disabled,
225226
disable_console_debug: false,
226227
legacy: true,
228+
quick_reconnect: false,
227229
connect: BluetoothAddressList::default(),
228230
logfile: "/var/log/aa-proxy-rs.log".into(),
229231
stats_interval: 0,
@@ -315,6 +317,7 @@ impl AppConfig {
315317
doc["hexdump_level"] = value(format!("{:?}", self.hexdump_level));
316318
doc["disable_console_debug"] = value(self.disable_console_debug);
317319
doc["legacy"] = value(self.legacy);
320+
doc["quick_reconnect"] = value(self.quick_reconnect);
318321
doc["connect"] = value(self.connect.to_string());
319322
doc["logfile"] = value(self.logfile.display().to_string());
320323
doc["stats_interval"] = value(self.stats_interval as i64);

static/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
"typ": "boolean",
6161
"description": "Enable legacy USB mode (some HeadUnits/cars needs this enabled for compatibility)"
6262
},
63+
"quick_reconnect": {
64+
"typ": "boolean",
65+
"description": "EXPERIMENTAL: Maintain persistent Bluetooth connection to enable faster reconnection with MD"
66+
},
6367
"wired": {
6468
"typ": "string",
6569
"description": "Enable wired USB connection to phone (VID:PID should be specified, zero is wildcard and can be used for single or both fields)\nyou can obtain it e.g. using `lsusb` after connecting phone,\nand then use e.g. \"18d1:0\" which will handle specified phone vendor ID (Google Pixel in this example)"

0 commit comments

Comments
 (0)