WT1.1.0+24 CustomerExerciseDevice fix, Badges fix

This commit is contained in:
bossanyit
2020-11-29 17:34:21 +01:00
parent b59db7c9db
commit cdc750614a
21 changed files with 522 additions and 549 deletions
+14 -11
View File
@@ -335,31 +335,34 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> {
if (this.bmi == 0) {
getBMI();
}
//bmi = 15;
final double distortionWidth = mediaWidth / baseWidth;
final double distortionHeight = mediaHeight / baseHeight;
print("W m " + mediaWidth.toString() + " b" + baseWidth.toString() + " d: " + distortionWidth.toString());
print("H m " + mediaHeight.toString() + " b" + baseHeight.toString() + " d: " + distortionHeight.toString());
this.bmiAngle = (bmi * 90 / 25) - 90;
if (bmi < 18.5) {
goalBMI = 19;
this.bmiTop = 99;
this.bmiLeft = 72;
this.bmiTop = 99 * distortionHeight;
this.bmiLeft = 77 * distortionWidth;
bmiAngle = -62;
} else if (bmi < 25 && 18.5 < bmi) {
goalBMI = 27;
this.bmiTop = 46;
this.bmiLeft = 130;
this.bmiTop = 48 * distortionHeight;
this.bmiLeft = 130 * distortionWidth;
bmiAngle = -23;
} else if (bmi < 30 && 24.9 < bmi) {
goalBMI = 24;
this.bmiTop = 38.0;
this.bmiLeft = 186.0;
this.bmiTop = 40.0 * distortionHeight;
this.bmiLeft = 184.0 * distortionWidth;
bmiAngle = 7.2;
} else if (bmi < 34.9 && 29.9 < bmi) {
goalBMI = 29;
bmiTop = 48;
bmiLeft = 211;
bmiTop = 48 * distortionHeight;
bmiLeft = 211 * distortionWidth;
} else if (bmi > 35) {
goalBMI = 34;
bmiTop = 94;
bmiLeft = 260;
bmiTop = 94 * distortionHeight;
bmiLeft = 260 * distortionWidth;
bmiAngle = 59;
}