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

changed wp speech #1728

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

changed wp speech #1728

wants to merge 3 commits into from

Conversation

jelkins8
Copy link

to say guided and return to launch instead of always "headed to waypoint"

@@ -303,14 +303,15 @@ static void chk_CheckStateChanged(object sender, EventArgs e)

public static string speechConversion(string input)
{
if (MainV2.comPort.MAV.cs.wpno == 0)
{
input = input.Replace("{wpn}", "Home");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you apear to have removed this function here?

@jelkins8
Copy link
Author

Hadn't realized I removed that, added back.

}
else
{
input = input.Replace("{wpn}", MainV2.comPort.MAV.cs.wpno.ToString());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at no point are you putting in the actual waypoint number anymore?

@jelkins8
Copy link
Author

Sorry, missed that adding back the home check. Should be good now.

@@ -303,14 +303,20 @@ static void chk_CheckStateChanged(object sender, EventArgs e)

public static string speechConversion(string input)
{
if (MainV2.comPort.MAV.cs.mode != "Auto" && MainV2.comPort.MAV.cs.mode != "Guided" && MainV2.comPort.MAV.cs.mode != "RTL")
input = input.Replace("Heading to Waypoint {wpn}", "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason I haven't committed this is because input is a user defined string, and the replace is over bearing and will only hit one condition which a simple thing like case will invalidate it

@meee1 meee1 force-pushed the master branch 2 times, most recently from 303616c to d3b17db Compare August 23, 2019 00:49
@meee1 meee1 force-pushed the master branch 3 times, most recently from 0614891 to 7d31d41 Compare June 20, 2021 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants