Skip to content

Commit

Permalink
Changed default behavior to poll on serial port
Browse files Browse the repository at this point in the history
Because linux doesn't fire the callback...
  • Loading branch information
xenovacivus committed Mar 31, 2014
1 parent 8fc62a3 commit 5a71704
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Serial/SerialPortWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ public SerialPortWrapper()
port.Encoding = System.Text.Encoding.Default;

// Earlier versions of Mono don't fire this event, so poll instead.
port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
//port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
System.Timers.Timer t = new System.Timers.Timer(10);
//t.Elapsed += t_Elapsed;
//t.Start();
t.Elapsed += t_Elapsed;
t.Start();
}

void t_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
Expand Down

0 comments on commit 5a71704

Please sign in to comment.