1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-17 14:10:54 +02:00

cleaned up.

This commit is contained in:
oliexdev
2024-05-20 10:53:31 +02:00
parent b98c143216
commit 115b4a177f
3 changed files with 2 additions and 5 deletions

View File

@@ -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()));
} }

View File

@@ -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;

View File

@@ -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;