1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-09-02 12:54:10 +02:00
This commit is contained in:
OliE
2017-11-26 07:59:14 +01:00
26 changed files with 727 additions and 735 deletions

View File

@@ -74,8 +74,6 @@ public class BluetoothMGB extends BluetoothCommunication {
} }
public BluetoothMGB(Context context) { public BluetoothMGB(Context context) {
super(context); super(context);
} }
@@ -196,8 +194,7 @@ public class BluetoothMGB extends BluetoothCommunication {
popInt(); //unknown =00 popInt(); //unknown =00
popInt(); //unknown =00 popInt(); //unknown =00
}else } else if (hdr_1 == 0x01 && hdr_2 == 0x00) {
if( hdr_1 == 0x01 && hdr_2 == 0x00 ){
measurement.setMuscle(popFloat()); measurement.setMuscle(popFloat());
popFloat(); //BMR popFloat(); //BMR

View File

@@ -173,26 +173,22 @@ public class UserSettingsActivity extends Activity {
{ {
boolean validate = true; boolean validate = true;
if( txtUserName.getText().toString().length() == 0 ) if (txtUserName.getText().toString().length() == 0) {
{
txtUserName.setError(getResources().getString(R.string.error_user_name_required)); txtUserName.setError(getResources().getString(R.string.error_user_name_required));
validate = false; validate = false;
} }
if( txtBodyHeight.getText().toString().length() == 0 ) if (txtBodyHeight.getText().toString().length() == 0) {
{
txtBodyHeight.setError(getResources().getString(R.string.error_body_height_required)); txtBodyHeight.setError(getResources().getString(R.string.error_body_height_required));
validate = false; validate = false;
} }
if( txtInitialWeight.getText().toString().length() == 0 ) if (txtInitialWeight.getText().toString().length() == 0) {
{
txtInitialWeight.setError(getResources().getString(R.string.error_initial_weight_required)); txtInitialWeight.setError(getResources().getString(R.string.error_initial_weight_required));
validate = false; validate = false;
} }
if( txtGoalWeight.getText().toString().length() == 0 ) if (txtGoalWeight.getText().toString().length() == 0) {
{
txtGoalWeight.setError(getResources().getString(R.string.error_goal_weight_required)); txtGoalWeight.setError(getResources().getString(R.string.error_goal_weight_required));
validate = false; validate = false;
} }

View File

@@ -258,8 +258,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
pointIndexScaleDataList = new ArrayList<>(); pointIndexScaleDataList = new ArrayList<>();
for(ScaleData scaleEntry: scaleDataList) for (ScaleData scaleEntry: scaleDataList) {
{
calDB.setTime(scaleEntry.getDateTime()); calDB.setTime(scaleEntry.getDateTime());
if (addPointValue(valuesWeight, calDB.get(field), scaleEntry.getConvertedWeight(openScale.getSelectedScaleUser().scale_unit))) { if (addPointValue(valuesWeight, calDB.get(field), scaleEntry.getConvertedWeight(openScale.getSelectedScaleUser().scale_unit))) {