Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • am-dept/tlambert/MR-arduino-controller
1 result
Show changes
Commits on Source (2)
...@@ -91,7 +91,7 @@ uint8_t gEsc_val = 0; // ESC angle (to use with the Servo l ...@@ -91,7 +91,7 @@ uint8_t gEsc_val = 0; // ESC angle (to use with the Servo l
String gMode; // Mode of operation String gMode; // Mode of operation
uint16_t gAngleOffset[] = { 0, 0, 1, 0 }; // Encoder offset (prevent wrap-around) uint16_t gAngleOffset[] = { 0, 0, 1, 0 }; // Encoder offset (prevent wrap-around)
uint16_t gMaxWingPos[] = MAX_WING_POS; // Encoder maximum recorder position uint16_t gMaxWingPos[] = MAX_WING_POS; // Encoder maximum recorder position
int gStartTime; // Loop start time
/******************************************************************************* /*******************************************************************************
ARDUINO SETUP ARDUINO SETUP
...@@ -142,6 +142,8 @@ void setup() { ...@@ -142,6 +142,8 @@ void setup() {
delay(1000); // Ensure proper initialization delay(1000); // Ensure proper initialization
Serial.println("[INFO]: Setup OK, starting now..."); Serial.println("[INFO]: Setup OK, starting now...");
delay(500); delay(500);
gStartTime = millis();
} }
...@@ -260,7 +262,7 @@ void SerialPrint(String mode, int potent, int esc_val, unsigned int wing_angles[ ...@@ -260,7 +262,7 @@ void SerialPrint(String mode, int potent, int esc_val, unsigned int wing_angles[
Serial.print("/*"); // Beginning of data stream Serial.print("/*"); // Beginning of data stream
Serial.print(mode); Serial.print(mode);
Serial.print(","); Serial.print(",");
Serial.print(millis() / 1000.0); Serial.print((millis() - gStartTime) / 1000.0);
Serial.print(","); Serial.print(",");
Serial.print(potent * 5.0 / 1023.0); // Converts pot val into proper tension Serial.print(potent * 5.0 / 1023.0); // Converts pot val into proper tension
Serial.print(","); Serial.print(",");
......
...@@ -155,8 +155,8 @@ ...@@ -155,8 +155,8 @@
"graph": false, "graph": false,
"led": false, "led": false,
"log": false, "log": false,
"max": 45, "max": 0,
"min": -45, "min": 0,
"title": "Left", "title": "Left",
"units": "°", "units": "°",
"value": "%10", "value": "%10",
...@@ -169,8 +169,8 @@ ...@@ -169,8 +169,8 @@
"graph": false, "graph": false,
"led": false, "led": false,
"log": false, "log": false,
"max": 45, "max": 0,
"min": -45, "min": 0,
"title": "Right", "title": "Right",
"units": "°", "units": "°",
"value": "%11", "value": "%11",
...@@ -189,8 +189,8 @@ ...@@ -189,8 +189,8 @@
"graph": false, "graph": false,
"led": false, "led": false,
"log": false, "log": false,
"max": 45, "max": 0,
"min": -45, "min": 0,
"title": "Left", "title": "Left",
"units": "°", "units": "°",
"value": "%12", "value": "%12",
...@@ -203,8 +203,8 @@ ...@@ -203,8 +203,8 @@
"graph": false, "graph": false,
"led": false, "led": false,
"log": false, "log": false,
"max": 45, "max": 0,
"min": -45, "min": 0,
"title": "Right", "title": "Right",
"units": "°", "units": "°",
"value": "%13", "value": "%13",
......