From ad3bd87c8471124aa6173edffd7ebf99b166b81e Mon Sep 17 00:00:00 2001 From: murata Date: Sat, 26 Jun 2021 16:51:18 +0900 Subject: [PATCH] GCSViews: If the delay of WAYPOINT is set to less than 0, set it to 0 --- GCSViews/FlightPlanner.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/GCSViews/FlightPlanner.cs b/GCSViews/FlightPlanner.cs index 59e60a240a..a2c3b1ab1e 100644 --- a/GCSViews/FlightPlanner.cs +++ b/GCSViews/FlightPlanner.cs @@ -2940,7 +2940,16 @@ private Locationwp DataViewtoLocationwp(int a) false); } - temp.p1 = float.Parse(Commands.Rows[a].Cells[Param1.Index].Value.ToString()); + if (Commands.Rows[a].Cells[Command.Index].Value.Equals("WAYPOINT")) + { + temp.p1 = float.Parse(Commands.Rows[a].Cells[Param1.Index].Value.ToString()); + if (temp.p1 < 0) + { + temp.p1 = 0; + DataGridViewTextBoxCell cell = Commands.Rows[a].Cells[Param1.Index] as DataGridViewTextBoxCell; + cell.Value = temp.p1; + } + } temp.alt = (float)