WT1.1.23 fix changes
This commit is contained in:
@@ -166,8 +166,9 @@ class TrainingPlanRepository {
|
||||
}
|
||||
|
||||
Exercise? lastExercise1RM;
|
||||
DateTime dt = DateTime.now().subtract(Duration(days: 30));
|
||||
Cache().getExercises()!.forEach((exercise) {
|
||||
if (exercise.exercisePlanDetailId == 0 && exercise.exerciseTypeId == exerciseTypeId) {
|
||||
if (exercise.exerciseTypeId == exerciseTypeId && exercise.dateAdd!.compareTo(dt) >= 0) {
|
||||
detail.weight = weight;
|
||||
lastExercise1RM = exercise;
|
||||
}
|
||||
@@ -179,13 +180,13 @@ class TrainingPlanRepository {
|
||||
return detail;
|
||||
}
|
||||
|
||||
//double oneRepMax = Common.calculate1RM(lastExercise1RM!.unitQuantity!, lastExercise1RM!.quantity!);
|
||||
//print("Exercise $exerciseTypeId - 1RM : $oneRepMax");
|
||||
//weight = oneRepMax * Common.get1RMPercent(detail.repeats!);
|
||||
//print("Exercise $exerciseTypeId - weight : $weight");
|
||||
double oneRepMax = Common.calculate1RM(lastExercise1RM!.unitQuantity!, lastExercise1RM!.quantity!);
|
||||
print("Exercise $exerciseTypeId - 1RM : $oneRepMax");
|
||||
weight = oneRepMax * Common.get1RMPercent(detail.repeats!);
|
||||
print("Exercise $exerciseTypeId - weight : $weight");
|
||||
//weight = Common.roundWeight(weight);
|
||||
//detail.weight = Common.calculateWeigthByChangedQuantity(detail.weight!, detail.repeats!.toDouble(), lastExercise1RM!.quantity!);
|
||||
weight = lastExercise1RM!.unitQuantity! * detail.repeats! / lastExercise1RM!.quantity!;
|
||||
//weight = lastExercise1RM!.unitQuantity! * detail.repeats! / lastExercise1RM!.quantity!;
|
||||
weight = Common.roundWeight(weight);
|
||||
print("Recaluclated weight ${detail.weight} - repeat: ${detail.repeats}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user