Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvanwelie committed Jan 16, 2021
1 parent bfd008b commit 294c813
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void onServicesDiscovered(@NotNull BluetoothPeripheral peripheral) {
// Request a higher MTU, iOS always asks for 185
peripheral.requestMtu(185);

// Try to get a PHY_LE_2M connection
// Try to get a PHY_LE_2M connection (requires Bluetooth 5)
peripheral.setPreferredPhy(PhyType.PHY_LE_2M, PhyType.PHY_LE_2M, PhyOptions.PHY_OPTION_NO_PREFERRED);

// Request a new connection priority
Expand Down
4 changes: 2 additions & 2 deletions blessed/src/main/java/com/welie/blessed/PhyType.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public enum PhyType {
PHY_LE_1M(1,1),
PHY_LE_2M (2,2),
PHY_LE_CODED(3, 4),
UNKNOWN_STATUS_CODE(-1,-1);
UNKNOWN_PHY_TYPE(-1,-1);

PhyType(final int value, final int mask) {
this.value = value;
Expand All @@ -28,6 +28,6 @@ public static PhyType fromValue(int value) {
if (type.getValue() == value)
return type;
}
return UNKNOWN_STATUS_CODE;
return UNKNOWN_PHY_TYPE;
}
}

0 comments on commit 294c813

Please sign in to comment.