1
0
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:
Erik Johansson
2018-09-27 22:14:53 +02:00
parent acd1ee14c8
commit 18de951771
3 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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) {

View File

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