mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-24 17:23:03 +02:00
Fix some analyze issues
This commit is contained in:
@@ -244,7 +244,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
|
||||
|
||||
addScaleData(scaleBtData);
|
||||
} else {
|
||||
Timber.e("Invalid Mi scale weight year " + year);
|
||||
Timber.e("Invalid Mi scale weight year %d", year);
|
||||
}
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
|
@@ -64,7 +64,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
||||
final byte[] data = gattCharacteristic.getValue();
|
||||
|
||||
if (data != null && data.length > 0) {
|
||||
Timber.d("DataChange hex data: "+ byteInHex(data));
|
||||
Timber.d("DataChange hex data: %s", byteInHex(data));
|
||||
|
||||
// Stop command from mi scale received
|
||||
if (data[0] == 0x03) {
|
||||
@@ -215,7 +215,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
||||
|
||||
addScaleData(scaleBtData);
|
||||
} else {
|
||||
Timber.e("Invalid Mi scale weight year " + year);
|
||||
Timber.e("Invalid Mi scale weight year %d", year);
|
||||
}
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
|
@@ -328,7 +328,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
||||
regressLineOrder = Integer.parseInt(prefs.getString("regressionLineOrder", "1"));
|
||||
} catch (NumberFormatException e) {
|
||||
Toast.makeText(getContext(), getString(R.string.error_value_required) + ":" + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
prefs.edit().putString("regressionLineOrder", "1").commit();
|
||||
prefs.edit().putString("regressionLineOrder", "1").apply();
|
||||
}
|
||||
|
||||
PolynomialFitter polyFitter = new PolynomialFitter(Math.min(regressLineOrder, 100));
|
||||
|
Reference in New Issue
Block a user