1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-24 15:43:46 +02:00

Pebble 2: make gatt client only mode available to users

This commit is contained in:
Andreas Shimokawa 2018-05-11 14:23:41 +02:00
parent cdf6039d4c
commit 9e2558beac
3 changed files with 9 additions and 0 deletions

View File

@ -66,6 +66,8 @@ public class PebbleLESupport {
mMTULimit = Math.max(mMTULimit, 20);
mMTULimit = Math.min(mMTULimit, 512);
clientOnly = GBApplication.getPrefs().getBoolean("pebble_gatt_clientonly", false);
if (!clientOnly) {
mPebbleGATTServer = new PebbleGATTServer(this, context, mBtDevice);
}

View File

@ -170,6 +170,8 @@
<string name="pref_summary_pebble_forcele">Use experimental Pebble LE support for all Pebbles, instead of BT classic. This requires pairing to non LE first, and then Pebble LE</string>
<string name="pref_title_pebble_mtu_limit">Pebble 2/LE GATT MTU limit</string>
<string name="pref_summary_pebble_mtu_limit">If your Pebble 2/Pebble LE does not work as expected, try this setting to limit the MTU (valid range 20512)</string>
<string name="pref_title_pebble_gatt_clientonly">GATT client only</string>
<string name="pref_summary_pebble_gatt_clientonly">This is for Pebble 2 only and experimental, try this if you have connectivity problems</string>
<string name="pref_title_pebble_enable_applogs">Enable watch App logging</string>
<string name="pref_summary_pebble_enable_applogs">Will cause logs from watch apps to be logged by Gadgetbridge (requires reconnect)</string>
<string name="pref_title_pebble_always_ack_pebblekit">Prematurely ACK PebbleKit</string>

View File

@ -437,6 +437,11 @@
android:defaultValue="512"
android:title="@string/pref_title_pebble_mtu_limit"
android:summary="@string/pref_summary_pebble_mtu_limit" />
<CheckBoxPreference
android:defaultValue="false"
android:key="pebble_gatt_clientonly"
android:title="@string/pref_title_pebble_gatt_clientonly"
android:summary="@string/pref_summary_pebble_gatt_clientonly" />
<CheckBoxPreference
android:defaultValue="false"
android:key="pebble_enable_applogs"