From 5a71704ccfa0d4e8b8f2ea6df508677e83c056d7 Mon Sep 17 00:00:00 2001 From: xenovacivus Date: Sun, 30 Mar 2014 17:11:30 -0700 Subject: [PATCH] Changed default behavior to poll on serial port Because linux doesn't fire the callback... --- Serial/SerialPortWrapper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Serial/SerialPortWrapper.cs b/Serial/SerialPortWrapper.cs index 4295475..2ee97af 100644 --- a/Serial/SerialPortWrapper.cs +++ b/Serial/SerialPortWrapper.cs @@ -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)