mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #1681 from turannul/pr/bt-py-bridge
Increase bluetooth pair timeout
This commit is contained in:
@@ -52,7 +52,7 @@ Singleton {
|
||||
}
|
||||
|
||||
// Tunables for CLI pairing/connect flow
|
||||
property int pairWaitSeconds: 20
|
||||
property int pairWaitSeconds: 45
|
||||
property int connectAttempts: 5
|
||||
property int connectRetryIntervalMs: 2000
|
||||
|
||||
@@ -540,12 +540,14 @@ Singleton {
|
||||
var chunk = data;
|
||||
if (chunk.indexOf("[PIN_REQ]") !== -1) {
|
||||
root.pinRequired = true;
|
||||
Logger.i("Bluetooth", "PIN required for pairing");
|
||||
Logger.d("Bluetooth", "PIN required for pairing");
|
||||
ToastService.showNotice(I18n.tr("common.bluetooth"), I18n.tr("bluetooth.panel.pin-required"), "lock");
|
||||
}
|
||||
}
|
||||
}
|
||||
stderr: StdioCollector {}
|
||||
stderr: SplitParser {
|
||||
onRead: data => Logger.d("Bluetooth", data)
|
||||
}
|
||||
onExited: {
|
||||
root.pinRequired = false;
|
||||
Logger.i("Bluetooth", "Pairing process exited.");
|
||||
@@ -586,7 +588,7 @@ Singleton {
|
||||
const totalPauseMs = (pairWait * 1000) + (attempts * intervalSec * 1000) + 2000;
|
||||
_pauseDiscoveryFor(totalPauseMs);
|
||||
|
||||
const scriptPath = Quickshell.shellDir + "/Scripts/python/src/network/bluetooth-connect.py";
|
||||
const scriptPath = Quickshell.shellDir + "/Scripts/python/src/network/bluetooth-pair.py";
|
||||
|
||||
pairingProcess.command = ["python3", scriptPath, String(addr), String(pairWait), String(attempts), String(intervalSec)];
|
||||
pairingProcess.running = true;
|
||||
|
||||
Reference in New Issue
Block a user