1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-24 17:23:03 +02:00

Support for Beurer BF915 (based on Sanitas SBF72). (#911)

Co-authored-by: Daniel <d.gies@gmx.de.de>
This commit is contained in:
Giesd
2023-01-20 14:45:09 +01:00
committed by GitHub
parent a59a96151e
commit bc50365661
2 changed files with 5 additions and 4 deletions

View File

@@ -127,8 +127,8 @@ public class BluetoothFactory {
if (deviceName.equals("SBF77") || deviceName.equals("SBF76") || deviceName.equals("BF950")) {
return new BluetoothBeurerBF950(context, deviceName);
}
if (deviceName.equals("SBF72")) {
return new BluetoothSanitasSBF72(context);
if (deviceName.equals("SBF72") || deviceName.equals("BF915")) {
return new BluetoothSanitasSBF72(context, deviceName);
}
if (deviceName.equals("Weight Scale")){
return new BluetoothSinocare(context);

View File

@@ -32,7 +32,7 @@ import timber.log.Timber;
import static com.welie.blessed.BluetoothBytesParser.FORMAT_UINT8;
public class BluetoothSanitasSBF72 extends BluetoothStandardWeightProfile {
private String deviceName = "SBF72";
private String deviceName;
private static final UUID SERVICE_SBF72_CUSTOM = BluetoothGattUuid.fromShortCode(0xffff);
@@ -42,8 +42,9 @@ public class BluetoothSanitasSBF72 extends BluetoothStandardWeightProfile {
private static final UUID CHARACTERISTIC_REFER_WEIGHT_BF = BluetoothGattUuid.fromShortCode(0x000b);
private static final UUID CHARACTERISTIC_TAKE_MEASUREMENT = BluetoothGattUuid.fromShortCode(0x0006);
public BluetoothSanitasSBF72(Context context) {
public BluetoothSanitasSBF72(Context context, String name) {
super(context);
deviceName = name;
}
@Override