[chronojump] ForceSensorSimulator.ino with negative values
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensorSimulator.ino with negative values
- Date: Mon, 7 Jan 2019 13:24:49 +0000 (UTC)
commit 1bca1d8baf8a130a7b6bb74b57a02fcb0259f312
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jan 7 14:23:58 2019 +0100
ForceSensorSimulator.ino with negative values
arduino/ForceSensorSimulator/ForceSensorSimulator.ino | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
b/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
index 7ac09a4c..48b6275c 100644
--- a/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
+++ b/arduino/ForceSensorSimulator/ForceSensorSimulator.ino
@@ -60,7 +60,7 @@ void loop(void)
//sendLong(initSymbol); //sembla que abans dels 4 255 aixo envia 2 bytes que no son 255, o aquests 2
bytes van al final dels 4 del for
//sendLong(micros());
- int currentSimulatedValue = 0;
+ int currentSimulatedValue = -100;
for (int i = 0; i < 100; i++)
{
@@ -95,6 +95,9 @@ void loop(void)
sendInt(currentSimulatedValue ++);
sendInt(currentSimulatedValue ++);
sendInt(currentSimulatedValue ++);
+
+ if(currentSimulatedValue > 100)
+ currentSimulatedValue = -100;
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]