feat(train): a recording runs an interval plan, with cues and Lap (ADR 0030, D42)

The plan chosen on the Record sheet goes to the recording service spelled
out: each step's end, its target (zones as the heart rates they span for
the profile's highest rate) and its spoken line in the app's language.
PlanRunner.kt moves through the steps on the moving time and distance,
counts a timed step's last seconds down and cues off target from a 30 s
window; PlanCues.kt gives a tone, a vibration and the voice, ducking
music. The file's plan and step lines bring it back, and the recording
screen shows the step, what is left of it, its target, the next step and
Lap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-28 22:59:48 +01:00
commit d9f98449a8
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -28,9 +28,13 @@ class FakeRecorderPlatform({
String? strap,
String? rower,
String? loop,
Map<String, Object?>? plan,
})
>[];
/// How often Lap was tapped.
int laps = 0;
/// The straps and the rowers nearby, seen as soon as a scan starts, and
/// whether Bluetooth is on.
List<FoundDevice> nearby = [];
@ -77,6 +81,7 @@ class FakeRecorderPlatform({
String? strap,
String? rower,
String? loop,
Map<String, Object?>? plan,
}) async {
started.add((
path: path,
@ -85,6 +90,7 @@ class FakeRecorderPlatform({
strap: strap,
rower: rower,
loop: loop,
plan: plan,
));
notices.add(notice);
_file = File(path)
@ -106,6 +112,9 @@ class FakeRecorderPlatform({
write('resume @ manual');
}
@override
Future<void> lap() async => laps++;
@override
Future<void> stop() async {
write('end @');