[chronojump] arduino testing 250000 bitrate
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] arduino testing 250000 bitrate
- Date: Wed, 12 Sep 2018 11:54:59 +0000 (UTC)
commit 2efaa8262e4532a417fdc77b3d17593f2e2ee54e
Author: Xavier Padullés <x padulles gmail com>
Date: Tue Sep 4 17:30:33 2018 +0200
arduino testing 250000 bitrate
.../ForceSensorSimulator/ForceSensorSimulator.ino | 65 +++++++++++-----------
src/gui/chronojump.cs | 2 -
2 files changed, 33 insertions(+), 34 deletions(-)
---
diff --git a/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
b/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
index 6a45e2fe..d74353a0 100644
--- a/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
+++ b/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
@@ -43,6 +43,7 @@ void setup(void)
{
Serial.begin(115200);
+ //Serial.begin(250000);
loadCell.begin();
loadCell.setGain(GAIN_TWO);
@@ -62,40 +63,40 @@ void loop(void)
//sendLong(micros());
int current = 0;
-
+
for (int i = 0; i < 100; i++)
{
- currentTime = micros();
- //
- // //Reading each of the 4 sensors
- // for (int sensor = 0; sensor <= 3; sensor++)
- // {
- // offsettedData[sensor] = readOffsetedData(sensor);
- // // total[sensor] += offsettedData[sensor];
- // }
-
-
- Serial.write(0xff);
- Serial.write(0xff);
- Serial.write(0xff);
- Serial.write(0xff);
-
- //Managing the timer overflow
- if (currentTime > lastTime) //No overflow
- {
- elapsedTime = currentTime - lastTime;
- } else if (currentTime <= lastTime) //Overflow
- {
- elapsedTime = (4294967295 - lastTime) + currentTime; //Time from the last measure to the overflow
event plus the currentTime
- }
- totalTime += elapsedTime;
- lastTime = currentTime;
- sendLong(totalTime);
-
- sendInt(current++);
- sendInt(current++);
- sendInt(current++);
- sendInt(current++);
+ currentTime = micros();
+ //
+ // //Reading each of the 4 sensors
+ // for (int sensor = 0; sensor <= 3; sensor++)
+ // {
+ // offsettedData[sensor] = readOffsetedData(sensor);
+ // // total[sensor] += offsettedData[sensor];
+ // }
+
+
+ Serial.write(0xff);
+ Serial.write(0xff);
+ Serial.write(0xff);
+ Serial.write(0xff);
+
+ //Managing the timer overflow
+ if (currentTime > lastTime) //No overflow
+ {
+ elapsedTime = currentTime - lastTime;
+ } else if (currentTime <= lastTime) //Overflow
+ {
+ elapsedTime = (4294967295 - lastTime) + currentTime; //Time from the last measure to the overflow
event plus the currentTime
+ }
+ totalTime += elapsedTime;
+ lastTime = currentTime;
+ sendLong(totalTime);
+
+ sendInt(current++);
+ sendInt(current++);
+ sendInt(current++);
+ sendInt(current++);
}
}
}
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 78d00aef..ee977134 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -7170,8 +7170,6 @@ LogB.Debug("mc finished 5");
private void on_button_carles_clicked (object o, EventArgs args)
{
- new ForcePlatform();
-
/*
bool showInWindow = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]