I keep getting the error:
"No overload for
Anyone knows what
Thanks.
I have 2 methods reading from 2 serial ports.
I wish to have a watchdog timer that will activate the other port if a port does not get data within certain time.
(Normally, if data was received, it will reset the timer for each data cycle. If the timer does not resets (Stop) within certain time (no data), we open the other port).
Here is what I have: (in general terms...)
System.Windows.Forms.Timer wait= new System.Windows.Forms.Timer();
private void comPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
//some code
}
public void comPort2_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
if wait.Interval> {do something}
wait.Tick += new EventHandler(comPort1_DataReceived);
wait.Interval = 500;
wait.Start();
// Code
wait.Stop();
}
Zoran HorvatPosted Nov 15, 2010, 4:01 PM