mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 18:38:28 -04:00
APM Planner - fix timeout bug
This commit is contained in:
parent
ce4437578a
commit
b00487513b
@ -1865,7 +1865,7 @@ namespace ArdupilotMega
|
|||||||
int readcount = 0;
|
int readcount = 0;
|
||||||
lastbad = new byte[2];
|
lastbad = new byte[2];
|
||||||
|
|
||||||
BaseStream.ReadTimeout = 100;
|
BaseStream.ReadTimeout = 500; // 500 ms between chars
|
||||||
|
|
||||||
DateTime start = DateTime.Now;
|
DateTime start = DateTime.Now;
|
||||||
|
|
||||||
|
@ -257,6 +257,11 @@ namespace ArdupilotMega
|
|||||||
|
|
||||||
string[] ports = SerialPort.GetPortNames();
|
string[] ports = SerialPort.GetPortNames();
|
||||||
|
|
||||||
|
for (int a = 0; a < ports.Length; a++)
|
||||||
|
{
|
||||||
|
ports[a] = ports[a].TrimEnd();
|
||||||
|
}
|
||||||
|
|
||||||
string[] all = new string[devs.Length + ports.Length];
|
string[] all = new string[devs.Length + ports.Length];
|
||||||
|
|
||||||
devs.CopyTo(all, 0);
|
devs.CopyTo(all, 0);
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user