mirror of
https://github.com/oliexdev/openScale.git
synced 2025-09-03 05:12:42 +02:00
Set access level to protected for all next*Cmd
This commit is contained in:
@@ -146,7 +146,7 @@ public class BluetoothBeurerSanitas extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
|
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -245,7 +245,7 @@ public class BluetoothBeurerSanitas extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
|
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -274,7 +274,7 @@ public class BluetoothBeurerSanitas extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
// Force disconnect
|
// Force disconnect
|
||||||
|
@@ -126,7 +126,7 @@ public abstract class BluetoothCommunication {
|
|||||||
* @param stateNr the current step number
|
* @param stateNr the current step number
|
||||||
* @return false if no next step is available otherwise true
|
* @return false if no next step is available otherwise true
|
||||||
*/
|
*/
|
||||||
abstract boolean nextInitCmd(int stateNr);
|
abstract protected boolean nextInitCmd(int stateNr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State machine for the normal/command process of the Bluetooth device.
|
* State machine for the normal/command process of the Bluetooth device.
|
||||||
@@ -136,7 +136,7 @@ public abstract class BluetoothCommunication {
|
|||||||
* @param stateNr the current step number
|
* @param stateNr the current step number
|
||||||
* @return false if no next step is available otherwise true
|
* @return false if no next step is available otherwise true
|
||||||
*/
|
*/
|
||||||
abstract boolean nextBluetoothCmd(int stateNr);
|
abstract protected boolean nextBluetoothCmd(int stateNr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the next command number of the current state.
|
* Set the next command number of the current state.
|
||||||
@@ -165,7 +165,7 @@ public abstract class BluetoothCommunication {
|
|||||||
* @param stateNr the current step number
|
* @param stateNr the current step number
|
||||||
* @return false if no next step is available otherwise true
|
* @return false if no next step is available otherwise true
|
||||||
*/
|
*/
|
||||||
abstract boolean nextCleanUpCmd(int stateNr);
|
abstract protected boolean nextCleanUpCmd(int stateNr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method is triggered if a Bluetooth data is read from a device.
|
* Method is triggered if a Bluetooth data is read from a device.
|
||||||
|
@@ -47,17 +47,17 @@ public class BluetoothCustomOpenScale extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ public class BluetoothDigooDGSO38H extends BluetoothCommunication {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
//Tell device to send us weight measurements
|
//Tell device to send us weight measurements
|
||||||
@@ -68,7 +68,7 @@ public class BluetoothDigooDGSO38H extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@@ -76,7 +76,7 @@ public class BluetoothDigooDGSO38H extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
|
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
default:
|
default:
|
||||||
|
@@ -46,12 +46,12 @@ public class BluetoothExcelvanCF369BLE extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
final ScaleUser selectedUser = OpenScale.getInstance(context).getSelectedScaleUser();
|
final ScaleUser selectedUser = OpenScale.getInstance(context).getSelectedScaleUser();
|
||||||
@@ -87,7 +87,7 @@ public class BluetoothExcelvanCF369BLE extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ public class BluetoothExingtechY1 extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, WEIGHT_MEASUREMENT_CHARACTERISTIC, WEIGHT_MEASUREMENT_CONFIG);
|
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, WEIGHT_MEASUREMENT_CHARACTERISTIC, WEIGHT_MEASUREMENT_CONFIG);
|
||||||
@@ -69,12 +69,12 @@ public class BluetoothExingtechY1 extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ public class BluetoothHesley extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, WEIGHT_MEASUREMENT_CHARACTERISTIC, WEIGHT_MEASUREMENT_CONFIG);
|
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, WEIGHT_MEASUREMENT_CHARACTERISTIC, WEIGHT_MEASUREMENT_CONFIG);
|
||||||
@@ -58,12 +58,12 @@ public class BluetoothHesley extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -54,19 +54,19 @@ public class BluetoothIhealthHS3 extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
Log.w("openscale","ihealthHS3 - nextInitCmd - returning false");
|
Log.w("openscale","ihealthHS3 - nextInitCmd - returning false");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
Log.w("openscale","ihealthHS3 - nextBluetoothCmd - returning false");
|
Log.w("openscale","ihealthHS3 - nextBluetoothCmd - returning false");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
Log.w("openscale","ihealthHS3 - nextCleanUpCmd - returning false");
|
Log.w("openscale","ihealthHS3 - nextCleanUpCmd - returning false");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -84,7 +84,7 @@ public class BluetoothMGB extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
setNotificationOn(uuid_service, uuid_char_ctrl, uuid_desc_ctrl);
|
setNotificationOn(uuid_service, uuid_char_ctrl, uuid_desc_ctrl);
|
||||||
@@ -125,13 +125,13 @@ public class BluetoothMGB extends BluetoothCommunication {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -46,12 +46,12 @@ public class BluetoothMedisanaBS444 extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
// set indication on for feature characteristic
|
// set indication on for feature characteristic
|
||||||
@@ -89,7 +89,7 @@ public class BluetoothMedisanaBS444 extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -98,7 +98,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
// read device time
|
// read device time
|
||||||
@@ -136,7 +136,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
// set notification on for weight measurement history
|
// set notification on for weight measurement history
|
||||||
@@ -173,7 +173,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
|
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@@ -85,7 +85,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
// set scale units
|
// set scale units
|
||||||
@@ -119,7 +119,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
// configure scale to get only last measurements
|
// configure scale to get only last measurements
|
||||||
@@ -148,7 +148,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
|
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@@ -45,7 +45,7 @@ public class BluetoothOneByone extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
setIndicationOn(WEIGHT_MEASUREMENT_SERVICE_BODY_COMPOSITION, WEIGHT_MEASUREMENT_CHARACTERISTIC_BODY_COMPOSITION, WEIGHT_MEASUREMENT_CONFIG);
|
setIndicationOn(WEIGHT_MEASUREMENT_SERVICE_BODY_COMPOSITION, WEIGHT_MEASUREMENT_CHARACTERISTIC_BODY_COMPOSITION, WEIGHT_MEASUREMENT_CONFIG);
|
||||||
@@ -69,12 +69,12 @@ public class BluetoothOneByone extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ public class BluetoothYunmaiSE_Mini extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextInitCmd(int stateNr) {
|
protected boolean nextInitCmd(int stateNr) {
|
||||||
switch (stateNr) {
|
switch (stateNr) {
|
||||||
case 0:
|
case 0:
|
||||||
byte[] userId = Converters.toUnsignedInt16Be(getUniqueNumber());
|
byte[] userId = Converters.toUnsignedInt16Be(getUniqueNumber());
|
||||||
@@ -94,12 +94,12 @@ public class BluetoothYunmaiSE_Mini extends BluetoothCommunication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextBluetoothCmd(int stateNr) {
|
protected boolean nextBluetoothCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean nextCleanUpCmd(int stateNr) {
|
protected boolean nextCleanUpCmd(int stateNr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user