2011-09-08 22:31:32 -03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.IO.Ports;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace ArdupilotMega
|
|
|
|
|
{
|
|
|
|
|
class SerialPort : System.IO.Ports.SerialPort,ICommsSerial
|
|
|
|
|
{
|
|
|
|
|
|
2011-12-29 06:31:42 -04:00
|
|
|
|
|
|
|
|
|
public void toggleDTR()
|
|
|
|
|
{
|
2012-02-20 07:30:47 -04:00
|
|
|
|
base.DtrEnable = false;
|
|
|
|
|
base.RtsEnable = false;
|
|
|
|
|
|
|
|
|
|
System.Threading.Thread.Sleep(50);
|
|
|
|
|
|
|
|
|
|
base.DtrEnable = true;
|
|
|
|
|
base.RtsEnable = true;
|
|
|
|
|
|
|
|
|
|
System.Threading.Thread.Sleep(50);
|
2011-12-29 06:31:42 -04:00
|
|
|
|
}
|
2011-09-08 22:31:32 -03:00
|
|
|
|
}
|
|
|
|
|
}
|