Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add audible speed advisories #628

Merged
merged 48 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
74f3085
change min speed to 7 km/h
May 6, 2024
add1d8b
put instruction under sg
May 6, 2024
f61dae4
line length
May 6, 2024
27de52e
some improvements
May 7, 2024
de306a4
adapt routing distances
May 13, 2024
bdb9fd8
Create separate audio service
adeveloper-wq Jun 27, 2024
a887eb3
Finish refactoring (reroute and button)
adeveloper-wq Jun 28, 2024
3c1f9f7
Add some more comments
adeveloper-wq Jun 28, 2024
1a8b8ef
Properly reset audio instructions service
adeveloper-wq Jun 28, 2024
b21b5a0
Merge gb-audio-changes
PaulPickhardt Jun 28, 2024
c50715e
Merge dev
PaulPickhardt Jul 26, 2024
004bb6b
Add setting for using audio routing instructions seperately
PaulPickhardt Jul 26, 2024
ca36659
Start fixing the wait for green audio information
PaulPickhardt Jul 26, 2024
e934ec5
Merge branch 'dev' into refactor-audio-instructions-code
PaulPickhardt Aug 19, 2024
18f43d8
Fix play audio when waiting for green
PaulPickhardt Aug 19, 2024
80a49ab
First speed advisory instructions only implementation
PaulPickhardt Aug 19, 2024
56c0751
Fix audio instruction min distance
PaulPickhardt Aug 19, 2024
2e9c0af
Place audio speed advisory option in main settings
PaulPickhardt Aug 20, 2024
16bb00a
Fix calc second next phase
PaulPickhardt Aug 20, 2024
b1fe390
Enhance audio speed advisory instruction generation and start adding …
PaulPickhardt Aug 20, 2024
d369e7a
Add test data for audio text generation
PaulPickhardt Aug 21, 2024
d6e75bc
Add new text generation algo with test cases
PaulPickhardt Aug 21, 2024
2ccab18
Merge branch 'dev' into refactor-audio-instructions-code
PaulPickhardt Aug 21, 2024
22138df
Round distance to sg up to 25m accuracy
PaulPickhardt Aug 21, 2024
add2c56
Add audio service to enable hearing music and speed advisory instruct…
PaulPickhardt Aug 27, 2024
bfffb06
Fix speech rate
PaulPickhardt Aug 27, 2024
2d4085c
Add prediction not valid anymore and adjust speechrate values
PaulPickhardt Aug 28, 2024
6627c09
Refactor code
PaulPickhardt Aug 28, 2024
8e00b4a
Fix countdown exact second
PaulPickhardt Aug 28, 2024
d32a27e
Fix unnecessary creation of instructions
PaulPickhardt Aug 28, 2024
3407267
Add audio speech rate to main settings
PaulPickhardt Aug 29, 2024
476e611
Add speed advisory to tracking data
PaulPickhardt Aug 29, 2024
3771889
Add speed advisory green in 5 to track
PaulPickhardt Aug 29, 2024
cfa94e5
Add check for division with 0
PaulPickhardt Aug 29, 2024
43eb6bd
Fix green in 5 set active
PaulPickhardt Aug 29, 2024
05b7bb5
merge dev
PaulPickhardt Sep 6, 2024
6d01a09
Refactor code, removing routing instruction generation
PaulPickhardt Sep 6, 2024
09361f3
Refactor speed advisory instruction trigger range
PaulPickhardt Sep 9, 2024
15b5196
Refactor comments
PaulPickhardt Sep 9, 2024
d25b13c
Minor fix audio init and settings exception
PaulPickhardt Sep 9, 2024
de898b1
Refactor function description
PaulPickhardt Sep 9, 2024
8fc8858
Refactor function description
PaulPickhardt Sep 9, 2024
be09413
Fix last speed values and add drescription for default value
PaulPickhardt Sep 9, 2024
e764ffd
Use average instead of median
PaulPickhardt Sep 9, 2024
25ad79a
Remove unused routing instruction code
PaulPickhardt Sep 9, 2024
0741c25
move speech rate to normal settings
PaulPickhardt Sep 9, 2024
113c6f0
Add toast and hint that audio is deactivated when the user selects a …
adeveloper-wq Sep 9, 2024
62e358a
Fix prediction invalid when user selects sg
PaulPickhardt Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
PODS:
- audio_session (0.0.1):
- Flutter
- battery_plus (1.0.0):
- Flutter
- connectivity_plus (0.0.1):
Expand Down Expand Up @@ -122,6 +124,7 @@ PODS:
- Flutter

DEPENDENCIES:
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- battery_plus (from `.symlinks/plugins/battery_plus/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
Expand Down Expand Up @@ -163,6 +166,8 @@ SPEC REPOS:
- Turf

EXTERNAL SOURCES:
audio_session:
:path: ".symlinks/plugins/audio_session/ios"
battery_plus:
:path: ".symlinks/plugins/battery_plus/ios"
connectivity_plus:
Expand Down Expand Up @@ -209,6 +214,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/wakelock_plus/ios"

SPEC CHECKSUMS:
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
battery_plus: 1ff2e16ba75af2a78387f65476057a390b47885e
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
Expand Down
15 changes: 15 additions & 0 deletions lib/ride/models/audio.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
enum SpeechRate {
fast,
normal,
}

extension SpeechRateDescription on SpeechRate {
String get description {
switch (this) {
case SpeechRate.fast:
return "Schnell";
case SpeechRate.normal:
return "Normal";
}
}
}
3 changes: 3 additions & 0 deletions lib/ride/models/recommendation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class Recommendation {
/// The predicted current signal phase, calculated periodically.
final Phase calcCurrentSignalPhase;

/// The timestamp of the last recommendation.
final DateTime timestamp = DateTime.now();

Recommendation(
this.calcPhasesFromNow, this.calcQualitiesFromNow, this.calcCurrentPhaseChangeTime, this.calcCurrentSignalPhase);
}
Loading
Loading