1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-30 11:40:23 +02:00

Rename driver for Medisana since both BS440 and BS444 are supported

This commit is contained in:
Erik Johansson
2018-07-03 23:39:17 +02:00
parent 795b657702
commit 7e7d923810
2 changed files with 3 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ public class BluetoothFactory {
} }
// BS444 || BS440 // BS444 || BS440
if (deviceName.startsWith("013197") || deviceName.startsWith("0202B6")) { if (deviceName.startsWith("013197") || deviceName.startsWith("0202B6")) {
return new BluetoothMedisanaBS444(context); return new BluetoothMedisanaBS44x(context);
} }
if (deviceName.startsWith("SWAN") || name.equals("icomon".toLowerCase(Locale.US))) { if (deviceName.startsWith("SWAN") || name.equals("icomon".toLowerCase(Locale.US))) {
return new BluetoothMGB(context); return new BluetoothMGB(context);

View File

@@ -25,7 +25,7 @@ import com.health.openscale.core.utils.Converters;
import java.util.Date; import java.util.Date;
import java.util.UUID; import java.util.UUID;
public class BluetoothMedisanaBS444 extends BluetoothCommunication { public class BluetoothMedisanaBS44x extends BluetoothCommunication {
private final UUID WEIGHT_MEASUREMENT_SERVICE = UUID.fromString("000078b2-0000-1000-8000-00805f9b34fb"); private final UUID WEIGHT_MEASUREMENT_SERVICE = UUID.fromString("000078b2-0000-1000-8000-00805f9b34fb");
private final UUID WEIGHT_MEASUREMENT_CHARACTERISTIC = UUID.fromString("00008a21-0000-1000-8000-00805f9b34fb"); // indication, read-only private final UUID WEIGHT_MEASUREMENT_CHARACTERISTIC = UUID.fromString("00008a21-0000-1000-8000-00805f9b34fb"); // indication, read-only
private final UUID FEATURE_MEASUREMENT_CHARACTERISTIC = UUID.fromString("00008a22-0000-1000-8000-00805f9b34fb"); // indication, read-only private final UUID FEATURE_MEASUREMENT_CHARACTERISTIC = UUID.fromString("00008a22-0000-1000-8000-00805f9b34fb"); // indication, read-only
@@ -39,7 +39,7 @@ public class BluetoothMedisanaBS444 extends BluetoothCommunication {
// Scale time is in seconds since 2010-01-01 // Scale time is in seconds since 2010-01-01
private static final long SCALE_UNIX_TIMESTAMP_OFFSET = 1262304000; private static final long SCALE_UNIX_TIMESTAMP_OFFSET = 1262304000;
public BluetoothMedisanaBS444(Context context) { public BluetoothMedisanaBS44x(Context context) {
super(context); super(context);
btScaleMeasurement = new ScaleMeasurement(); btScaleMeasurement = new ScaleMeasurement();
} }