mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-17 14:10:54 +02:00
cleaned up.
This commit is contained in:
@@ -52,6 +52,7 @@ public class BluetoothBroadcastScale extends BluetoothCommunication {
|
|||||||
|
|
||||||
public BluetoothBroadcastScale(Context context)
|
public BluetoothBroadcastScale(Context context)
|
||||||
{
|
{
|
||||||
|
super(context);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.central = new BluetoothCentralManager(context, bluetoothCentralCallback, new Handler(Looper.getMainLooper()));
|
this.central = new BluetoothCentralManager(context, bluetoothCentralCallback, new Handler(Looper.getMainLooper()));
|
||||||
}
|
}
|
||||||
|
@@ -80,10 +80,6 @@ public abstract class BluetoothCommunication {
|
|||||||
this.central = new BluetoothCentralManager(context, bluetoothCentralCallback, new Handler(Looper.getMainLooper()));
|
this.central = new BluetoothCentralManager(context, bluetoothCentralCallback, new Handler(Looper.getMainLooper()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BluetoothCommunication() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean needReConnect() {
|
protected boolean needReConnect() {
|
||||||
if (callbackBtHandler == null) {
|
if (callbackBtHandler == null) {
|
||||||
return true;
|
return true;
|
||||||
|
@@ -139,7 +139,7 @@ public class BluetoothFactory {
|
|||||||
if (deviceName.equals("Yoda1")){
|
if (deviceName.equals("Yoda1")){
|
||||||
return new BluetoothYoda1Scale(context);
|
return new BluetoothYoda1Scale(context);
|
||||||
}
|
}
|
||||||
if (deviceName.equals("AAA002")){
|
if (deviceName.equals("AAA002") || deviceName.equals("AAA007")){
|
||||||
return new BluetoothBroadcastScale(context);
|
return new BluetoothBroadcastScale(context);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user