implement calling "Make UT when possible" voice prompt
This commit is contained in:
parent
7fcb0436c2
commit
b54ba6572a
3 changed files with 7 additions and 1 deletions
|
@ -80,6 +80,7 @@ public class TestVoiceActivity extends Activity {
|
|||
addButton(ll, "Prepare to make a U-turn after 400m", builder(p).prepareMakeUT(400));
|
||||
addButton(ll, "Make a U-turn after 640m", builder(p).makeUT(640));
|
||||
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));
|
||||
addButton(ll, "After 450m enter the roundabout and take the 1st exit", builder(p).roundAbout(450, 0, 1));
|
||||
addButton(ll, "Roundabout: Take the 3rd exit", builder(p).roundAbout(0, 3));
|
||||
|
|
|
@ -163,7 +163,7 @@ public class VoiceRouter {
|
|||
if (System.currentTimeMillis() - lastTimeMakeUTwpAnnounced > 60000) {
|
||||
CommandBuilder play = getNewCommandPlayerToPlay();
|
||||
if(play != null){
|
||||
play.makeUT().play();
|
||||
play.makeUTwp().play();
|
||||
lastTimeMakeUTwpAnnounced = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ public class CommandBuilder {
|
|||
protected static final String C_GO_AHEAD = "go_ahead"; //$NON-NLS-1$
|
||||
protected static final String C_TURN = "turn"; //$NON-NLS-1$
|
||||
protected static final String C_MAKE_UT = "make_ut"; //$NON-NLS-1$
|
||||
protected static final String C_MAKE_UTWP = "make_ut_wp"; //$NON-NLS-1$
|
||||
protected static final String C_PREAMBLE = "preamble"; //$NON-NLS-1$
|
||||
protected static final String C_AND_ARRIVE_DESTINATION = "and_arrive_destination"; //$NON-NLS-1$
|
||||
protected static final String C_THEN = "then"; //$NON-NLS-1$
|
||||
|
@ -95,6 +96,10 @@ public class CommandBuilder {
|
|||
return addCommand(C_GO_AHEAD, dist);
|
||||
}
|
||||
|
||||
public CommandBuilder makeUTwp(){
|
||||
return addCommand(C_MAKE_UTWP);
|
||||
}
|
||||
|
||||
public CommandBuilder makeUT(){
|
||||
return addCommand(C_MAKE_UT);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue