diff options
-rwxr-xr-x | repgoal.hs | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -101,19 +101,18 @@ drawUI :: () -> [Widget ()] | |||
101 | drawUI () = [a] | 101 | drawUI () = [a] |
102 | where | 102 | where |
103 | a = hCenter $ renderTable $ table $ | 103 | a = hCenter $ renderTable $ table $ |
104 | [str "Exercise", str "Achieved Reps", str "Computed 1RM", str "Weight", str "Goal Reps", str "Goal 1RM"] : map toRow exercises | 104 | map str ["Exercise", "Achieved Reps", "Computed 1RM", "Goal Reps", "Goal+1"] : map toRow exercises |
105 | toRow x@ExerciseTarget{..} = | 105 | toRow x@ExerciseTarget{..} = |
106 | let ExerciseStats{..} = stats | 106 | let ExerciseStats{..} = stats |
107 | repGoal = computeRepGoal x | 107 | repGoal = computeRepGoal x |
108 | oneRepMaxGoal = computeOneRepMax $ ExerciseStats exerciseName repGoal targetWeight | 108 | goalTo1RM g = computeOneRepMax $ ExerciseStats exerciseName g targetWeight |
109 | in | 109 | in |
110 | [ | 110 | [ |
111 | txt exerciseName, | 111 | txt exerciseName, |
112 | str $ printf "%d @ %s" achievedReps (showRational achievedWeight), | 112 | str $ printf "%d @ %s" achievedReps (showRational achievedWeight), |
113 | str $ showRational $ computeOneRepMax stats, | 113 | str $ showRational $ computeOneRepMax stats, |
114 | str $ showRational targetWeight, | 114 | str $ printf "%d @ %s ≈ 1 @ %s" (repGoal) (showRational targetWeight) (showRational (goalTo1RM repGoal)), |
115 | str $ show repGoal, | 115 | str $ printf "%d @ %s ≈ 1 @ %s" (repGoal + 1) (showRational targetWeight) (showRational (goalTo1RM $ repGoal + 1)) |
116 | str $ showRational oneRepMaxGoal | ||
117 | ] | 116 | ] |
118 | where | 117 | where |
119 | 118 | ||