   static char buffer[16];
 
   if (++count == 1000) { // silence or junk on the input line! (emergency stop support feature)
-    code = 'Q';
-    value = 0;
-    count = 0;
-    return true;
-  }
+    count = 0; // reset counter - this triggers once per second if no commands are input
+
+    if (bEnableSafetyStop) {
+      code = 'Q';
+      value = 0;
+      return true;
+    }
+    return false;
+  }
+
   while (Serial.available()) {
     char next = (char) Serial.read();
 

    Serial.print(T1);
    Serial.print(", T2=");
    Serial.print(T2);
    Serial.print("; acc: a=");
    Serial.print(a);
    Serial.print(", alpha=");


unsigned long previous_time = 0;

float target_vx = 0; // command-requested velocity vector components [-1..1]
float target_vy = 0; // where vx=-1 is left, vx=1 is right, vx=0 is straight

float actual_vx = 0; // actual velocity vector components [-1..1]
float actual_vy = 0; // e.g., calculated from encoders

float slip_left = 0; // traction to slip-threshold ratio
float slip_right = 0;

bool bEnableSafetyStop = true;

void setup() {
  Serial.begin(115200);
