Commit f286c113 authored by Xavier Padullés's avatar Xavier Padullés

Race analyzer. Added get_transmission_format function

parent 1c7ff2a6
......@@ -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");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment