Skip to content

Commit

Permalink
Cultureinfo to ToUpper (#3383)
Browse files Browse the repository at this point in the history
Some languages (Turkish for example) converts small case i to a special character.
  • Loading branch information
EosBandi committed Jul 30, 2024
1 parent 849a648 commit 25b7ca9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GCSViews/FlightData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1774,12 +1774,12 @@ private void BUTactiondo_Click(object sender, EventArgs e)
MAVLink.MAV_CMD cmd;
try
{
cmd = (MAVLink.MAV_CMD) Enum.Parse(typeof(MAVLink.MAV_CMD), CMB_action.Text.ToUpper());
cmd = (MAVLink.MAV_CMD) Enum.Parse(typeof(MAVLink.MAV_CMD), CMB_action.Text.ToUpper(CultureInfo.InvariantCulture));
}
catch (ArgumentException ex)
{
cmd = (MAVLink.MAV_CMD) Enum.Parse(typeof(MAVLink.MAV_CMD),
"DO_START_" + CMB_action.Text.ToUpper());
"DO_START_" + CMB_action.Text.ToUpper(CultureInfo.InvariantCulture));
}

if (MainV2.comPort.doCommand(cmd, param1, param2, param3, 0, 0, 0, 0))
Expand Down Expand Up @@ -4463,9 +4463,9 @@ private void quickView_DoubleClick(object sender, EventArgs e)
}
else
{
var fieldDesc = MainV2.comPort.MAV.cs.GetFieldDesc(field.Name);
max_length = Math.Max(max_length, TextRenderer.MeasureText(fieldDesc, selectform.Font).Width);
fields.Add((field.Name, fieldDesc));
var fieldDesc = MainV2.comPort.MAV.cs.GetFieldDesc(field.Name);
max_length = Math.Max(max_length, TextRenderer.MeasureText(fieldDesc, selectform.Font).Width);
fields.Add((field.Name, fieldDesc));
}
}

Expand Down

0 comments on commit 25b7ca9

Please sign in to comment.