[tts] Change notification to 400-700 m

Signed-off-by: thesupertechie <thesupertechie1@gmail.com>
This commit is contained in:
thesupertechie
2025-11-29 22:05:30 -08:00
committed by zyphlar
parent 4691de7a66
commit 4f739d98b0
4 changed files with 14 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ namespace
{
// If the distance between two sequential turns is less than kSecondTurnThresholdDistM
// the information about the second turn will be shown or pronounced
// when the user is approaching to the first one with "Then.".
// when the user is approaching to the first one with "Then,".
double constexpr kSecondTurnThresholdDistM = 400.0;
// If the distance between two sequential turns is less than kDistanceNotifyThresholdM
// the notification will *not* append second distance, (like "In 500 meters. Turn left. Then. Turn right.")
@@ -25,7 +25,7 @@ double constexpr kDistanceNotifyThresholdM = 50.0;
// Returns true if the closest turn is an entrance to a roundabout and the second is
// an exit form a roundabout.
// Note. There are some cases when another turn (besides an exit from roundabout)
// follows an entrance to a roundabout. It could happend in case of turns inside a roundabout.
// follows an entrance to a roundabout. It could happened in case of turns inside a roundabout.
// Returns false otherwise.
bool IsClassicEntranceToRoundabout(routing::turns::TurnItemDist const & firstTurn,
routing::turns::TurnItemDist const & secondTurn)
@@ -244,13 +244,13 @@ void NotificationManager::SetLengthUnits(measurement_utils::Units units)
switch (units)
{
case measurement_utils::Units::Metric:
m_settings.SetState(30 /* notificationTimeSeconds */, 200 /* minNotificationDistanceUnits */,
m_settings.SetState(30 /* notificationTimeSeconds */, 400 /* minNotificationDistanceUnits */,
2000 /* maxNotificationDistanceUnits */, GetSoundedDistMeters() /* soundedDistancesUnits */,
measurement_utils::Units::Metric /* lengthUnits */);
return;
case measurement_utils::Units::Imperial:
m_settings.SetState(30 /* notificationTimeSeconds */, 500 /* minNotificationDistanceUnits */,
5000 /* maxNotificationDistanceUnits */, GetSoundedDistFeet() /* soundedDistancesUnits */,
1000 /* maxNotificationDistanceUnits */, GetSoundedDistFeet() /* soundedDistancesUnits */,
measurement_utils::Units::Imperial /* lengthUnits */);
return;
}