Add bear left command
This commit is contained in:
parent
5d5d611cdb
commit
3a07169ad6
35 changed files with 924 additions and 480 deletions
|
@ -76,6 +76,14 @@ public class TurnType {
|
|||
return value.equals("EXIT"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public boolean keepLeft() {
|
||||
return value.equals(KL);
|
||||
}
|
||||
|
||||
public boolean keepRight() {
|
||||
return value.equals(KR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if(isRoundAbout()){
|
||||
|
|
|
@ -5,19 +5,29 @@
|
|||
<!-- alwaysCopyOnFirstInstall - Copies file on first install, always -->
|
||||
<!-- alwaysOverwriteOrCopy - Copies or overwrites file unconditionally -->
|
||||
<!-- copyOnlyIfDoesNotExist - Copies file only this file is not present on target system -->
|
||||
<asset source="voice/cs-tts/ttsconfig.p" destination="voice/cs-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/de-tts/ttsconfig.p" destination="voice/de-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/en-miles-tts/ttsconfig.p" destination="voice/en-miles-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/en-tts/ttsconfig.p" destination="voice/en-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/es-tts/ttsconfig.p" destination="voice/es-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/fi-tts/ttsconfig.p" destination="voice/fi-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/fr-tts/ttsconfig.p" destination="voice/fr-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/hu-tts/ttsconfig.p" destination="voice/hu-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/it-tts/ttsconfig.p" destination="voice/it-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/nl-tts/ttsconfig.p" destination="voice/nl-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/pl-tts/ttsconfig.p" destination="voice/pl-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/ru-tts/ttsconfig.p" destination="voice/ru-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/sk-tts/ttsconfig.p" destination="voice/sk-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/sv-tts/ttsconfig.p" destination="voice/sv-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/zh-tts/ttsconfig.p" destination="voice/zh-tts/ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/cs-tts/ttsconfig.p" destination="voice/cs-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/de-tts/ttsconfig.p" destination="voice/de-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/en-tts/ttsconfig.p" destination="voice/en-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/es-tts/ttsconfig.p" destination="voice/es-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/fi-tts/ttsconfig.p" destination="voice/fi-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/fr-tts/ttsconfig.p" destination="voice/fr-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/hu-tts/ttsconfig.p" destination="voice/hu-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/it-tts/ttsconfig.p" destination="voice/it-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/ko-tts/ttsconfig.p" destination="voice/ko-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/lv-tts/ttsconfig.p" destination="voice/lv-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/nl-tts/ttsconfig.p" destination="voice/nl-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/pl-tts/ttsconfig.p" destination="voice/pl-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/ru-tts/ttsconfig.p" destination="voice/ru-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/sk-tts/ttsconfig.p" destination="voice/sk-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/sv-tts/ttsconfig.p" destination="voice/sv-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/zh-tts/ttsconfig.p" destination="voice/zh-tts/_ttsconfig.p" mode="overwriteOnlyIfExists" />
|
||||
|
||||
<asset source="voice/ru3/config.p" destination="voice/ru3/_config.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/ru2/config.p" destination="voice/ru2/_config.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/fr/config.p" destination="voice/fr/_config.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/en/config.p" destination="voice/en/_config.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/es/config.p" destination="voice/es/_config.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/it-Roberto/config.p" destination="voice/it-Roberto/_config.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/it-Chiara/config.p" destination="voice/it-Chiara/_config.p" mode="overwriteOnlyIfExists" />
|
||||
<asset source="voice/sk-Ruzena/config.p" destination="voice/sk-Ruzena/_config.p" mode="overwriteOnlyIfExists" />
|
||||
</assets>
|
|
@ -19,6 +19,8 @@ turn('left_sl', ['odbočte mírně vlevo']).
|
|||
turn('right', ['odbočte vpravo']).
|
||||
turn('right_sh', ['odbočte ostře vpravo']).
|
||||
turn('right_sl', ['odbočte mírně vpravo']).
|
||||
turn('right_keep', ['držte se vpravo']).
|
||||
turn('left_keep', ['držte se vlevo']).
|
||||
|
||||
pturn('left', ['vlevo']).
|
||||
pturn('left_sh', ['ostře vlevo']).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['leicht links abbiegen']).
|
|||
turn('right', ['rechts abbiegen ']).
|
||||
turn('right_sh', ['scharf rechts abbiegen ']).
|
||||
turn('right_sl', ['leicht rechts abbiegen ']).
|
||||
turn('right_keep', ['rechts halten ']).
|
||||
turn('left_keep', ['links halten ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Nach ', D, M] :- distance(Dist, dativ) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Nach ', D, M] :- distance(Dist, dativ) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['turn slightly left ']).
|
|||
turn('right', ['turn right ']).
|
||||
turn('right_sh', ['turn sharply right ']).
|
||||
turn('right_sl', ['turn slightly right ']).
|
||||
turn('right_keep', ['keep right']).
|
||||
turn('left_keep', ['keep left']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Prepare to ', M, ' after ', D] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['After ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
126
OsmAnd/assets/voice/en/config.p
Normal file
126
OsmAnd/assets/voice/en/config.p
Normal file
|
@ -0,0 +1,126 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['turn.ogg', 'left-e.ogg']).
|
||||
turn('left_sh', ['sharp_left-e.ogg']).
|
||||
turn('left_sl', ['turn.ogg', 'left-e.ogg']).
|
||||
turn('right', ['turn.ogg', 'right-e.ogg']).
|
||||
turn('right_sh', ['sharp_right-e.ogg']).
|
||||
turn('right_sl', ['turn.ogg', 'right-e.ogg']).
|
||||
turn('right_keep', ['keep_right-e.ogg']).
|
||||
turn('left_keep', ['keep_left-e.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Prepare_to-a.ogg', 'after-m.ogg', delay_450, D, delay_450, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['after-m.ogg', delay_250, D, delay_250, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
|
||||
prepare_make_ut(Dist) == ['Prepare_to-a.ogg', 'after-m.ogg', delay_300, D, delay_300,'turn_back-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_roundabout(Dist) == ['prepare_to-enter.ogg', 'after-m.ogg', delay_300, D] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
make_ut(Dist) == ['after-m.ogg', delay_300, D, delay_300, 'turn_back-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['turn_back-e.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['after-m.ogg', delay_300, D, delay_300, 'enter_the_roundabout-e.ogg', delay_250, 'and_take.ogg',
|
||||
delay_250, E, 'exit-e.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['taking.ogg', delay_250, E, 'exit-e.ogg'] :- nth(Exit, E).
|
||||
|
||||
and_arrive_destination == ['arrive_at_your_destination-e.ogg']. % Miss and?
|
||||
then == ['then.ogg', delay_350].
|
||||
reached_destination == ['you_have_reached_your_destination.ogg'].
|
||||
bear_right == ['keep_right-e.ogg'].
|
||||
bear_left == ['keep_left-e.ogg'].
|
||||
route_recalc(_Dist) == []. % ['recalc.ogg']. %nothing to said possibly beep?
|
||||
route_new_calc(Dist) == ['the_trip_is_more_than.ogg', delay_150, D] :- distance(Dist) == D. % nothing to said possibly beep?
|
||||
|
||||
go_ahead(Dist) == ['drive_for-h.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
go_ahead == ['continue_straight-e.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, '1st.ogg').
|
||||
nth(2, '2nd.ogg').
|
||||
nth(3, '3rd.ogg').
|
||||
nth(4, '4th.ogg').
|
||||
nth(5, '5th.ogg').
|
||||
nth(6, '6th.ogg').
|
||||
nth(7, '7th.ogg').
|
||||
nth(8, '8th.ogg').
|
||||
nth(9, '9th.ogg').
|
||||
nth(10, '10th.ogg').
|
||||
nth(11, '11th.ogg').
|
||||
nth(12, '12th.ogg').
|
||||
nth(13, '13th.ogg').
|
||||
nth(14, '14th.ogg').
|
||||
nth(15, '15th.ogg').
|
||||
nth(16, '16th.ogg').
|
||||
nth(17, '17th.ogg').
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'meters-e.ogg',T).
|
||||
dist(D, ['10.ogg']) :- D < 20, !.
|
||||
dist(D, ['20.ogg']) :- D < 30, !.
|
||||
dist(D, ['30.ogg']) :- D < 40, !.
|
||||
dist(D, ['40.ogg']) :- D < 50, !.
|
||||
dist(D, ['50.ogg']) :- D < 60, !.
|
||||
dist(D, ['60.ogg']) :- D < 70, !.
|
||||
dist(D, ['70.ogg']) :- D < 80, !.
|
||||
dist(D, ['80.ogg']) :- D < 90, !.
|
||||
dist(D, ['90.ogg']) :- D < 100, !.
|
||||
dist(D, ['100.ogg']) :- D < 150, !.
|
||||
dist(D, ['100_and.ogg', '50.ogg']) :- D < 200, !.
|
||||
dist(D, ['200.ogg']) :- D < 250, !.
|
||||
dist(D, ['200_and.ogg', '50.ogg']) :- D < 300, !.
|
||||
dist(D, ['300.ogg']) :- D < 350, !.
|
||||
dist(D, ['300_and.ogg', '50.ogg']) :- D < 400, !.
|
||||
dist(D, ['400.ogg']) :- D < 450, !.
|
||||
dist(D, ['400_and.ogg', '50.ogg']) :- D < 500, !.
|
||||
dist(D, ['500.ogg']) :- D < 550, !.
|
||||
dist(D, ['500_and.ogg', '50.ogg']) :- D < 600, !.
|
||||
dist(D, ['600.ogg']) :- D < 650, !.
|
||||
dist(D, ['600_and.ogg', '50.ogg']) :- D < 700, !.
|
||||
dist(D, ['700.ogg']) :- D < 750, !.
|
||||
dist(D, ['700_and.ogg', '50.ogg']) :- D < 800, !.
|
||||
dist(D, ['800.ogg']) :- D < 850, !.
|
||||
dist(D, ['800_and.ogg', '50.ogg']) :- D < 900, !.
|
||||
dist(D, ['900.ogg']) :- D < 950, !.
|
||||
dist(D, ['900_and.ogg', '50.ogg']) :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['more_than.ogg', '1.ogg', 'kilometer-e.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['more_than.ogg', '2.ogg', 'kilometers-e.ogg'] :- Dist < 3000.
|
||||
distance(Dist) == ['more_than.ogg', '3.ogg', 'kilometers-e.ogg'] :- Dist < 4000.
|
||||
distance(Dist) == ['more_than.ogg', '4.ogg', 'kilometers-e.ogg'] :- Dist < 5000.
|
||||
distance(Dist) == ['more_than.ogg', '5.ogg', 'kilometers-e.ogg'] :- Dist < 6000.
|
||||
distance(Dist) == ['more_than.ogg', '6.ogg', 'kilometers-e.ogg'] :- Dist < 7000.
|
||||
distance(Dist) == ['more_than.ogg', '7.ogg', 'kilometers-e.ogg'] :- Dist < 8000.
|
||||
distance(Dist) == ['more_than.ogg', '8.ogg', 'kilometers-e.ogg'] :- Dist < 9000.
|
||||
distance(Dist) == ['more_than.ogg', '9.ogg', 'kilometers-e.ogg'] :- Dist < 10000.
|
||||
distance(Dist) == ['more_than.ogg', X, 'kilometers-e.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
|
@ -14,6 +14,8 @@ turn('left_sl', ['gira levemente a la izquierda ']).
|
|||
turn('right', ['gira a la derecha ']).
|
||||
turn('right_sh', ['gira fuerte a la derecha ']).
|
||||
turn('right_sl', ['gira levemente a la derecha ']).
|
||||
turn('right_keep', ['mantente a la derecha']).
|
||||
turn('left_keep', ['mantente a la izquierda']).
|
||||
|
||||
turn_inf('left', ['girar a la izquierda ']).
|
||||
turn_inf('left_sh', ['girar fuerte a la izquierda ']).
|
||||
|
@ -21,6 +23,8 @@ turn_inf('left_sl', ['girar levemente a la izquierda ']).
|
|||
turn_inf('right', ['girar a la derecha ']).
|
||||
turn_inf('right_sh', ['girar fuerte a la derecha ']).
|
||||
turn_inf('right_sl', ['girar levemente a la derecha ']).
|
||||
turn_inf('right_keep', ['mantente a la derecha']).
|
||||
turn_inf('left_keep', ['mantente a la izquierda']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Prepárate para ', M, ' tras ', D] :- distance(Dist) == D, turn_inf(Turn, M).
|
||||
turn(Turn, Dist) == ['Tras ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
126
OsmAnd/assets/voice/es/config.p
Normal file
126
OsmAnd/assets/voice/es/config.p
Normal file
|
@ -0,0 +1,126 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['giro_a.ogg', 'izquierda.ogg']).
|
||||
turn('left_sh', ['giro_fuerte.ogg', 'izquierda']).
|
||||
turn('left_sl', ['giro_leve.ogg', 'izquierda.ogg']).
|
||||
turn('right', ['giro_a.ogg', 'derecha.ogg']).
|
||||
turn('right_sh', ['giro_fuerte.ogg', 'derecha']).
|
||||
turn('right_sl', ['giro_leve.ogg', 'derecha.ogg']).
|
||||
turn('right_keep', ['mantener_derecha.ogg']).
|
||||
turn('left_keep', ['mantener_izquierda.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['despues_de.ogg', delay_450, D,'prepararse_para.ogg', delay_450, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['despues_de.ogg', delay_250, D, delay_250, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
|
||||
prepare_make_ut(Dist) == [ 'despues_de.ogg', delay_300, D,'prepararse_para.ogg', delay_300,'giro_en_u.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_roundabout(Dist) == [ 'despues_de.ogg', delay_300, D,'prepara_entrar.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
make_ut(Dist) == ['despues_de.ogg', delay_300, D, delay_300, 'giro_en_u.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['giro_en_u.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['despues_de.ogg', delay_300, D, delay_300, 'entrar_glorieta.ogg', delay_250, 'y_tomar.ogg',
|
||||
delay_250, E, 'salida.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['tomando la.ogg', delay_250, E, 'salida.ogg'] :- nth(Exit, E).
|
||||
|
||||
and_arrive_destination == ['destino.ogg']. % Miss and?
|
||||
then == ['entonces.ogg', delay_350].
|
||||
reached_destination == ['llegado.ogg'].
|
||||
bear_right == ['mantener_derecha.ogg'].
|
||||
bear_left == ['mantener_izquierda.ogg'].
|
||||
route_recalc(_Dist) == []. % nothing to said possibly beep?
|
||||
route_new_calc(_Dist) == []. % nothing to said possibly beep?
|
||||
|
||||
go_ahead(Dist) == ['siga_por.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
go_ahead == ['siga.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, 'primera.ogg').
|
||||
nth(2, 'segunda.ogg').
|
||||
nth(3, 'tercera.ogg').
|
||||
nth(4, 'cuarta.ogg').
|
||||
nth(5, 'quinta.ogg').
|
||||
nth(6, 'sexta.ogg').
|
||||
nth(7, 'septima.ogg').
|
||||
nth(8, 'octava.ogg').
|
||||
nth(9, 'novena.ogg').
|
||||
nth(10, 'decima.ogg').
|
||||
nth(11, 'once.ogg').
|
||||
nth(12, 'doce.ogg').
|
||||
nth(13, 'trece.ogg').
|
||||
nth(14, 'catorce.ogg').
|
||||
nth(15, 'quince.ogg').
|
||||
nth(16, 'diezseis.ogg').
|
||||
nth(17, 'diezsiete.ogg').
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'metros.ogg',T).
|
||||
dist(D, ['diez.ogg']) :- D < 20, !.
|
||||
dist(D, ['veinte.ogg']) :- D < 30, !.
|
||||
dist(D, ['treinta.ogg']) :- D < 40, !.
|
||||
dist(D, ['cuarenta.ogg']) :- D < 50, !.
|
||||
dist(D, ['cincuenta.ogg']) :- D < 60, !.
|
||||
dist(D, ['sesenta.ogg']) :- D < 70, !.
|
||||
dist(D, ['setenta.ogg']) :- D < 80, !.
|
||||
dist(D, ['ochenta.ogg']) :- D < 90, !.
|
||||
dist(D, ['noventa.ogg']) :- D < 100, !.
|
||||
dist(D, ['cien.ogg']) :- D < 150, !.
|
||||
dist(D, ['ciento.ogg', 'cincuenta.ogg']) :- D < 200, !.
|
||||
dist(D, ['dos.ogg','cientos.ogg']) :- D < 250, !.
|
||||
dist(D, ['dos.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 300, !.
|
||||
dist(D, ['tres.ogg','cientos.ogg']) :- D < 350, !.
|
||||
dist(D, ['tres.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 400, !.
|
||||
dist(D, ['cuatro.ogg','cientos.ogg']) :- D < 450, !.
|
||||
dist(D, ['cuatro.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 500, !.
|
||||
dist(D, ['quinientos.ogg']) :- D < 550, !.
|
||||
dist(D, ['quinientos.ogg', 'cincuenta.ogg']) :- D < 600, !.
|
||||
dist(D, ['seis.ogg','cientos.ogg']) :- D < 650, !.
|
||||
dist(D, ['seis.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 700, !.
|
||||
dist(D, ['setescientos.ogg']) :- D < 750, !.
|
||||
dist(D, ['setescientos.ogg', 'cincuenta.ogg']) :- D < 800, !.
|
||||
dist(D, ['ocho.ogg','cientos.ogg']) :- D < 850, !.
|
||||
dist(D, ['ocho.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 900, !.
|
||||
dist(D, ['novecientos.ogg']) :- D < 950, !.
|
||||
dist(D, ['novecientos.ogg', 'cincuenta.ogg']) :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['mas_de.ogg', 'un.ogg', 'kilometro.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['mas_de.ogg', 'dos.ogg', 'kilometros.ogg'] :- Dist < 3000.
|
||||
distance(Dist) == ['mas_de.ogg', 'tres.ogg', 'kilometros.ogg'] :- Dist < 4000.
|
||||
distance(Dist) == ['mas_de.ogg', 'cuatro.ogg', 'kilometros.ogg'] :- Dist < 5000.
|
||||
distance(Dist) == ['mas_de.ogg', 'cinco.ogg', 'kilometros.ogg'] :- Dist < 6000.
|
||||
distance(Dist) == ['mas_de.ogg', 'seis.ogg', 'kilometros.ogg'] :- Dist < 7000.
|
||||
distance(Dist) == ['mas_de.ogg', 'siete.ogg', 'kilometros.ogg'] :- Dist < 8000.
|
||||
distance(Dist) == ['mas_de.ogg', 'ocho.ogg', 'kilometros.ogg'] :- Dist < 9000.
|
||||
distance(Dist) == ['mas_de.ogg', 'nueve.ogg', 'kilometros.ogg'] :- Dist < 10000.
|
||||
distance(Dist) == ['mas_de.ogg', X, 'kilometros.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['käänny loivasti vasemmalle ']).
|
|||
turn('right', ['käänny oikealle ']).
|
||||
turn('right_sh', ['käänny jyrkästi oikealle ']).
|
||||
turn('right_sl', ['käänny loivasti oikealle ']).
|
||||
turn('right_keep', ['pidä oikea ']).
|
||||
turn('left_keep', ['pidä vasen ']).
|
||||
|
||||
prepturn('left', ['kääntymään vasemmalle ']).
|
||||
prepturn('left_sh', ['kääntymään jyrkästi vasemmalle ']).
|
||||
|
@ -20,6 +22,8 @@ prepturn('left_sl', ['kääntymään loivasti vasemmalle ']).
|
|||
prepturn('right', ['kääntymään oikealle ']).
|
||||
prepturn('right_sh', ['kääntymään jyrkästi oikealle ']).
|
||||
prepturn('right_sl', ['kääntymään loivasti oikealle ']).
|
||||
prepturn('right_keep', ['pidä oikea ']).
|
||||
prepturn('left_keep', ['pidä vasen ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Valmistaudu ', D, ' päästä ', M] :- distance(Dist, metrin) == D, prepturn(Turn, M).
|
||||
turn(Turn, Dist) == [D, ' päästä ', M] :- distance(Dist, metrin) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['tournez légèrement à gauche ']).
|
|||
turn('right', ['tournez à droite ']).
|
||||
turn('right_sh', ['tournez immédiatement à droite ']).
|
||||
turn('right_sl', ['tournez légèrement à droite ']).
|
||||
turn('right_keep', ['serrez à droite ']).
|
||||
turn('left_keep', ['serrez à gauche ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Dans ', D, ' préparez vous à ', M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Dans ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
@ -12,36 +13,40 @@ turn('left_sl', ['tournez_lentement.ogg', 'a_gauche.ogg']).
|
|||
turn('right', ['tournez.ogg', 'a_droite.ogg']).
|
||||
turn('right_sh', ['tournez_immediat.ogg', 'a_droite.ogg']).
|
||||
turn('right_sl', ['tournez_lentement.ogg', 'a_droite.ogg']).
|
||||
turn('right_keep', ['serrez.ogg','a_droite.ogg']).
|
||||
turn('left_keep', ['serrez.ogg','a_gauche.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['dans.ogg', delay_450, D, 'preparez_vous_a.ogg', delay_450, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['dans.ogg', delay_250, D, delay_250, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
prepare_turn(Turn, Dist) == ['dans.ogg', delay_450, D, 'preparez_vous_a.ogg', delay_450, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['dans.ogg', delay_250, D, delay_250, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == ['dans.ogg', delay_300, D, 'preparez_vous_a.ogg', delay_300,'faire_demi_tour.ogg'] :- distance(Dist) == D.
|
||||
make_ut(Dist) == ['dans.ogg', delay_300, D, 'preparez_vous_a.ogg', delay_300,'faites_demi_tour.ogg'] :- distance(Dist) == D.
|
||||
make_ut == ['faites_demi_tour.ogg'].
|
||||
make_ut_wp == ['faites_demi_tour.ogg'].
|
||||
|
||||
prepare_roundabout(Dist) == ['dans.ogg', delay_300, D,'preparez_vous_a.ogg','entrez_dans_rondpoint.ogg'] :- distance(Dist) == D.
|
||||
prepare_make_ut(Dist) == ['dans.ogg', delay_300, D, 'preparez_vous_a.ogg', delay_300,'faire_demi_tour.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_roundabout(Dist) == ['dans.ogg', delay_300, D,'preparez_vous_a.ogg','entrez_dans_rondpoint.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
make_ut(Dist) == ['dans.ogg', delay_300, D, 'preparez_vous_a.ogg', delay_300,'faites_demi_tour.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['faites_demi_tour.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['dans.ogg', delay_300, D, delay_300, 'entrez_dans_rondpoint.ogg', delay_250, 'et.ogg','prenez_la.ogg',
|
||||
delay_250, E, 'sortie.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
delay_250, E, 'sortie.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['prenez_la.ogg', delay_250, E, 'sortie.ogg'] :- nth(Exit, E).
|
||||
|
||||
go_ahead == ['continuez_tout_droit.ogg'].
|
||||
go_ahead(Dist) == ['continuez_pendant.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
|
||||
and_arrive_destination == ['arrivez_a_destination.ogg'].
|
||||
|
||||
and_arrive_destination == ['arrivez_a_destination.ogg']. % Miss and?
|
||||
then == ['puis.ogg', delay_350].
|
||||
reached_destination == ['vous_etes_arrives.ogg'].
|
||||
bear_right == ['serrez.ogg','a_droite.ogg'].
|
||||
bear_left == ['serrez.ogg','a_gauche.ogg'].
|
||||
|
||||
route_recalc(_Dist) == []. % ['recalcul_itineraire.ogg']. %nothing to said possibly beep?
|
||||
route_new_calc(Dist) == ['le_trajet_fait.ogg', delay_150, D] :- distance(Dist) == D. % nothing to said possibly beep?
|
||||
route_recalc(Dist) == ['recalcul_itineraire.ogg', delay_150, D]:- distance(Dist) == D.
|
||||
|
||||
location_lost == ['gps_signal_lost.ogg'].
|
||||
|
||||
go_ahead(Dist) == ['continuez_pendant.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
go_ahead == ['continuez_tout_droit.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, '1ere.ogg').
|
||||
|
@ -65,55 +70,58 @@ nth(17, '17eme.ogg').
|
|||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'metres.ogg',T).
|
||||
dist(D, ['10-fr.ogg']) :- D < 15, !.
|
||||
dist(D, ['20-fr.ogg']) :- D < 25, !.
|
||||
dist(D, ['30-fr.ogg']) :- D < 35, !.
|
||||
dist(D, ['40-fr.ogg']) :- D < 45, !.
|
||||
dist(D, ['50-fr.ogg']) :- D < 55, !.
|
||||
dist(D, ['60-fr.ogg']) :- D < 65, !.
|
||||
dist(D, ['70-fr.ogg']) :- D < 75, !.
|
||||
dist(D, ['80-fr.ogg']) :- D < 85, !.
|
||||
dist(D, ['90-fr.ogg']) :- D < 95, !.
|
||||
dist(D, ['100-fr.ogg']) :- D < 125, !.
|
||||
dist(D, ['100-fr.ogg', '50-fr.ogg']) :- D < 175, !.
|
||||
dist(D, ['200-fr.ogg']) :- D < 225, !.
|
||||
dist(D, ['200-fr.ogg', '50-fr.ogg']) :- D < 275, !.
|
||||
dist(D, ['300-fr.ogg']) :- D < 325, !.
|
||||
dist(D, ['300-fr.ogg', '50-fr.ogg']) :- D < 375, !.
|
||||
dist(D, ['400-fr.ogg']) :- D < 425, !.
|
||||
dist(D, ['400-fr.ogg', '50-fr.ogg']) :- D < 475, !.
|
||||
dist(D, ['500-fr.ogg']) :- D < 525, !.
|
||||
dist(D, ['500-fr.ogg', '50-fr.ogg']) :- D < 575, !.
|
||||
dist(D, ['600-fr.ogg']) :- D < 625, !.
|
||||
dist(D, ['600-fr.ogg', '50-fr.ogg']) :- D < 675, !.
|
||||
dist(D, ['700-fr.ogg']) :- D < 725, !.
|
||||
dist(D, ['700-fr.ogg', '50-fr.ogg']) :- D < 775, !.
|
||||
dist(D, ['800-fr.ogg']) :- D < 825, !.
|
||||
dist(D, ['800-fr.ogg', '50-fr.ogg']) :- D < 875, !.
|
||||
dist(D, ['900-fr.ogg']) :- D < 925, !.
|
||||
dist(D, ['10-fr.ogg']) :- D < 20, !.
|
||||
dist(D, ['20-fr.ogg']) :- D < 30, !.
|
||||
dist(D, ['30-fr.ogg']) :- D < 40, !.
|
||||
dist(D, ['40-fr.ogg']) :- D < 50, !.
|
||||
dist(D, ['50-fr.ogg']) :- D < 60, !.
|
||||
dist(D, ['60-fr.ogg']) :- D < 70, !.
|
||||
dist(D, ['70-fr.ogg']) :- D < 80, !.
|
||||
dist(D, ['80-fr.ogg']) :- D < 90, !.
|
||||
dist(D, ['90-fr.ogg']) :- D < 100, !.
|
||||
dist(D, ['100-fr.ogg']) :- D < 150, !.
|
||||
dist(D, ['100-fr.ogg', '50-fr.ogg']) :- D < 200, !.
|
||||
dist(D, ['200-fr.ogg']) :- D < 250, !.
|
||||
dist(D, ['200-fr.ogg', '50-fr.ogg']) :- D < 300, !.
|
||||
dist(D, ['300-fr.ogg']) :- D < 350, !.
|
||||
dist(D, ['300-fr.ogg', '50-fr.ogg']) :- D < 400, !.
|
||||
dist(D, ['400-fr.ogg']) :- D < 450, !.
|
||||
dist(D, ['400-fr.ogg', '50-fr.ogg']) :- D < 500, !.
|
||||
dist(D, ['500-fr.ogg']) :- D < 550, !.
|
||||
dist(D, ['500-fr.ogg', '50-fr.ogg']) :- D < 600, !.
|
||||
dist(D, ['600-fr.ogg']) :- D < 650, !.
|
||||
dist(D, ['600-fr.ogg', '50-fr.ogg']) :- D < 700, !.
|
||||
dist(D, ['700-fr.ogg']) :- D < 750, !.
|
||||
dist(D, ['700-fr.ogg', '50-fr.ogg']) :- D < 800, !.
|
||||
dist(D, ['800-fr.ogg']) :- D < 850, !.
|
||||
dist(D, ['800-fr.ogg', '50-fr.ogg']) :- D < 900, !.
|
||||
dist(D, ['900-fr.ogg']) :- D < 950, !.
|
||||
dist(D, ['900-fr.ogg', '50-fr.ogg']) :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['plus_de.ogg', '1-fr.ogg', 'kilometre.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['plus_de.ogg', '2-fr.ogg', 'kilometre.ogg'] :- Dist < 2500.
|
||||
distance(Dist) == ['plus_de.ogg', '3-fr.ogg', 'kilometre.ogg'] :- Dist < 3500.
|
||||
distance(Dist) == ['plus_de.ogg', '4-fr.ogg', 'kilometre.ogg'] :- Dist < 4500.
|
||||
distance(Dist) == ['plus_de.ogg', '5-fr.ogg', 'kilometre.ogg'] :- Dist < 5500.
|
||||
distance(Dist) == ['plus_de.ogg', '6-fr.ogg', 'kilometre.ogg'] :- Dist < 6500.
|
||||
distance(Dist) == ['plus_de.ogg', '7-fr.ogg', 'kilometre.ogg'] :- Dist < 7500.
|
||||
distance(Dist) == ['plus_de.ogg', '8-fr.ogg', 'kilometre.ogg'] :- Dist < 8500.
|
||||
distance(Dist) == ['plus_de.ogg', '9-fr.ogg', 'kilometre.ogg'] :- Dist < 9500.
|
||||
distance(Dist) == ['plus_de.ogg', '2-fr.ogg', 'kilometre.ogg'] :- Dist < 3000.
|
||||
distance(Dist) == ['plus_de.ogg', '3-fr.ogg', 'kilometre.ogg'] :- Dist < 4000.
|
||||
distance(Dist) == ['plus_de.ogg', '4-fr.ogg', 'kilometre.ogg'] :- Dist < 5000.
|
||||
distance(Dist) == ['plus_de.ogg', '5-fr.ogg', 'kilometre.ogg'] :- Dist < 6000.
|
||||
distance(Dist) == ['plus_de.ogg', '6-fr.ogg', 'kilometre.ogg'] :- Dist < 7000.
|
||||
distance(Dist) == ['plus_de.ogg', '7-fr.ogg', 'kilometre.ogg'] :- Dist < 8000.
|
||||
distance(Dist) == ['plus_de.ogg', '8-fr.ogg', 'kilometre.ogg'] :- Dist < 9000.
|
||||
distance(Dist) == ['plus_de.ogg', '9-fr.ogg', 'kilometre.ogg'] :- Dist < 10000.
|
||||
distance(Dist) == ['plus_de.ogg', X, 'kilometre.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):- flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
||||
|
|
@ -13,6 +13,8 @@ turn('left_sl', [' हलके से बाये ']).
|
|||
turn('right', [' दायने ']).
|
||||
turn('right_sh', [' तेजी से दायने ']).
|
||||
turn('right_sl', [' हलके से दायने ']).
|
||||
turn('right_keep', ['दायने रहे ']).
|
||||
turn('left_keep', ['बाये रहे ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == [D, ' के बाद ', M, ' मुडने के लिये तयार रहे'] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == [D, ' के बाद ', M, ' मुडिये'] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['fordulj enyhén balra ']).
|
|||
turn('right', ['fordulj jobbra ']).
|
||||
turn('right_sh', ['fordulj élesen jobbra ']).
|
||||
turn('right_sl', ['fordulj enyhén jobbra ']).
|
||||
turn('right_keep', ['tarts jobbra ']).
|
||||
turn('left_keep', ['tarts balra ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == [D, ' múlva ', M] :- distance(Dist, no-t) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == [D, 'múlva ', M] :- distance(Dist, no-t) == D, turn(Turn, M).
|
||||
|
|
103
OsmAnd/assets/voice/it-Chiara/config.p
Normal file
103
OsmAnd/assets/voice/it-Chiara/config.p
Normal file
|
@ -0,0 +1,103 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
% provided by GaudiumSoft Lukasz Lubojanski - firma@gaudiumsoft.pl.
|
||||
% based on OsmAnd original _config.p file.
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['TurnLeft.ogg']).
|
||||
turn('left_sh', ['SharpLeft.ogg']).
|
||||
turn('left_sl', ['BearLeft.ogg']).
|
||||
turn('right', ['TurnRight.ogg']).
|
||||
turn('right_sh', ['SharpRight.ogg']).
|
||||
turn('right_sl', ['BearRight.ogg']).
|
||||
turn('right_keep', ['KeepRight.ogg']).
|
||||
turn('left_keep', ['KeepLeft.ogg']).
|
||||
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Straight.ogg'] :- Dist >= 1000.
|
||||
prepare_turn(Turn, Dist) == ['After.ogg', delay_250, D, delay_250, M] :- Dist < 1000,
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
|
||||
turn_after(Turn, Dist) == ['After.ogg', delay_250, D, delay_250, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
|
||||
|
||||
turn(Turn, Dist) == W :- Dist < 1000,
|
||||
turn_after(Turn, Dist) == W.
|
||||
|
||||
turn(Turn, Dist) == W :- Dist >= 1000,
|
||||
W == ['Straight.ogg'].
|
||||
|
||||
|
||||
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == ['After.ogg', delay_300, D, delay_300,'UTurn.ogg'] :- Dist < 1000,
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_make_ut(Dist) == ['Straight.ogg'] :- Dist >= 1000.
|
||||
|
||||
prepare_roundabout(Dist) == [].
|
||||
|
||||
make_ut(Dist) == ['After.ogg', delay_300, D, delay_300, 'UTurn.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['UTurn.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['After.ogg', delay_300, D,
|
||||
delay_250, E] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == [ E] :- nth(Exit, E).
|
||||
|
||||
and_arrive_destination == ['Straight.ogg']. % Miss and?
|
||||
then == ['Then.ogg', delay_350].
|
||||
reached_destination == ['Arrive.ogg'].
|
||||
bear_right == ['KeepRight.ogg'].
|
||||
bear_left == ['KeepLeft.ogg'].
|
||||
route_recalc(_Dist) == []. % []. %nothing to said possibly beep?
|
||||
route_new_calc(Dist) == ['Depart.ogg']. % []. %nothing to said possibly beep?
|
||||
|
||||
go_ahead(Dist) == ['Straight.ogg', delay_250, D] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
go_ahead == ['Straight.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, 'FirstExitRoundabout.ogg').
|
||||
nth(2, 'SecondExitRoundabout.ogg').
|
||||
nth(3, 'ThirdExitRoundabout.ogg').
|
||||
nth(4, 'FourthExitRoundabout.ogg').
|
||||
nth(5, 'FifthExitRoundabout.ogg').
|
||||
nth(6, 'SixthExitRoundabout.ogg').
|
||||
nth(N, 'GoAroundRoundabout.ogg') :- N > 6.
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'Meters.ogg',T).
|
||||
dist(D, ['50.ogg']) :- D < 60, !.
|
||||
dist(D, ['80.ogg']) :- D < 90, !.
|
||||
dist(D, ['100.ogg']) :- D < 150, !.
|
||||
dist(D, ['200.ogg']) :- D < 250, !.
|
||||
dist(D, ['300.ogg']) :- D < 350, !.
|
||||
dist(D, ['400.ogg']) :- D < 450, !.
|
||||
dist(D, ['500.ogg']) :- D < 550, !.
|
||||
dist(D, ['600.ogg']) :- D < 650, !.
|
||||
dist(D, ['700.ogg']) :- D < 750, !.
|
||||
dist(D, ['800.ogg']) :- D < 1000, !.
|
||||
|
||||
% distance(Dist) == [] :- Dist >= 1000.
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
103
OsmAnd/assets/voice/it-Roberto/config.p
Normal file
103
OsmAnd/assets/voice/it-Roberto/config.p
Normal file
|
@ -0,0 +1,103 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
% provided by GaudiumSoft Lukasz Lubojanski - firma@gaudiumsoft.pl.
|
||||
% based on OsmAnd original _config.p file.
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['TurnLeft.ogg']).
|
||||
turn('left_sh', ['SharpLeft.ogg']).
|
||||
turn('left_sl', ['BearLeft.ogg']).
|
||||
turn('right', ['TurnRight.ogg']).
|
||||
turn('right_sh', ['SharpRight.ogg']).
|
||||
turn('right_sl', ['BearRight.ogg']).
|
||||
turn('right_keep', ['KeepRight.ogg']).
|
||||
turn('left_keep', ['KeepLeft.ogg']).
|
||||
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Straight.ogg'] :- Dist >= 1000.
|
||||
prepare_turn(Turn, Dist) == ['After.ogg', delay_250, D, delay_250, M] :- Dist < 1000,
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
|
||||
turn_after(Turn, Dist) == ['After.ogg', delay_250, D, delay_250, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
|
||||
|
||||
turn(Turn, Dist) == W :- Dist < 1000,
|
||||
turn_after(Turn, Dist) == W.
|
||||
|
||||
turn(Turn, Dist) == W :- Dist >= 1000,
|
||||
W == ['Straight.ogg'].
|
||||
|
||||
|
||||
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == ['After.ogg', delay_300, D, delay_300,'UTurn.ogg'] :- Dist < 1000,
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_make_ut(Dist) == ['Straight.ogg'] :- Dist >= 1000.
|
||||
|
||||
prepare_roundabout(Dist) == [].
|
||||
|
||||
make_ut(Dist) == ['After.ogg', delay_300, D, delay_300, 'UTurn.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['UTurn.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['After.ogg', delay_300, D,
|
||||
delay_250, E] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == [ E] :- nth(Exit, E).
|
||||
|
||||
and_arrive_destination == ['Straight.ogg']. % Miss and?
|
||||
then == ['Then.ogg', delay_350].
|
||||
reached_destination == ['Arrive.ogg'].
|
||||
bear_right == ['KeepRight.ogg'].
|
||||
bear_left == ['KeepLeft.ogg'].
|
||||
route_recalc(_Dist) == []. % []. %nothing to said possibly beep?
|
||||
route_new_calc(Dist) == ['Depart.ogg']. % []. %nothing to said possibly beep?
|
||||
|
||||
go_ahead(Dist) == ['Straight.ogg', delay_250, D] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
go_ahead == ['Straight.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, 'FirstExitRoundabout.ogg').
|
||||
nth(2, 'SecondExitRoundabout.ogg').
|
||||
nth(3, 'ThirdExitRoundabout.ogg').
|
||||
nth(4, 'FourthExitRoundabout.ogg').
|
||||
nth(5, 'FifthExitRoundabout.ogg').
|
||||
nth(6, 'SixthExitRoundabout.ogg').
|
||||
nth(N, 'GoAroundRoundabout.ogg') :- N > 6.
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'Meters.ogg',T).
|
||||
dist(D, ['50.ogg']) :- D < 60, !.
|
||||
dist(D, ['80.ogg']) :- D < 90, !.
|
||||
dist(D, ['100.ogg']) :- D < 150, !.
|
||||
dist(D, ['200.ogg']) :- D < 250, !.
|
||||
dist(D, ['300.ogg']) :- D < 350, !.
|
||||
dist(D, ['400.ogg']) :- D < 450, !.
|
||||
dist(D, ['500.ogg']) :- D < 550, !.
|
||||
dist(D, ['600.ogg']) :- D < 650, !.
|
||||
dist(D, ['700.ogg']) :- D < 750, !.
|
||||
dist(D, ['800.ogg']) :- D < 1000, !.
|
||||
|
||||
% distance(Dist) == [] :- Dist >= 1000.
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['girate leggermente a sinistra ']).
|
|||
turn('right', ['girate a destra ']).
|
||||
turn('right_sh', ['subito a destra ']).
|
||||
turn('right_sl', ['girate leggermente a destra ']).
|
||||
turn('right_keep', ['tenersi sulla destra']).
|
||||
turn('left_keep', ['tenersi sulla sinistra']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Prepararsi a ', M,' tra ', D] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Dopo ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['좌회전']).
|
|||
turn('right', ['우회전']).
|
||||
turn('right_sh', ['크게 우회전']).
|
||||
turn('right_sl', ['우회전']).
|
||||
turn('right_keep', ['오른쪽에서 계속 가세요 ']).
|
||||
turn('left_keep', ['왼쪽에서 계속 가세요 ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == [D, ' 앞에서 ', M, '을 준비하세요 '] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == [D, ' 앞에서 ', M, '하세요 '] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['pagriezties pa kreisi ']).
|
|||
turn('right', ['griezties pa labi ']).
|
||||
turn('right_sh', ['strauji pagriezties pa labi ']).
|
||||
turn('right_sl', ['pagriezties pa labi ']).
|
||||
turn('right_keep', ['turēties pa labi ']).
|
||||
turn('left_keep', ['turēties pa kreisi ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Pēc ', D, ' gatavoties pa', M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Pēc ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['links afbuigen ']).
|
|||
turn('right', ['rechts afslaan ']).
|
||||
turn('right_sh', ['scherpe bocht naar rechts ']).
|
||||
turn('right_sl', ['rechts afbuigen ']).
|
||||
turn('right_keep', ['rechts aanhouden ']).
|
||||
turn('left_keep', ['links aanhouden ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Na ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Na ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['skręć lekko w lewo ']).
|
|||
turn('right', ['skręć w prawo ']).
|
||||
turn('right_sh', ['skręć ostro w prawo ']).
|
||||
turn('right_sl', ['skręć lekko w prawo ']).
|
||||
turn('right_keep', ['trzymaj się prawej ']).
|
||||
turn('left_keep', ['trzymaj się lewej ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Za ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Za ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['плавно поверните налево ']).
|
|||
turn('right', ['поверните направо ']).
|
||||
turn('right_sh', ['резко поверните направо ']).
|
||||
turn('right_sl', ['плавно поверните направо ']).
|
||||
turn('right_keep', ['держитесь правее ']).
|
||||
turn('left_keep', ['держитесь левее ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Приготовьтесь через ', D, ' ', M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Через ', D, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
@ -12,36 +13,40 @@ turn('left_sl', ['turn_slightly_left-e.ogg']).
|
|||
turn('right', ['turn_right-e.ogg']).
|
||||
turn('right_sh', ['turn_sharp_right-e.ogg']).
|
||||
turn('right_sl', ['turn_slightly_right-e.ogg']).
|
||||
turn('right_keep', ['keep_right-e.ogg']).
|
||||
turn('left_keep', ['keep_left-e.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Prepare_to.ogg', 'after-m.ogg', delay_300, D, delay_300, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['after-m.ogg', delay_300, D, delay_300, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
prepare_turn(Turn, Dist) == ['Prepare_to.ogg', 'after-m.ogg', delay_300, D, delay_300, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['after-m.ogg', delay_300, D, delay_300, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == ['Prepare_to.ogg', 'after-m.ogg', delay_300, D, delay_300,'turn_back-e.ogg'] :- distance(Dist) == D.
|
||||
make_ut(Dist) == ['after-m.ogg', delay_300, D, delay_300, 'turn_back-e.ogg'] :- distance(Dist) == D.
|
||||
make_ut == ['turn_back-e.ogg'].
|
||||
make_ut_wp == ['turn_back-e.ogg'].
|
||||
|
||||
prepare_roundabout(Dist) == ['Prepare_to.ogg', 'after-m.ogg', delay_300, D, delay_300, 'cross_the_roundabout-e.ogg'] :- distance(Dist) == D.
|
||||
prepare_make_ut(Dist) == ['Prepare_to.ogg', 'after-m.ogg', delay_300, D, delay_300,'turn_back-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_roundabout(Dist) == ['Prepare_to.ogg', 'after-m.ogg', delay_300, D, delay_300, 'cross_the_roundabout-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
make_ut(Dist) == ['after-m.ogg', delay_300, D, delay_300, 'turn_back-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['turn_back-e.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['after-m.ogg', delay_300, D, delay_300, 'enter_the_roundabout-e.ogg', delay_250, 'and_take_the.ogg',
|
||||
delay_250, E, 'exit-e.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
delay_250, E, 'exit-e.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['taking_the.ogg', delay_250, E, 'exit-e.ogg'] :- nth(Exit, E).
|
||||
|
||||
go_ahead == ['continue_straight-e.ogg'].
|
||||
go_ahead(Dist) == ['Drive-n.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
|
||||
and_arrive_destination == ['arrive_at_your_destination-e.ogg'].
|
||||
|
||||
and_arrive_destination == ['arrive_at_your_destination-e.ogg']. % Miss and?
|
||||
then == ['then.ogg', delay_350].
|
||||
reached_destination == ['you_have_reached_your_destination.ogg'].
|
||||
bear_right == ['keep_right-e.ogg'].
|
||||
bear_left == ['keep_left-e.ogg'].
|
||||
route_recalc(_Dist) == []. % ['recalc.ogg']. %nothing to said possibly beep?
|
||||
route_new_calc(Dist) == ['the_trip_is_more_than.ogg', delay_150, D] :- distance(Dist) == D. % nothing to said possibly beep?
|
||||
|
||||
route_new_calc(Dist) == ['the_trip_is_more_than.ogg', delay_150, D] :- distance(Dist) == D.
|
||||
route_recalc(Dist) == ['recalc.ogg' delay_150, D]:- distance(Dist) == D.
|
||||
|
||||
location_lost == ['gps_signal_lost.ogg'].
|
||||
|
||||
go_ahead(Dist) == ['Drive-n.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
go_ahead == ['continue_straight-e.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, '1st.ogg').
|
||||
|
@ -65,53 +70,55 @@ nth(17, '17th.ogg').
|
|||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'meters-10-e.ogg',T).
|
||||
dist(D, ['10.ogg']) :- D < 15, !.
|
||||
dist(D, ['20.ogg']) :- D < 25, !.
|
||||
dist(D, ['30.ogg']) :- D < 35, !.
|
||||
dist(D, ['40.ogg']) :- D < 45, !.
|
||||
dist(D, ['50.ogg']) :- D < 55, !.
|
||||
dist(D, ['60.ogg']) :- D < 65, !.
|
||||
dist(D, ['70.ogg']) :- D < 75, !.
|
||||
dist(D, ['80.ogg']) :- D < 85, !.
|
||||
dist(D, ['90.ogg']) :- D < 95, !.
|
||||
dist(D, ['100.ogg']) :- D < 1125, !.
|
||||
dist(D, ['100_and.ogg', 'and_50.ogg']) :- D < 175, !.
|
||||
dist(D, ['200.ogg']) :- D < 225, !.
|
||||
dist(D, ['200_and.ogg', 'and_50.ogg']) :- D < 275, !.
|
||||
dist(D, ['300.ogg']) :- D < 325, !.
|
||||
dist(D, ['300_and.ogg', 'and_50.ogg']) :- D < 375, !.
|
||||
dist(D, ['400.ogg']) :- D < 425, !.
|
||||
dist(D, ['400_and.ogg', 'and_50.ogg']) :- D < 475, !.
|
||||
dist(D, ['500.ogg']) :- D < 525, !.
|
||||
dist(D, ['500_and.ogg', 'and_50.ogg']) :- D < 675, !.
|
||||
dist(D, ['600.ogg']) :- D < 625, !.
|
||||
dist(D, ['600_and.ogg', 'and_50.ogg']) :- D < 675, !.
|
||||
dist(D, ['700.ogg']) :- D < 725, !.
|
||||
dist(D, ['700_and.ogg', 'and_50.ogg']) :- D < 775, !.
|
||||
dist(D, ['800.ogg']) :- D < 825, !.
|
||||
dist(D, ['800_and.ogg', 'and_50.ogg']) :- D < 875, !.
|
||||
dist(D, ['900.ogg']) :- D < 925, !.
|
||||
dist(D, ['10.ogg']) :- D < 20, !.
|
||||
dist(D, ['20.ogg']) :- D < 30, !.
|
||||
dist(D, ['30.ogg']) :- D < 40, !.
|
||||
dist(D, ['40.ogg']) :- D < 50, !.
|
||||
dist(D, ['50.ogg']) :- D < 60, !.
|
||||
dist(D, ['60.ogg']) :- D < 70, !.
|
||||
dist(D, ['70.ogg']) :- D < 80, !.
|
||||
dist(D, ['80.ogg']) :- D < 90, !.
|
||||
dist(D, ['90.ogg']) :- D < 100, !.
|
||||
dist(D, ['100.ogg']) :- D < 150, !.
|
||||
dist(D, ['100_and.ogg', 'and_50.ogg']) :- D < 200, !.
|
||||
dist(D, ['200.ogg']) :- D < 250, !.
|
||||
dist(D, ['200_and.ogg', 'and_50.ogg']) :- D < 300, !.
|
||||
dist(D, ['300.ogg']) :- D < 350, !.
|
||||
dist(D, ['300_and.ogg', 'and_50.ogg']) :- D < 400, !.
|
||||
dist(D, ['400.ogg']) :- D < 450, !.
|
||||
dist(D, ['400_and.ogg', 'and_50.ogg']) :- D < 500, !.
|
||||
dist(D, ['500.ogg']) :- D < 550, !.
|
||||
dist(D, ['500_and.ogg', 'and_50.ogg']) :- D < 600, !.
|
||||
dist(D, ['600.ogg']) :- D < 650, !.
|
||||
dist(D, ['600_and.ogg', 'and_50.ogg']) :- D < 700, !.
|
||||
dist(D, ['700.ogg']) :- D < 750, !.
|
||||
dist(D, ['700_and.ogg', 'and_50.ogg']) :- D < 800, !.
|
||||
dist(D, ['800.ogg']) :- D < 850, !.
|
||||
dist(D, ['800_and.ogg', 'and_50.ogg']) :- D < 900, !.
|
||||
dist(D, ['900.ogg']) :- D < 950, !.
|
||||
dist(D, ['900_and.ogg', 'and_50.ogg']) :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['more_than.ogg', '1.ogg', 'kilometer-e.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['more_than.ogg', '2.ogg', 'kilometers-1-2-e.ogg'] :- Dist < 2500.
|
||||
distance(Dist) == ['more_than.ogg', '3.ogg', 'kilometers-1-2-e.ogg'] :- Dist < 3500.
|
||||
distance(Dist) == ['more_than.ogg', '4.ogg', 'kilometers-1-2-e.ogg'] :- Dist < 4500.
|
||||
distance(Dist) == ['more_than.ogg', '5.ogg', 'kilometers-200-e.ogg'] :- Dist < 5500.
|
||||
distance(Dist) == ['more_than.ogg', '6.ogg', 'kilometers-200-e.ogg'] :- Dist < 6500.
|
||||
distance(Dist) == ['more_than.ogg', '7.ogg', 'kilometers-200-e.ogg'] :- Dist < 7500.
|
||||
distance(Dist) == ['more_than.ogg', '8.ogg', 'kilometers-200-e.ogg'] :- Dist < 8500.
|
||||
distance(Dist) == ['more_than.ogg', '9.ogg', 'kilometers-200-e.ogg'] :- Dist < 9500.
|
||||
distance(Dist) == ['more_than.ogg', '2.ogg', 'kilometers-1-2-e.ogg'] :- Dist < 3000.
|
||||
distance(Dist) == ['more_than.ogg', '3.ogg', 'kilometers-1-2-e.ogg'] :- Dist < 4000.
|
||||
distance(Dist) == ['more_than.ogg', '4.ogg', 'kilometers-1-2-e.ogg'] :- Dist < 5000.
|
||||
distance(Dist) == ['more_than.ogg', '5.ogg', 'kilometers-200-e.ogg'] :- Dist < 6000.
|
||||
distance(Dist) == ['more_than.ogg', '6.ogg', 'kilometers-200-e.ogg'] :- Dist < 7000.
|
||||
distance(Dist) == ['more_than.ogg', '7.ogg', 'kilometers-200-e.ogg'] :- Dist < 8000.
|
||||
distance(Dist) == ['more_than.ogg', '8.ogg', 'kilometers-200-e.ogg'] :- Dist < 9000.
|
||||
distance(Dist) == ['more_than.ogg', '9.ogg', 'kilometers-200-e.ogg'] :- Dist < 10000.
|
||||
distance(Dist) == ['more_than.ogg', X, 'kilometers-200-e.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):- flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
118
OsmAnd/assets/voice/ru3/config.p
Normal file
118
OsmAnd/assets/voice/ru3/config.p
Normal file
|
@ -0,0 +1,118 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['turn_left-e.ogg']).
|
||||
turn('left_sh', ['turn_sharp_left-e.ogg']).
|
||||
turn('left_sl', ['turn_slightly_left-e.ogg']).
|
||||
turn('right', ['turn_right-e.ogg']).
|
||||
turn('right_sh', ['turn_sharp_right-e.ogg']).
|
||||
turn('right_sl', ['turn_slightly_right-e.ogg']).
|
||||
turn('right_keep', ['keep_right-e.ogg']).
|
||||
turn('left_keep', ['keep_left-e.ogg']).
|
||||
prepare_turn(Turn, Dist) == ['prepare_to.ogg', 'after-n.ogg', D, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['after-n.ogg', D, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
|
||||
prepare_make_ut(Dist) == ['prepare_to.ogg', 'after-n.ogg', D, 'turn_back-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_roundabout(Dist) == ['prepare_to.ogg', 'after-n.ogg', D, 'cross_the_roundabout-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
make_ut(Dist) == ['after-n.ogg', D, 'turn_back-e.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['turn_back-e.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['after-n.ogg',D, 'enter_the_roundabout-e.ogg', 'and_take_the.ogg', E, 'exit-e.ogg'] :-
|
||||
distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['take_the.ogg', E, 'exit-e.ogg'] :- nth(Exit, E).
|
||||
|
||||
and_arrive_destination == ['then.ogg', delay_150, 'arrive_at_your_destination-e.ogg'].
|
||||
then == ['then.ogg', delay_150].
|
||||
reached_destination == ['you_have_reached_your_destination.ogg'].
|
||||
bear_right == ['keep_right-e.ogg'].
|
||||
location_lost == ['gps_signal_lost.ogg'].
|
||||
bear_left == ['keep_left-e.ogg'].
|
||||
route_recalc(_Dist) == []. % 'recalc.ogg'
|
||||
route_new_calc(_Dist) == ['have_a_nice_trip_drive_carefully.ogg'].
|
||||
|
||||
go_ahead(Dist) == ['Drive-n.ogg', D]:- distance(Dist) == D.
|
||||
go_ahead == ['continue_straight-e.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, '1st.ogg').
|
||||
nth(2, '2nd.ogg').
|
||||
nth(3, '3rd.ogg').
|
||||
nth(4, '4th.ogg').
|
||||
nth(5, '5th.ogg').
|
||||
nth(6, '6th.ogg').
|
||||
nth(7, '7th.ogg').
|
||||
nth(8, '8th.ogg').
|
||||
nth(9, '9th.ogg').
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [F, 'meters-e.ogg'] :- Dist < 1000, dist(Dist, F).
|
||||
dist(D, '10.ogg') :- D < 20, !.
|
||||
dist(D, '20.ogg') :- D < 30, !.
|
||||
dist(D, '30.ogg') :- D < 40, !.
|
||||
dist(D, '40.ogg') :- D < 50, !.
|
||||
dist(D, '50.ogg') :- D < 60, !.
|
||||
dist(D, '60.ogg') :- D < 70, !.
|
||||
dist(D, '70.ogg') :- D < 80, !.
|
||||
dist(D, '80.ogg') :- D < 90, !.
|
||||
dist(D, '90.ogg') :- D < 100, !.
|
||||
dist(D, ['100.ogg']) :- D < 150, !.
|
||||
dist(D, ['100.ogg', '50.ogg']) :- D < 200, !.
|
||||
dist(D, ['200.ogg']) :- D < 250, !.
|
||||
dist(D, ['200.ogg', '50.ogg']) :- D < 300, !.
|
||||
dist(D, ['300.ogg']) :- D < 350, !.
|
||||
dist(D, ['300.ogg', '50.ogg']) :- D < 400, !.
|
||||
dist(D, ['400.ogg']) :- D < 450, !.
|
||||
dist(D, ['400.ogg', '50.ogg']) :- D < 500, !.
|
||||
dist(D, ['500.ogg']) :- D < 550, !.
|
||||
dist(D, ['500.ogg', '50.ogg']) :- D < 600, !.
|
||||
dist(D, ['600.ogg']) :- D < 650, !.
|
||||
dist(D, ['600.ogg', '50.ogg']) :- D < 700, !.
|
||||
dist(D, ['700.ogg']) :- D < 750, !.
|
||||
dist(D, ['700.ogg', '50.ogg']) :- D < 800, !.
|
||||
dist(D, ['800.ogg']) :- D < 850, !.
|
||||
dist(D, ['800.ogg', '50.ogg']) :- D < 900, !.
|
||||
dist(D, ['900.ogg']) :- D < 950, !.
|
||||
dist(D, ['900.ogg', '50.ogg']) :- D < 1000, !.
|
||||
|
||||
|
||||
|
||||
distance(Dist) == ['more_than.ogg', '1.ogg', 'kilometr.ogg'] :- Dist < 2000.
|
||||
distance(Dist) == ['more_than.ogg', '2.ogg', 'kilometra.ogg'] :- Dist < 3000.
|
||||
distance(Dist) == ['more_than.ogg', '3.ogg', 'kilometra.ogg'] :- Dist < 4000.
|
||||
distance(Dist) == ['more_than.ogg', '4.ogg', 'kilometra.ogg'] :- Dist < 5000.
|
||||
distance(Dist) == ['more_than.ogg', '5.ogg', 'kilometrov.ogg'] :- Dist < 6000.
|
||||
distance(Dist) == ['more_than.ogg', '6.ogg', 'kilometrov.ogg'] :- Dist < 7000.
|
||||
distance(Dist) == ['more_than.ogg', '7.ogg', 'kilometrov.ogg'] :- Dist < 8000.
|
||||
distance(Dist) == ['more_than.ogg', '8.ogg', 'kilometrov.ogg'] :- Dist < 9000.
|
||||
distance(Dist) == ['more_than.ogg', '9.ogg', 'kilometrov.ogg'] :- Dist < 10000.
|
||||
distance(Dist) == ['more_than.ogg', X, 'kilometrov.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
135
OsmAnd/assets/voice/sk-Ruzena/config.p
Normal file
135
OsmAnd/assets/voice/sk-Ruzena/config.p
Normal file
|
@ -0,0 +1,135 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['dolava.ogg']).
|
||||
turn('left_sh', ['ostr_dolava.ogg']).
|
||||
turn('left_sl', ['m_dolava.ogg']).
|
||||
turn('right', ['doprava.ogg']).
|
||||
turn('right_sh', ['ostr_doprava.ogg']).
|
||||
turn('right_sl', ['m_doprava.ogg']).
|
||||
turn('right_keep', ['drz_vpravo.ogg']).
|
||||
turn('left_keep', ['drz_vlavo.ogg']).
|
||||
|
||||
pturn('left', ['pdolava.ogg']).
|
||||
pturn('left_sh', ['postr_dolava.ogg']).
|
||||
pturn('left_sl', ['pm_dolava.ogg']).
|
||||
pturn('right', ['pdoprava.ogg']).
|
||||
pturn('right_sh', ['postr_doprava.ogg']).
|
||||
pturn('right_sl', ['pm_doprava.ogg']).
|
||||
pturn('right_keep', ['drz_vpravo.ogg']).
|
||||
pturn('left_keep', ['drz_vlavo.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['o', D, 'budete_odbacat.ogg', M] :-
|
||||
distance(Dist) == D, pturn(Turn, M).
|
||||
turn(Turn, Dist) == ['o.ogg', D, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
|
||||
prepare_make_ut(Dist) == ['o.ogg', D, 'sa_otacat.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_roundabout(Dist) == ['o.ogg', D, 'vojde_kruh.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
|
||||
make_ut(Dist) == ['o.ogg', D, 'sa_otocte.ogg'] :-
|
||||
distance(Dist) == D.
|
||||
make_ut == ['otocte_sa.ogg'].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['o.ogg', D, 'vojdi_kruh.ogg', 'a_zvolte.ogg', E, 'vyjazd.ogg'] :-
|
||||
distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['pojdete_cez.ogg', E, 'vyjazd.ogg'] :- nth(Exit, E).
|
||||
|
||||
and_arrive_destination == ['a_do_ciela.ogg']. % Miss and?
|
||||
then == ['potom.ogg'].
|
||||
reached_destination == ['doraz_ciel.ogg'].
|
||||
bear_right == ['drz_vpravo.ogg'].
|
||||
bear_left == ['drz_vlavo.ogg'].
|
||||
route_recalc(_Dist) == ['prepocet.ogg']. % nothing to said possibly beep?
|
||||
route_new_calc(Dist) == ['cesta_je_dlha.ogg', D] :- distance(Dist) == D. % nothing to said possibly beep?
|
||||
|
||||
go_ahead(Dist) == ['pokracujte.ogg', D]:- distance(Dist) == D.
|
||||
go_ahead == ['pokracujte_rovno.ogg'].
|
||||
|
||||
%%
|
||||
nth(1, '1st.ogg').
|
||||
nth(2, '2nd.ogg').
|
||||
nth(3, '3rd.ogg').
|
||||
nth(4, '4th.ogg').
|
||||
nth(5, '5th.ogg').
|
||||
nth(6, '6th.ogg').
|
||||
nth(7, '7th.ogg').
|
||||
nth(8, '8th.ogg').
|
||||
nth(9, '9th.ogg').
|
||||
nth(10, '10th.ogg').
|
||||
nth(11, '11th.ogg').
|
||||
nth(12, '12th.ogg').
|
||||
nth(13, '13th.ogg').
|
||||
nth(14, '14th.ogg').
|
||||
nth(15, '15th.ogg').
|
||||
nth(16, '16th.ogg').
|
||||
nth(17, '17th.ogg').
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'metrov.ogg',T).
|
||||
dist(D, ['10.ogg']) :- D < 20, !.
|
||||
dist(D, ['20.ogg']) :- D < 30, !.
|
||||
dist(D, ['30.ogg']) :- D < 40, !.
|
||||
dist(D, ['40.ogg']) :- D < 50, !.
|
||||
dist(D, ['50.ogg']) :- D < 60, !.
|
||||
dist(D, ['60.ogg']) :- D < 70, !.
|
||||
dist(D, ['70.ogg']) :- D < 80, !.
|
||||
dist(D, ['80.ogg']) :- D < 90, !.
|
||||
dist(D, ['90.ogg']) :- D < 100, !.
|
||||
dist(D, ['100.ogg']) :- D < 150, !.
|
||||
dist(D, ['100.ogg', '50.ogg']) :- D < 200, !.
|
||||
dist(D, ['200.ogg']) :- D < 250, !.
|
||||
dist(D, ['200.ogg', '50.ogg']) :- D < 300, !.
|
||||
dist(D, ['300.ogg']) :- D < 350, !.
|
||||
dist(D, ['300.ogg', '50.ogg']) :- D < 400, !.
|
||||
dist(D, ['400.ogg']) :- D < 450, !.
|
||||
dist(D, ['400.ogg', '50.ogg']) :- D < 500, !.
|
||||
dist(D, ['500.ogg']) :- D < 550, !.
|
||||
dist(D, ['500.ogg', '50.ogg']) :- D < 600, !.
|
||||
dist(D, ['600.ogg']) :- D < 650, !.
|
||||
dist(D, ['600.ogg', '50.ogg']) :- D < 700, !.
|
||||
dist(D, ['700.ogg']) :- D < 750, !.
|
||||
dist(D, ['700.ogg', '50.ogg']) :- D < 800, !.
|
||||
dist(D, ['800.ogg']) :- D < 850, !.
|
||||
dist(D, ['800.ogg', '50.ogg']) :- D < 900, !.
|
||||
dist(D, ['900.ogg']) :- D < 950, !.
|
||||
dist(D, ['900.ogg', '50.ogg']) :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['viac_ako.ogg', '1.ogg', 'kilometer.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['viac_ako.ogg', '2.ogg', 'kilometre.ogg'] :- Dist < 3000.
|
||||
distance(Dist) == ['viac_ako.ogg', '3.ogg', 'kilometre.ogg'] :- Dist < 4000.
|
||||
distance(Dist) == ['viac_ako.ogg', '4.ogg', 'kilometre.ogg'] :- Dist < 5000.
|
||||
distance(Dist) == ['viac_ako.ogg', '5.ogg', 'kilometrov.ogg'] :- Dist < 6000.
|
||||
distance(Dist) == ['viac_ako.ogg', '6.ogg', 'kilometrov.ogg'] :- Dist < 7000.
|
||||
distance(Dist) == ['viac_ako.ogg', '7.ogg', 'kilometrov.ogg'] :- Dist < 8000.
|
||||
distance(Dist) == ['viac_ako.ogg', '8.ogg', 'kilometrov.ogg'] :- Dist < 9000.
|
||||
distance(Dist) == ['viac_ako.ogg', '9.ogg', 'kilometrov.ogg'] :- Dist < 10000.
|
||||
distance(Dist) == ['viac_ako.ogg', X, 'kilometrov.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['zahnite mierne doľava']).
|
|||
turn('right', ['zahnite doprava']).
|
||||
turn('right_sh', ['zahnite prudko doprava']).
|
||||
turn('right_sl', ['zahnite mierne doprava']).
|
||||
turn('right_keep', ['držte sa vpravo']).
|
||||
turn('left_keep', ['držte sa vľavo']).
|
||||
|
||||
pturn('left', ['doľava']).
|
||||
pturn('left_sh', ['prudko doľava']).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['sväng svagt vänster ']).
|
|||
turn('right', ['sväng höger ']).
|
||||
turn('right_sh', ['sväng skarpt höger ']).
|
||||
turn('right_sl', ['sväng lätt höger ']).
|
||||
turn('right_keep', ['håll åt höger ']).
|
||||
turn('left_keep', ['håll åt vänster ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == [D, ' kvar, sedan ', M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Om ', D, ', ', M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -13,6 +13,8 @@ turn('left_sl', ['稍向左轉 ']).
|
|||
turn('right', ['右轉 ']).
|
||||
turn('right_sh', ['向右急轉 ']).
|
||||
turn('right_sl', ['稍向右轉 ']).
|
||||
turn('right_keep', ['靠右 ']).
|
||||
turn('left_keep', ['靠左 ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['請準備 ', D, ' 後 ', M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == [D, ' 後 ',M] :- distance(Dist) == D, turn(Turn, M).
|
||||
|
|
|
@ -66,10 +66,12 @@ public class DownloadOsmandIndexesHelper {
|
|||
//do nothing...
|
||||
}
|
||||
for (String voice : list) {
|
||||
File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p");
|
||||
String key = voice + ext;
|
||||
String assetName = "voice" + File.separatorChar + voice + File.separatorChar + "ttsconfig.p";
|
||||
result.add(key, new AssetIndexItem(key, "voice", date, dateModified, "0.1", "", assetName, destFile.getPath()));
|
||||
if (voice.endsWith("tts")) {
|
||||
File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p");
|
||||
String key = voice + ext;
|
||||
String assetName = "voice" + File.separatorChar + voice + File.separatorChar + "ttsconfig.p";
|
||||
result.add(key, new AssetIndexItem(key, "voice", date, dateModified, "0.1", "", assetName, destFile.getPath()));
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("Error while loading tts files from assets", e); //$NON-NLS-1$
|
||||
|
@ -199,9 +201,6 @@ public class DownloadOsmandIndexesHelper {
|
|||
public String getVisibleName(){
|
||||
int l = fileName.lastIndexOf('_');
|
||||
String name = fileName.substring(0, l < 0 ? fileName.length() : l).replace('_', ' ');
|
||||
// if (fileName.endsWith(".zip")) { //$NON-NLS-1$
|
||||
// name += " (zip)"; //$NON-NLS-1$
|
||||
// }
|
||||
return name;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,8 @@ public class TestVoiceActivity extends Activity {
|
|||
addButton(ll, "Turn sharply right then bear left", builder(p).turn(AbstractPrologCommandPlayer.A_RIGHT_SH).then().bearLeft());
|
||||
addButton(ll, "Prepare to make a U-turn after 400m", builder(p).prepareMakeUT(400));
|
||||
addButton(ll, "After 640m make a U-turn", builder(p).makeUT(640));
|
||||
addButton(ll, "Prepare to keep left after 370m", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_LEFT_KEEP, 370));
|
||||
addButton(ll, "Keep left then after 400m keep right", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT_KEEP).then().turn(AbstractPrologCommandPlayer.A_RIGHT_KEEP, 400));
|
||||
addButton(ll, "Make a U-turn", builder(p).makeUT());
|
||||
addButton(ll, "When possible, make a U-turn", builder(p).makeUTwp());
|
||||
addButton(ll, "Prepare to enter a roundabout after 750m", builder(p).prepareRoundAbout(750));
|
||||
|
|
|
@ -312,6 +312,8 @@ public class VoiceRouter {
|
|||
play.prepareTurn(tParam, dist).play();
|
||||
} else if(next.getTurnType().isRoundAbout()){
|
||||
play.prepareRoundAbout(dist).play();
|
||||
} else if(next.getTurnType().keepLeft() || next.getTurnType().keepRight()){
|
||||
play.prepareRoundAbout(dist).play();
|
||||
} else if(next.getTurnType().getValue().equals(TurnType.TU) || next.getTurnType().getValue().equals(TurnType.TRU)){
|
||||
play.prepareMakeUT(dist).play();
|
||||
}
|
||||
|
@ -341,9 +343,10 @@ public class VoiceRouter {
|
|||
play.goAhead(dist);
|
||||
}
|
||||
if (TurnType.TL.equals(t.getValue()) || TurnType.TSHL.equals(t.getValue()) || TurnType.TSLL.equals(t.getValue())
|
||||
|| TurnType.TU.equals(t.getValue())) {
|
||||
|| TurnType.TU.equals(t.getValue()) || TurnType.KL.equals(t.getValue())) {
|
||||
play.then().bearLeft();
|
||||
} else if (TurnType.TR.equals(t.getValue()) || TurnType.TSHR.equals(t.getValue()) || TurnType.TSLR.equals(t.getValue())) {
|
||||
} else if (TurnType.TR.equals(t.getValue()) || TurnType.TSHR.equals(t.getValue()) || TurnType.TSLR.equals(t.getValue())
|
||||
|| TurnType.KR.equals(t.getValue())) {
|
||||
play.then().bearRight();
|
||||
}
|
||||
}
|
||||
|
@ -360,6 +363,8 @@ public class VoiceRouter {
|
|||
boolean isplay = true;
|
||||
if(tParam != null){
|
||||
play.turn(tParam);
|
||||
} else if(next.getTurnType().keepLeft() || next.getTurnType().keepRight()){
|
||||
isplay = false;
|
||||
} else if(next.getTurnType().isRoundAbout()){
|
||||
play.roundAbout(next.getTurnType().getTurnAngle(), next.getTurnType().getExitOut());
|
||||
} else if(next.getTurnType().getValue().equals(TurnType.TU) || next.getTurnType().getValue().equals(TurnType.TRU)){
|
||||
|
@ -404,6 +409,10 @@ public class VoiceRouter {
|
|||
return AbstractPrologCommandPlayer.A_RIGHT_SH;
|
||||
} else if(TurnType.TSLR.equals(t.getValue())){
|
||||
return AbstractPrologCommandPlayer.A_RIGHT_SL;
|
||||
} else if(TurnType.KL.equals(t.getValue())){
|
||||
return AbstractPrologCommandPlayer.A_LEFT_KEEP;
|
||||
} else if(TurnType.KR.equals(t.getValue())){
|
||||
return AbstractPrologCommandPlayer.A_RIGHT_KEEP;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -43,9 +43,11 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer {
|
|||
public static final String A_LEFT = "left";
|
||||
public static final String A_LEFT_SH = "left_sh";
|
||||
public static final String A_LEFT_SL = "left_sl";
|
||||
public static final String A_LEFT_KEEP = "left_keep";
|
||||
public static final String A_RIGHT = "right";
|
||||
public static final String A_RIGHT_SH = "right_sh";
|
||||
public static final String A_RIGHT_SL = "right_sl";
|
||||
public static final String A_RIGHT_KEEP = "right_keep";
|
||||
protected static final String DELAY_CONST = "delay_";
|
||||
/** Must be sorted array! */
|
||||
private final int[] sortedVoiceVersions;
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['turn.ogg', 'left-e.ogg']).
|
||||
turn('left_sh', ['sharp_left-e.ogg']).
|
||||
turn('left_sl', ['turn.ogg', 'left-e.ogg']).
|
||||
turn('right', ['turn.ogg', 'right-e.ogg']).
|
||||
turn('right_sh', ['sharp_right-e.ogg']).
|
||||
turn('right_sl', ['turn.ogg', 'right-e.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Prepare_to-a.ogg', 'after-m.ogg', delay_450, D, delay_450, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['after-m.ogg', delay_250, D, delay_250, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == ['Prepare_to-a.ogg', 'after-m.ogg', delay_300, D, delay_300,'turn_back-e.ogg'] :- distance(Dist) == D.
|
||||
make_ut(Dist) == ['after-m.ogg', delay_300, D, delay_300, 'turn_back-e.ogg'] :- distance(Dist) == D.
|
||||
make_ut == ['turn_back-e.ogg'].
|
||||
make_ut_wp == ['turn_back_when_possible-e.ogg'].
|
||||
|
||||
prepare_roundabout(Dist) == ['prepare_to-enter.ogg', 'after-m.ogg', delay_300, D] :- distance(Dist) == D.
|
||||
roundabout(Dist, _Angle, Exit) == ['after-m.ogg', delay_300, D, delay_300, 'enter_the_roundabout-e.ogg', delay_250, 'and_take.ogg', delay_250, E, 'exit-e.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['taking.ogg', delay_250, E, 'exit-e.ogg'] :- nth(Exit, E).
|
||||
|
||||
go_ahead == ['continue_straight-e.ogg'].
|
||||
go_ahead(Dist) == ['follow-the-road-for.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
|
||||
and_arrive_destination == ['arrive_at_your_destination-e.ogg'].
|
||||
|
||||
then == ['then.ogg', delay_350].
|
||||
reached_destination == ['you_have_reached_your_destination-e.ogg'].
|
||||
bear_right == ['keep_right-e.ogg'].
|
||||
bear_left == ['keep_left-e.ogg'].
|
||||
|
||||
route_new_calc(Dist) == ['the_trip_is_about.ogg', delay_150, D] :- distance(Dist) == D.
|
||||
route_recalc(Dist) == ['recalc.ogg', delay_300, 'distance.ogg', delay_150, D]:- distance(Dist) == D.
|
||||
|
||||
location_lost == ['gps_signal_lost.ogg'].
|
||||
|
||||
|
||||
%%
|
||||
nth(1, '1st.ogg').
|
||||
nth(2, '2nd.ogg').
|
||||
nth(3, '3rd.ogg').
|
||||
nth(4, '4th.ogg').
|
||||
nth(5, '5th.ogg').
|
||||
nth(6, '6th.ogg').
|
||||
nth(7, '7th.ogg').
|
||||
nth(8, '8th.ogg').
|
||||
nth(9, '9th.ogg').
|
||||
nth(10, '10th.ogg').
|
||||
nth(11, '11th.ogg').
|
||||
nth(12, '12th.ogg').
|
||||
nth(13, '13th.ogg').
|
||||
nth(14, '14th.ogg').
|
||||
nth(15, '15th.ogg').
|
||||
nth(16, '16th.ogg').
|
||||
nth(17, '17th.ogg').
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'meters-e.ogg',T).
|
||||
dist(D, ['10.ogg']) :- D < 15, !.
|
||||
dist(D, ['20.ogg']) :- D < 25, !.
|
||||
dist(D, ['30.ogg']) :- D < 35, !.
|
||||
dist(D, ['40.ogg']) :- D < 45, !.
|
||||
dist(D, ['50.ogg']) :- D < 55, !.
|
||||
dist(D, ['60.ogg']) :- D < 65, !.
|
||||
dist(D, ['70.ogg']) :- D < 75, !.
|
||||
dist(D, ['80.ogg']) :- D < 85, !.
|
||||
dist(D, ['90.ogg']) :- D < 95, !.
|
||||
dist(D, ['100.ogg']) :- D < 125, !.
|
||||
dist(D, ['100_and.ogg', '50.ogg']) :- D < 175, !.
|
||||
dist(D, ['200.ogg']) :- D < 225, !.
|
||||
dist(D, ['200_and.ogg', '50.ogg']) :- D < 275, !.
|
||||
dist(D, ['300.ogg']) :- D < 325, !.
|
||||
dist(D, ['300_and.ogg', '50.ogg']) :- D < 375, !.
|
||||
dist(D, ['400.ogg']) :- D < 425, !.
|
||||
dist(D, ['400_and.ogg', '50.ogg']) :- D < 475, !.
|
||||
dist(D, ['500.ogg']) :- D < 525, !.
|
||||
dist(D, ['500_and.ogg', '50.ogg']) :- D < 575, !.
|
||||
dist(D, ['600.ogg']) :- D < 625, !.
|
||||
dist(D, ['600_and.ogg', '50.ogg']) :- D < 675, !.
|
||||
dist(D, ['700.ogg']) :- D < 725, !.
|
||||
dist(D, ['700_and.ogg', '50.ogg']) :- D < 775, !.
|
||||
dist(D, ['800.ogg']) :- D < 825, !.
|
||||
dist(D, ['800_and.ogg', '50.ogg']) :- D < 875, !.
|
||||
dist(D, ['900.ogg']) :- D < 925, !.
|
||||
dist(D, ['900_and.ogg', '50.ogg']) :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['about.ogg', '1.ogg', 'kilometer-e.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['about.ogg', '2.ogg', 'kilometers-e.ogg'] :- Dist < 2500.
|
||||
distance(Dist) == ['about.ogg', '3.ogg', 'kilometers-e.ogg'] :- Dist < 3500.
|
||||
distance(Dist) == ['about.ogg', '4.ogg', 'kilometers-e.ogg'] :- Dist < 4500.
|
||||
distance(Dist) == ['about.ogg', '5.ogg', 'kilometers-e.ogg'] :- Dist < 5500.
|
||||
distance(Dist) == ['about.ogg', '6.ogg', 'kilometers-e.ogg'] :- Dist < 6500.
|
||||
distance(Dist) == ['about.ogg', '7.ogg', 'kilometers-e.ogg'] :- Dist < 7500.
|
||||
distance(Dist) == ['about.ogg', '8.ogg', 'kilometers-e.ogg'] :- Dist < 8500.
|
||||
distance(Dist) == ['about.ogg', '9.ogg', 'kilometers-e.ogg'] :- Dist < 9500.
|
||||
distance(Dist) == [X, 'kilometers-e.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):- flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
|
@ -1,119 +0,0 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['giro_a.ogg', 'izquierda.ogg']).
|
||||
turn('left_sh', ['giro_fuerte.ogg', 'izquierda.ogg']).
|
||||
turn('left_sl', ['giro_leve.ogg', 'izquierda.ogg']).
|
||||
turn('right', ['giro_a.ogg', 'derecha.ogg']).
|
||||
turn('right_sh', ['giro_fuerte.ogg', 'derecha.ogg']).
|
||||
turn('right_sl', ['giro_leve.ogg', 'derecha.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['despues_de.ogg', delay_450, D,'prepararse_para.ogg', delay_450, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['despues_de.ogg', delay_250, D, delay_250, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == [ 'despues_de.ogg', delay_300, D,'prepararse_para.ogg', delay_300,'giro_en_u.ogg'] :- distance(Dist) == D.
|
||||
make_ut(Dist) == ['despues_de.ogg', delay_300, D, delay_300, 'giro_en_u.ogg'] :- distance(Dist) == D.
|
||||
make_ut == ['giro_en_u.ogg'].
|
||||
make_ut_wp == ['giro_en_u.ogg'].
|
||||
|
||||
prepare_roundabout(Dist) == [ 'despues_de.ogg', delay_300, D,'prepara_entrar.ogg'] :- distance(Dist) == D.
|
||||
roundabout(Dist, _Angle, Exit) == ['despues_de.ogg', delay_300, D, delay_300, 'entrar_glorieta.ogg', delay_250, 'y_tomar.ogg',
|
||||
delay_250, E, 'salida.ogg'] :- distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['tomando la.ogg', delay_250, E, 'salida.ogg'] :- nth(Exit, E).
|
||||
|
||||
go_ahead == ['siga.ogg'].
|
||||
go_ahead(Dist) == ['siga_por.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
|
||||
and_arrive_destination == ['destino.ogg'].
|
||||
|
||||
then == ['entonces.ogg', delay_350].
|
||||
reached_destination == ['llegado.ogg'].
|
||||
bear_right == ['mantener_derecha.ogg'].
|
||||
bear_left == ['mantener_izquierda.ogg'].
|
||||
|
||||
route_new_calc(Dist) == ['eltrayecto.ogg', D] :- distance(Dist) == D.
|
||||
route_recalc(Dist) == ['recalcular.ogg', D] :- distance(Dist) == D.
|
||||
|
||||
location_lost == ['gps_signal_lost.ogg'].
|
||||
|
||||
|
||||
%%
|
||||
nth(1, 'primera.ogg').
|
||||
nth(2, 'segunda.ogg').
|
||||
nth(3, 'tercera.ogg').
|
||||
nth(4, 'cuarta.ogg').
|
||||
nth(5, 'quinta.ogg').
|
||||
nth(6, 'sexta.ogg').
|
||||
nth(7, 'septima.ogg').
|
||||
nth(8, 'octava.ogg').
|
||||
nth(9, 'novena.ogg').
|
||||
nth(10, 'decima.ogg').
|
||||
nth(11, 'once.ogg').
|
||||
nth(12, 'doce.ogg').
|
||||
nth(13, 'trece.ogg').
|
||||
nth(14, 'catorce.ogg').
|
||||
nth(15, 'quince.ogg').
|
||||
nth(16, 'diezseis.ogg').
|
||||
nth(17, 'diezsiete.ogg').
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == T :- Dist < 1000, dist(Dist, F), append(F, 'metros.ogg',T).
|
||||
dist(D, ['diez.ogg']) :- D < 15, !.
|
||||
dist(D, ['veinte.ogg']) :- D < 25, !.
|
||||
dist(D, ['treinta.ogg']) :- D < 35, !.
|
||||
dist(D, ['cuarenta.ogg']) :- D < 45, !.
|
||||
dist(D, ['cincuenta.ogg']) :- D < 55, !.
|
||||
dist(D, ['sesenta.ogg']) :- D < 65, !.
|
||||
dist(D, ['setenta.ogg']) :- D < 75, !.
|
||||
dist(D, ['ochenta.ogg']) :- D < 85, !.
|
||||
dist(D, ['noventa.ogg']) :- D < 95, !.
|
||||
dist(D, ['cien.ogg']) :- D < 125, !.
|
||||
dist(D, ['ciento.ogg', 'cincuenta.ogg']) :- D < 175, !.
|
||||
dist(D, ['dos.ogg','cientos.ogg']) :- D < 225, !.
|
||||
dist(D, ['dos.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 275, !.
|
||||
dist(D, ['tres.ogg','cientos.ogg']) :- D < 325, !.
|
||||
dist(D, ['tres.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 375, !.
|
||||
dist(D, ['cuatro.ogg','cientos.ogg']) :- D < 425, !.
|
||||
dist(D, ['cuatro.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 475, !.
|
||||
dist(D, ['quinientos.ogg']) :- D < 525, !.
|
||||
dist(D, ['quinientos.ogg', 'cincuenta.ogg']) :- D < 575, !.
|
||||
dist(D, ['seis.ogg','cientos.ogg']) :- D < 625, !.
|
||||
dist(D, ['seis.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 675, !.
|
||||
dist(D, ['setescientos.ogg']) :- D < 725, !.
|
||||
dist(D, ['setescientos.ogg', 'cincuenta.ogg']) :- D < 775, !.
|
||||
dist(D, ['ocho.ogg','cientos.ogg']) :- D < 825, !.
|
||||
dist(D, ['ocho.ogg','cientos.ogg', 'cincuenta.ogg']) :- D < 875, !.
|
||||
dist(D, ['novecientos.ogg']) :- D < 925, !.
|
||||
dist(D, ['novecientos.ogg', 'cincuenta.ogg']) :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['cerca.ogg', 'un.ogg', 'kilometro.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['cerca.ogg', 'dos.ogg', 'kilometros.ogg'] :- Dist < 2500.
|
||||
distance(Dist) == ['cerca.ogg', 'tres.ogg', 'kilometros.ogg'] :- Dist < 3500.
|
||||
distance(Dist) == ['cerca.ogg', 'cuatro.ogg', 'kilometros.ogg'] :- Dist < 4500.
|
||||
distance(Dist) == ['cerca.ogg', 'cinco.ogg', 'kilometros.ogg'] :- Dist < 5500.
|
||||
distance(Dist) == ['cerca.ogg', 'seis.ogg', 'kilometros.ogg'] :- Dist < 6500.
|
||||
distance(Dist) == ['cerca.ogg', 'siete.ogg', 'kilometros.ogg'] :- Dist < 7500.
|
||||
distance(Dist) == ['cerca.ogg', 'ocho.ogg', 'kilometros.ogg'] :- Dist < 8500.
|
||||
distance(Dist) == ['cerca.ogg', 'nueve.ogg', 'kilometros.ogg'] :- Dist < 9500.
|
||||
distance(Dist) == ['cerca.ogg', X, 'kilometros.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):- flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
|
@ -1,111 +0,0 @@
|
|||
:- op('==', xfy, 500).
|
||||
version(0).
|
||||
|
||||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['turn.ogg', delay_350, 'left.ogg']).
|
||||
turn('left_sh', ['turn_sharply.ogg', delay_350, 'left.ogg']).
|
||||
turn('left_sl', ['turn_slightly_left.ogg']).
|
||||
turn('right', ['turn.ogg', delay_350, 'right.ogg']).
|
||||
turn('right_sh', ['turn_sharply.ogg', delay_350,'right.ogg']).
|
||||
turn('right_sl', ['turn_slightly_right.ogg']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Prepare_to.ogg', 'in.ogg', delay_300, D, delay_300, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['in.ogg', delay_250, D, delay_250, M] :- distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == ['Prepare_to.ogg', 'in.ogg', delay_300, D, delay_300,'Turn_back.ogg'] :- distance(Dist) == D.
|
||||
make_ut(Dist) == ['in.ogg', delay_300, D, delay_300, 'Turn_back.ogg'] :- distance(Dist) == D.
|
||||
make_ut == ['Turn_back.ogg'].
|
||||
make_ut_wp == ['Turn_back.ogg'].
|
||||
|
||||
prepare_roundabout(Dist) == ['Prepare_to.ogg', 'in.ogg', delay_300, D, delay_300, 'roundabout.ogg'] :- distance(Dist) == D.
|
||||
roundabout(Dist, _Angle, Exit) == ['in.ogg', delay_300, D, delay_300, 'roundabout.ogg', delay_250, 'DO.ogg', delay_250, E, 'the_exit.ogg'] :-
|
||||
distance(Dist) == D, nth(Exit, E).
|
||||
roundabout(_Angle, Exit) == ['DO.ogg', delay_250, E, 'the_exit.ogg'] :- nth(Exit, E).
|
||||
|
||||
go_ahead == ['continue.ogg', 'stright.ogg'].
|
||||
go_ahead(Dist) == ['Drive.ogg', delay_250, D]:- distance(Dist) == D.
|
||||
|
||||
and_arrive_destination == ['arrive_at_destination.ogg'].
|
||||
|
||||
then == ['then.ogg', delay_350].
|
||||
reached_destination == ['you_reached.ogg',delay_250, 'TO_DESTINATION.ogg'].
|
||||
bear_right == ['bear_right.ogg'].
|
||||
bear_left == ['bear_left.ogg'].
|
||||
|
||||
route_new_calc(Dist) == ['have_a_nice_trip_drive_carefully.ogg', delay_150, D] :- distance(Dist) == D.
|
||||
route_recalc(Dist) == ['recalc.ogg', delay_150, D]:- distance(Dist) == D.
|
||||
|
||||
location_lost == ['gps_signal_lost.ogg'].
|
||||
|
||||
|
||||
%%
|
||||
nth(1, '1st.ogg').
|
||||
nth(2, '2nd.ogg').
|
||||
nth(3, '3rd.ogg').
|
||||
nth(4, '4th.ogg').
|
||||
nth(5, '5th.ogg').
|
||||
nth(6, '6th.ogg').
|
||||
nth(7, '7th.ogg').
|
||||
nth(8, '8th.ogg').
|
||||
nth(9, '9th.ogg').
|
||||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [F, 'meters.ogg'] :- Dist < 1000, dist(Dist, F).
|
||||
dist(D, '10.ogg') :- D < 15, !.
|
||||
dist(D, '20.ogg') :- D < 25, !.
|
||||
dist(D, '30.ogg') :- D < 35, !.
|
||||
dist(D, '40.ogg') :- D < 45, !.
|
||||
dist(D, '50.ogg') :- D < 55, !.
|
||||
dist(D, '60.ogg') :- D < 65, !.
|
||||
dist(D, '70.ogg') :- D < 75, !.
|
||||
dist(D, '80.ogg') :- D < 85, !.
|
||||
dist(D, '90.ogg') :- D < 95, !.
|
||||
dist(D, '100.ogg') :- D < 125, !.
|
||||
dist(D, '150.ogg') :- D < 175, !.
|
||||
dist(D, '200.ogg') :- D < 225, !.
|
||||
dist(D, '250.ogg') :- D < 275, !.
|
||||
dist(D, '300.ogg') :- D < 325, !.
|
||||
dist(D, '350.ogg') :- D < 375, !.
|
||||
dist(D, '400.ogg') :- D < 425, !.
|
||||
dist(D, '450.ogg') :- D < 475, !.
|
||||
dist(D, '500.ogg') :- D < 525, !.
|
||||
dist(D, '550.ogg') :- D < 575, !.
|
||||
dist(D, '600.ogg') :- D < 625, !.
|
||||
dist(D, '650.ogg') :- D < 675, !.
|
||||
dist(D, '700.ogg') :- D < 725, !.
|
||||
dist(D, '750.ogg') :- D < 775, !.
|
||||
dist(D, '800.ogg') :- D < 825, !.
|
||||
dist(D, '850.ogg') :- D < 875, !.
|
||||
dist(D, '900.ogg') :- D < 925, !.
|
||||
dist(D, '950.ogg') :- !.
|
||||
|
||||
|
||||
distance(Dist) == ['about.ogg', '1.ogg', 'kilometr.ogg'] :- Dist < 1500.
|
||||
distance(Dist) == ['about.ogg', '2.ogg', 'kilometra.ogg'] :- Dist < 2500.
|
||||
distance(Dist) == ['about.ogg', '3.ogg', 'kilometra.ogg'] :- Dist < 3500.
|
||||
distance(Dist) == ['about.ogg', '4.ogg', 'kilometra.ogg'] :- Dist < 4500.
|
||||
distance(Dist) == ['about.ogg', '5.ogg', 'kilometrov.ogg'] :- Dist < 5500.
|
||||
distance(Dist) == ['about.ogg', '6.ogg', 'kilometrov.ogg'] :- Dist < 6500.
|
||||
distance(Dist) == ['about.ogg', '7.ogg', 'kilometrov.ogg'] :- Dist < 7500.
|
||||
distance(Dist) == ['about.ogg', '8.ogg', 'kilometrov.ogg'] :- Dist < 8500.
|
||||
distance(Dist) == ['about.ogg', '9.ogg', 'kilometrov.ogg'] :- Dist < 9500.
|
||||
distance(Dist) == ['about.ogg', X, 'kilometrov.ogg'] :- D is Dist/1000, dist(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
%% if you are familar with Prolog you can input specific to the whole mechanism,
|
||||
%% by adding exception cases.
|
||||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):- flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
resolve_impl([],[]).
|
||||
resolve_impl([X|Rest], List) :- resolve_impl(Rest, Tail), ((X == L) -> append(L, Tail, List); List = Tail).
|
|
@ -284,14 +284,12 @@ extern "C" JNIEXPORT jobject JNICALL Java_net_osmand_NativeLibrary_generateRende
|
|||
req->setIntFilter(req->props()->R_MINZOOM, rc.getZoom());
|
||||
if (req->searchRenderingAttribute("defaultColor")) {
|
||||
rc.setDefaultColor(req->getIntPropertyValue(req->props()->R_ATTR_INT_VALUE));
|
||||
osmand_log_print(LOG_INFO, "shadow color %x default %x", rc.getShadowRenderingColor(), rc.getDefaultColor());
|
||||
}
|
||||
req->clearState();
|
||||
req->setIntFilter(req->props()->R_MINZOOM, rc.getZoom());
|
||||
if (req->searchRenderingAttribute("shadowRendering")) {
|
||||
rc.setShadowRenderingMode(req->getIntPropertyValue(req->props()->R_ATTR_INT_VALUE));
|
||||
rc.setShadowRenderingColor(req->getIntPropertyValue(req->props()->R_SHADOW_COLOR));
|
||||
osmand_log_print(LOG_INFO, "shadow color %x default %x", rc.getShadowRenderingColor(), rc.getDefaultColor());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue