- Joined
- Mar 18, 2008
- Messages
- 1
- Reaction score
- 0
In my task I have to change the baudrate after having a specified string received but send an ACK before.
I'm trying to do this by placing the following line into "private void DataReceived":
this.Invoke(new EventHandler(Change_BaudRate));
Where Change_BaudRate closes the port, reconfigures and reopens it.
BUT the program crashes at the change, I guess because it is illegal to "call" a method that closes the port on DataReceived event.
I can't figure out how to do this,
thanks
I'm trying to do this by placing the following line into "private void DataReceived":
this.Invoke(new EventHandler(Change_BaudRate));
Where Change_BaudRate closes the port, reconfigures and reopens it.
BUT the program crashes at the change, I guess because it is illegal to "call" a method that closes the port on DataReceived event.
I can't figure out how to do this,
thanks