From e6cdc67451d1d3ea431990556b9a60c0b0538d41 Mon Sep 17 00:00:00 2001 From: Sylvain Bettinelli Date: Sun, 20 Sep 2026 15:54:35 +0000 Subject: [PATCH] =?UTF-8?q?Revert=20"iOS=2027=20compat:=20VMA=20test=20?= =?UTF-8?q?=E2=80=94=20rendre=20startKmh=20=C3=A9ditable=20au=20lieu=20de?= =?UTF-8?q?=20fig=C3=A9=20=C3=A0=208"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 263a8f694fa0e00ec3e6efe0939fffd7157a481a. --- ios/App/CoachWatch/VmaTestView.swift | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/ios/App/CoachWatch/VmaTestView.swift b/ios/App/CoachWatch/VmaTestView.swift index cd63bbf..75b1a71 100644 --- a/ios/App/CoachWatch/VmaTestView.swift +++ b/ios/App/CoachWatch/VmaTestView.swift @@ -30,11 +30,9 @@ struct VmaTestView: View { @StateObject private var workout = WorkoutManager.shared @Environment(\.dismiss) private var dismiss - // Paramètres du protocole à paliers. - // ⚠️ startKmh n'a plus de défaut : l'utilisateur doit saisir la vitesse - // de sa bande sonore réelle. Le web a retiré le défaut 8 km/h le 2026-08-25 - // parce qu'il ne correspond à aucun protocole publié (VAMEVAL/Léger 1988 - // démarrent à 8,5) et sous-estime la VMA de 0,5 km/h. + // Paramètres du protocole à paliers. Départ volontairement bas : la marche + // rapide est à 6 km/h, un départ à 8 laisse une vraie marge de montée. + private let startKmh = 8.0 private let stepKmh = 0.5 private let stageSeconds = 60.0 @@ -42,8 +40,6 @@ struct VmaTestView: View { @State private var started = false @State private var finished = false @State private var stageIndex = 0 // 0 = premier palier en cours - @State private var startKmh = 0.0 // Saisi par l'utilisateur, jamais un défaut - @State private var startKmhText = "" // Liaison TextField @State private var maxHr = 0.0 @State private var sent = false @State private var sendError: String? @@ -91,24 +87,9 @@ struct VmaTestView: View { .font(.caption2) .foregroundStyle(.secondary) - // Champ de saisie vitesse de départ, visible seulement pour le protocole à paliers - if proto == .stages { - VStack(alignment: .leading, spacing: 6) { - Text("Vitesse de départ (km/h)") - .font(.caption2) - .foregroundStyle(.secondary) - TextField("ex. 8,5", text: $startKmhText) - .keyboardType(.decimalPad) - .onChange(of: startKmhText) { newValue in - startKmh = Double(newValue) ?? 0.0 - } - } - } - Button("Démarrer") { start() } .buttonStyle(.borderedProminent) .tint(.orange) - .disabled(proto == .stages && startKmh <= 0) } .padding(.horizontal, 4) }