[chronojump] ForceSensor connect adjust previous tare and calibrate
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor connect adjust previous tare and calibrate
- Date: Mon, 30 Oct 2017 12:22:19 +0000 (UTC)
commit e37b29f5b0ab2eaa42aac1b5a2ea9f1512975256
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Oct 30 13:21:13 2017 +0100
ForceSensor connect adjust previous tare and calibrate
src/gui/forceSensor.cs | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index cfa0ca6..a48cf7d 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -141,6 +141,15 @@ public partial class ChronoJumpWindow
return false;
}
+ //set adjust parameters
+ if(! forceSensorSendCommand("set_tare:" + preferences.forceSensorTare.ToString() + ";",
+ "Connecting ...", "Catched adjusting tare"))
+ return false;
+
+ if(! forceSensorSendCommand("set_calibration_factor:" +
preferences.forceSensorCalibrationFactor.ToString() + ";",
+ "Connecting ...", "Catched adjusting calibration factor"))
+ return false;
+
portFSOpened = true;
Thread.Sleep(2500); //sleep to let arduino start reading
forceSensorOtherMessage = "Connected!";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]