[chronojump] Micro Discover finds encoder
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Micro Discover finds encoder
- Date: Mon, 2 May 2022 09:00:06 +0000 (UTC)
commit e7176d9422d29354055ceb9c71780d7da5ab7f49
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 2 10:59:33 2022 +0200
Micro Discover finds encoder
src/execute/arduinoCapture.cs | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/execute/arduinoCapture.cs b/src/execute/arduinoCapture.cs
index e119a549b..a62a5917d 100644
--- a/src/execute/arduinoCapture.cs
+++ b/src/execute/arduinoCapture.cs
@@ -491,7 +491,7 @@ public class MicroDiscover : MicroComms
private string forceSensorStr = "Force_Sensor-";
private string raceAnalyzerStr = "Race_Analyzer-";
private string wichroStr = "Wifi-Controller-"; //Will be used for Wichro and Quick, then user will
decide. "local:get_channel;" to know the channel
- //Chronopic encoder will send a J (115200)
+ private string encoderStr = "J"; //for encoder send a J and receive a J
//9600
private string rfidStr = "YES Chronojump RFID";
@@ -635,6 +635,18 @@ public class MicroDiscover : MicroComms
success = true;
}
}
+
+ if(! success) //try encoder (send J, receive J)
+ {
+ responseExpected_l = new List<string>();
+ responseExpected_l.Add(encoderStr);
+ if(getVersion ("J", responseExpected_l, true))
+ {
+ micro.Discovered = ChronopicRegisterPort.Types.ENCODER;
+ success = true;
+ }
+ }
+
flush(); //empty the port for future use
return success;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]