/// <summary> /// The robot waits for the table-direction confirmation /// </summary> private int WaitForTableDirectionConfirmation(int currentState, object o) { TextBoxStreamWriter.DefaultLog.WriteLine("HAL9000.-> Waiting for direction confirmation"); //waits for an user voice confirmation if (this.brain.WaitForUserConfirmation()) { TextBoxStreamWriter.DefaultLog.WriteLine("HAL9000.-> Table direction confirmed"); brain.SayAsync(SMConfiguration.OkMessage); //the location and direction of the table is confirmed, register the location in MVNPLN cmdMan.MVN_PLN_addlocation(SMConfiguration.addTableLocation(currentTableNumber), currentTableDirection, 10000); //back to the follow-human state return((int)States.FollowHuman); } //the human says no, ask again for the direction of the table brain.SayAsync(SMConfiguration.TableDirectionAskingMessage); brain.recognizedSentences.Clear(); Thread.Sleep(100); return((int)States.WaitForTableDirectionCommand); }