WT1.1.7+4 bugfix 1RM calculation for control
This commit is contained in:
parent
f45671458e
commit
9beef937b5
@ -388,7 +388,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@ -531,7 +531,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@ -566,7 +566,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
|
@ -20,6 +20,8 @@ class ExerciseControlBloc extends Bloc<ExerciseControlEvent, ExerciseControlStat
|
||||
double unitQuantity;
|
||||
double quantity;
|
||||
double origQuantity;
|
||||
double oneRepQuantity;
|
||||
double oneRepUnitQuantity;
|
||||
|
||||
double firstQuantity; // quantity of the first test
|
||||
double firstUnitQuantity; // unit quantity of the first test
|
||||
@ -29,6 +31,8 @@ class ExerciseControlBloc extends Bloc<ExerciseControlEvent, ExerciseControlStat
|
||||
@override
|
||||
ExerciseControlBloc({this.exerciseRepository, this.readonly, this.percentToCalculate, @required this.timerBloc})
|
||||
: super(ExerciseControlInitial()) {
|
||||
oneRepQuantity = exerciseRepository.exercise.quantity;
|
||||
oneRepUnitQuantity = exerciseRepository.exercise.unitQuantity;
|
||||
initialRM = this.calculate1RM(percent75: false);
|
||||
unitQuantity = this.calculate1RM(percent75: true).roundToDouble();
|
||||
quantity = percentToCalculate == 0.75 ? 12 : 30;
|
||||
@ -103,18 +107,25 @@ class ExerciseControlBloc extends Bloc<ExerciseControlEvent, ExerciseControlStat
|
||||
|
||||
double rmWendler = weight * repeat * 0.0333 + weight;
|
||||
double rmOconner = weight * (1 + repeat / 40);
|
||||
print("Weight: $weight repeat: $repeat, $rmWendler, Oconner: $rmOconner");
|
||||
double average = (rmWendler + rmOconner) / 2;
|
||||
|
||||
return percent75 ? average * this.percentToCalculate : average;
|
||||
}
|
||||
|
||||
double calculateQuantityByUnitQuantity() {
|
||||
final double rmWendler = initialRM;
|
||||
final double rmOconner = initialRM;
|
||||
final double weight = exerciseRepository.exercise.unitQuantity;
|
||||
double weight = oneRepUnitQuantity;
|
||||
double repeat = oneRepQuantity;
|
||||
final double rmWendler = weight * repeat * 0.0333 + weight;
|
||||
final double rmOconner = weight * (1 + repeat / 40);
|
||||
print("Weight: $weight oneRepQuantity: $repeat, $rmWendler, Oconner: $rmOconner");
|
||||
|
||||
weight = exerciseRepository.exercise.unitQuantity;
|
||||
repeat = exerciseRepository.exercise.quantity;
|
||||
|
||||
final double repeatWendler = (rmWendler - weight) / 0.0333 / weight;
|
||||
final double repeatOconner = (rmOconner / weight - 1) * 40;
|
||||
print("Weight: $weight repeatWendler: $repeatWendler repeat Oconner: $repeatOconner");
|
||||
return unitQuantity > 100 ? (repeatOconner + repeatWendler) / 2 : repeatWendler;
|
||||
print("Initial 1RM: $initialRM Weight: $weight repeatWendler: $repeatWendler repeat Oconner: $repeatOconner");
|
||||
return (repeatOconner + repeatWendler) / 2;
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,6 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
await userRepository.addUserApple();
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn));
|
||||
await saveCustomer();
|
||||
Track().track(TrackingEvent.registration);
|
||||
Track().track(TrackingEvent.registration, eventValue: "Apple");
|
||||
|
||||
yield LoginSuccess();
|
||||
|
@ -32,6 +32,7 @@ import 'package:aitrainer_app/view/registration.dart';
|
||||
import 'package:aitrainer_app/view/reset_password.dart';
|
||||
import 'package:aitrainer_app/view/sales_page.dart';
|
||||
import 'package:aitrainer_app/view/settings.dart';
|
||||
import 'package:aitrainer_app/view/test_set_edit.dart';
|
||||
import 'package:aitrainer_app/widgets/home.dart';
|
||||
import 'package:firebase_analytics/firebase_analytics.dart';
|
||||
import 'package:firebase_analytics/observer.dart';
|
||||
@ -226,6 +227,7 @@ class WorkoutTestApp extends StatelessWidget {
|
||||
'mydevelopmentSizesPage': (context) => SizesDevelopmentPage(),
|
||||
'evaluationPage': (context) => EvaluationPage(),
|
||||
'salesPage': (context) => SalesPage(),
|
||||
'testSetEdit': (context) => TestSetEdit(),
|
||||
},
|
||||
initialRoute: 'home',
|
||||
title: 'WorkoutTest',
|
||||
|
@ -162,7 +162,7 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
|
||||
return SizeWidget(exerciseBloc: exerciseBloc);
|
||||
}
|
||||
|
||||
final String exerciseTask = exerciseBloc.setExerciseTask(init: true);
|
||||
final String exerciseTask = exerciseBloc.setExerciseTask();
|
||||
|
||||
return Form(
|
||||
child: Scaffold(
|
||||
|
20
lib/view/test_set_edit.dart
Normal file
20
lib/view/test_set_edit.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:aitrainer_app/widgets/app_bar.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TestSetEdit extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarNav(depth: 1),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('asset/image/WT_black_background.jpg'),
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
),
|
||||
child: Text("H")));
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.1.7+57
|
||||
version: 1.1.8+58
|
||||
|
||||
environment:
|
||||
sdk: ">=2.7.0 <3.0.0"
|
||||
|
Loading…
Reference in New Issue
Block a user