[chronojump] Discover gui workin ok for raceAnalyzer
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Discover gui workin ok for raceAnalyzer
- Date: Tue, 7 Jun 2022 10:39:58 +0000 (UTC)
commit 27807a9d31a42dd9402667f4bd2c5e54eb0ba233
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jun 7 12:39:39 2022 +0200
Discover gui workin ok for raceAnalyzer
src/gui/app1/forceSensor.cs | 2 +-
src/gui/app1/runEncoder.cs | 15 +++------------
2 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index ce04274d3..92d5e2f97 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -267,7 +267,7 @@ public partial class ChronoJumpWindow
{
forceSensorOtherMessage = "Connecting ...";
- portFS = new SerialPort (chronopicRegister.GetSelectedForMode (current_mode), 115200);
//forceSensor
+ portFS = new SerialPort (chronopicRegister.GetSelectedForMode (current_mode), 115200);
LogB.Information(" FS connect 4: opening port...");
try {
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index f61274b17..1bbabb2c6 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -220,24 +220,16 @@ public partial class ChronoJumpWindow
private bool runEncoderConnect()
{
LogB.Information(" RE connect 0 ");
- if(chronopicRegister.ConnectedOfType(ChronopicRegisterPort.Types.ARDUINO_RUN_ENCODER) == null)
+ if (chronopicRegister.GetSelectedForMode (current_mode) == "")
{
runEncoderPulseMessage = runEncoderNotConnectedString;
return false;
}
LogB.Information(" RE connect 1 ");
- runEncoderPortName =
chronopicRegister.ConnectedOfType(ChronopicRegisterPort.Types.ARDUINO_RUN_ENCODER).Port;
- LogB.Information(" RE connect 2 ");
- if(runEncoderPortName == null || runEncoderPortName == "")
- {
- runEncoderPulseMessage = "Please, select port!";
- return false;
- }
- LogB.Information(" RE connect 3 ");
runEncoderPulseMessage = "Connecting ...";
- portRE = new SerialPort(runEncoderPortName, 115200); //runEncoder
+ portRE = new SerialPort (chronopicRegister.GetSelectedForMode (current_mode), 115200);
LogB.Information(" RE connect 4: opening port...");
try {
@@ -401,8 +393,7 @@ public partial class ChronoJumpWindow
//if graphs are not updated with the line, use this that will fire ExposeEvent:
//drawingarea_race_analyzer_capture_position_time.QueueDraw(); and the others
-
- if(chronopicRegister.NumConnectedOfType(ChronopicRegisterPort.Types.ARDUINO_RUN_ENCODER) == 0)
+ if (chronopicRegister.GetSelectedForMode (current_mode) == "")
{
event_execute_label_message.Text = runEncoderNotConnectedString;
runEncoderButtonsSensitive(true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]