Skip to content

Commit

Permalink
fix hid delay when serial monitor/program not open
Browse files Browse the repository at this point in the history
  • Loading branch information
vospascal committed Mar 28, 2021
1 parent 7d1b47d commit 8df3a32
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pedaal/pedaal.ino
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,15 @@ void loop() {
String clutchStringValues = ClutchBefore + p1 + ClutchAfter + p1 + clutchRawValue + p1 + ClutchBeforeHID + cm;
String clutchString = clutchStringPrefix + clutchStringValues;

Serial.println(throttleString + brakeString + clutchString);

Joystick.sendState(); // Update the Joystick status on the PC
// Serial.flush();
// delay(150);

// timing
if (Serial.availableForWrite ()) {
Serial.println(throttleString + brakeString + clutchString);
}

// delay(150);
// timing
// unsigned long end = micros();
// unsigned long delta = end - start;
// Serial.println(delta);
Expand Down

0 comments on commit 8df3a32

Please sign in to comment.