-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
base: master
Are you sure you want to change the base?
changed wp speech #1728
Conversation
…s "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"); |
There was a problem hiding this comment.
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?
Hadn't realized I removed that, added back. |
} | ||
else | ||
{ | ||
input = input.Replace("{wpn}", MainV2.comPort.MAV.cs.wpno.ToString()); |
There was a problem hiding this comment.
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?
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}", ""); |
There was a problem hiding this comment.
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
303616c
to
d3b17db
Compare
0614891
to
7d31d41
Compare
to say guided and return to launch instead of always "headed to waypoint"