1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-22 08:13:43 +02:00

deviceName() -> driverName()

This commit is contained in:
Erik Johansson
2018-04-14 20:33:18 +02:00
parent 1bdec6a164
commit 20411a69e8
16 changed files with 18 additions and 19 deletions

View File

@@ -120,7 +120,7 @@ public class BluetoothBeurerBF700_800 extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Beurer BF700/710/800 / Runtastic Libra"; return "Beurer BF700/710/800 / Runtastic Libra";
} }

View File

@@ -114,11 +114,11 @@ public abstract class BluetoothCommunication {
} }
/** /**
* Return the Bluetooth device name * Return the Bluetooth driver name
* *
* @return a string in a human readable name * @return a string in a human readable name
*/ */
abstract public String deviceName(); abstract public String driverName();
/** /**
* State machine for the initialization process of the Bluetooth device. * State machine for the initialization process of the Bluetooth device.

View File

@@ -42,7 +42,7 @@ public class BluetoothCustomOpenScale extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Custom Open Scale"; return "Custom Open Scale";
} }

View File

@@ -38,7 +38,7 @@ public class BluetoothDigooDGSO38H extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Digoo DG-SO38H"; return "Digoo DG-SO38H";
} }

View File

@@ -41,7 +41,7 @@ public class BluetoothExcelvanCF369BLE extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Excelvan CF369BLE"; return "Excelvan CF369BLE";
} }

View File

@@ -38,7 +38,7 @@ public class BluetoothExingtechY1 extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Exingtech Y1"; return "Exingtech Y1";
} }

View File

@@ -36,7 +36,7 @@ public class BluetoothHesley extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Hesley scale"; return "Hesley scale";
} }

View File

@@ -49,8 +49,7 @@ public class BluetoothIhealthHS3 extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
Log.w("openscale","ihealthHS3 - DeviceName - returning iHealth HS33FA4A");
return "iHealth HS33FA4A"; return "iHealth HS33FA4A";
} }

View File

@@ -79,7 +79,7 @@ public class BluetoothMGB extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "SWAN"; return "SWAN";
} }

View File

@@ -41,7 +41,7 @@ public class BluetoothMedisanaBS444 extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Medisana BS444"; return "Medisana BS444";
} }

View File

@@ -49,7 +49,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Xiaomi Mi Scale v1"; return "Xiaomi Mi Scale v1";
} }

View File

@@ -53,7 +53,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Xiaomi Mi Scale v2"; return "Xiaomi Mi Scale v2";
} }

View File

@@ -40,7 +40,7 @@ public class BluetoothOneByone extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "1byone scale"; return "1byone scale";
} }

View File

@@ -114,7 +114,7 @@ public class BluetoothSanitasSbf70 extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return "Sanitas SBF70/SilverCrest SBF75"; return "Sanitas SBF70/SilverCrest SBF75";
} }

View File

@@ -47,7 +47,7 @@ public class BluetoothYunmaiSE_Mini extends BluetoothCommunication {
} }
@Override @Override
public String deviceName() { public String driverName() {
return isMini ? "Yunmai Mini" : "Yunmai SE"; return isMini ? "Yunmai Mini" : "Yunmai SE";
} }

View File

@@ -97,7 +97,7 @@ public class BluetoothPreferences extends PreferenceFragment {
} }
}); });
// Do old school bluetooth discovery first and BLE scan afterwards // Do classic bluetooth discovery first and BLE scan afterwards
btAdapter.startDiscovery(); btAdapter.startDiscovery();
} }
@@ -158,7 +158,7 @@ public class BluetoothPreferences extends PreferenceFragment {
prefBtDevice.setOnPreferenceClickListener(new onClickListenerDeviceSelect()); prefBtDevice.setOnPreferenceClickListener(new onClickListenerDeviceSelect());
prefBtDevice.setKey(device.getAddress()); prefBtDevice.setKey(device.getAddress());
prefBtDevice.setIcon(R.drawable.ic_bluetooth_connection_lost); prefBtDevice.setIcon(R.drawable.ic_bluetooth_connection_lost);
prefBtDevice.setSummary(btDevice.deviceName()); prefBtDevice.setSummary(btDevice.driverName());
int tintColor = new EditText(getActivity()).getCurrentTextColor(); int tintColor = new EditText(getActivity()).getCurrentTextColor();
prefBtDevice.getIcon().setColorFilter(tintColor, PorterDuff.Mode.SRC_IN); prefBtDevice.getIcon().setColorFilter(tintColor, PorterDuff.Mode.SRC_IN);