1
0
Fork 0

Add option to use lower write size for phones with potentially iffy Bluetooth stacks (fix #)1834

master
Gordon Williams 2022-05-16 14:32:35 +01:00
parent 0a36095dc1
commit 7f9bf3a758
2 changed files with 15 additions and 0 deletions

View File

@ -147,6 +147,10 @@
<input type="checkbox" id="settings-settime"> <input type="checkbox" id="settings-settime">
<i class="form-icon"></i> Always update time when we connect <i class="form-icon"></i> Always update time when we connect
</label> </label>
<label class="form-switch">
<input type="checkbox" id="settings-ble-compat">
<i class="form-icon"></i> Bluetooth Compatibility mode (limit to 20 byte writes)
</label>
<div class="form-group"> <div class="form-group">
<select class="form-select form-inline" id="settings-lang" style="width: 10em"> <select class="form-select form-inline" id="settings-lang" style="width: 10em">
<option value="">None (English)</option> <option value="">None (English)</option>

View File

@ -194,6 +194,17 @@ window.addEventListener('load', (event) => {
}); });
}); });
// BLE Compatibility
var selectLang = document.getElementById("settings-ble-compat");
if (SETTINGS.bleCompat!==undefined)
Puck.increaseMTU = !SETTINGS.bleCompat;
selectLang.addEventListener("change",event=>{
console.log("BLE compatibility mode "+(event.target.checked?"on":"off"));
SETTINGS.bleCompat = event.target.checked;
Puck.increaseMTU = !SETTINGS.bleCompat;
saveSettings();
});
// Load language list // Load language list
httpGet("lang/index.json").then(languagesJSON=>{ httpGet("lang/index.json").then(languagesJSON=>{
var languages; var languages;