[chronojump] Race analyzer. Added get_transmission_format function
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Race analyzer. Added get_transmission_format function
- Date: Mon, 18 Feb 2019 16:28:44 +0000 (UTC)
commit f286c113f4a519a7ecac959ec5c14293dbef7108
Author: Xavier Padullés <x padulles gmail com>
Date: Mon Feb 18 17:13:20 2019 +0100
Race analyzer. Added get_transmission_format function
arduino/raceAnalyzer/raceAnalyzer.ino | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/arduino/raceAnalyzer/raceAnalyzer.ino b/arduino/raceAnalyzer/raceAnalyzer.ino
index 66da114c..6cbf5471 100644
--- a/arduino/raceAnalyzer/raceAnalyzer.ino
+++ b/arduino/raceAnalyzer/raceAnalyzer.ino
@@ -25,6 +25,9 @@ float calibrationFactor = 0;
//Wether the sensor has to capture or not
boolean capturing = false;
+//wether the tranmission is in binary format or not
+boolean binaryFormat = false;
+
void setup() {
pinMode (encoderPinA, INPUT);
pinMode (encoderPinB, INPUT);
@@ -124,6 +127,8 @@ void serialEvent()
get_pps();
} else if (commandString == "tare") {
tare();
+ } else if (commandString == "get_transmission_format"){
+ get_transmission_format();
// } else if (commandString == "get_calibration_factor") {
// get_calibration_factor();
// } else if (commandString == "set_calibration_factor") {
@@ -245,3 +250,14 @@ void sendFloat(float f) {
Serial.flush();
return;
}
+
+void get_transmission_format()
+{
+ if (binaryFormat)
+ {
+ Serial.print("binary");
+ } else
+ {
+ Serial.print("text");
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]