mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-16 21:54:05 +02:00
Fix senssun excessive toasts (#850)
This commit is contained in:
@@ -115,7 +115,7 @@ public class BluetoothSenssun extends BluetoothCommunication {
|
|||||||
switch(data[5]) {
|
switch(data[5]) {
|
||||||
case (byte)0xAA:
|
case (byte)0xAA:
|
||||||
case (byte)0xA0:
|
case (byte)0xA0:
|
||||||
if (values > 1) {
|
if (weightStabilized) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!stepMessageDisplayed) {
|
if (!stepMessageDisplayed) {
|
||||||
@@ -127,13 +127,9 @@ public class BluetoothSenssun extends BluetoothCommunication {
|
|||||||
Timber.d("the byte is %d stable is %s", (data[5] & 0xff), weightStabilized ? "true": "false");
|
Timber.d("the byte is %d stable is %s", (data[5] & 0xff), weightStabilized ? "true": "false");
|
||||||
lastWeight = ((data[1] & 0xff) << 8) | (data[2] & 0xff);
|
lastWeight = ((data[1] & 0xff) << 8) | (data[2] & 0xff);
|
||||||
|
|
||||||
if (lastWeight > 0) {
|
|
||||||
sendMessage(R.string.info_measuring, lastWeight / 10.0f);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (weightStabilized) {
|
if (weightStabilized) {
|
||||||
values |= 1;
|
values |= 1;
|
||||||
|
sendMessage(R.string.info_measuring, lastWeight / 10.0f);
|
||||||
synchroniseUser();
|
synchroniseUser();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user