 void set_throttle_position(int pos) {
   //dont set unless a delta has been acheived
   if (abs(throttle_pos - pos)/2.0 < THROTTLE_SENSITIVITY){
-    return;
-  }
-  
+    if (abs(pos) <= 5){
+      pos = 0;
+    }
+    else {
+      //not a big of change to change noise
+      return;
+    }
+
+    //if this value has already been set zero, no reason to set it again
+    if (throttle_pos == 0) {
+      return;
+    }
+  }
+  
+
+  //determine if in reverse
+  if (pos > 0){
+    in_reverse = false;
+  }
+  else if (throttle_pos == 0){
+    //only go in reverse if the throttle was zero
+    in_reverse = true;
+  }
+
+
+  //dont allow input past the limits, note we only limit reverse if the 
+  //standing throttle position is at zero. This allows for full breaking
+  if (in_reverse){
+    pos = max(_GOVERNER_R, pos);
+  }
+  
+  pos = min(_GOVERNER_F, pos);
+
   throttle_pos = pos;
   Serial.println(String("V79-T:") + throttle_pos);
 
+  //note!!!!! the 1000 and 2000 here are the min and max PWM that the controller accepts
   int map_throttle = map(pos, -100, 100, 1000, 2000);
-  //set minimum is 1400 for reverse and 1550 for slow forward
-  if (map_throttle < 1200) {
-    map_throttle = 1200;
-  }
-  if (map_throttle > _GOVERNER) {
-    map_throttle = _GOVERNER;
-  }
+  
 
   throttle_servo.writeMicroseconds(map_throttle);
 }

*/
#include <Servo.h>


const int STEER_IN = 5;
const int STEER_OUT = 9;
const int STEER_BASE = 1277;
const int STEER_MIN = 847;
const int STEER_MAX = 1710;
const float STEER_SENSITIVITY = 1.0;

const int THROTTLE_IN = 6;
const int THROTTLE_OUT = 11;
const int THROTTLE_BASE = 1273;
const int THROTTLE_MIN = 843;
const int THROTTLE_MAX = 1710;
const float THROTTLE_SENSITIVITY = 1.0;

const int LED_GREEN = 4;
const int LED_RED = 3;

const int RPM_INTERRUPT = 0; //pin 2

int _STEER_BIAS = 0; //set this to adjust steering
int _GOVERNER = 1710; //cap the forward speed


//servos

        _STEER_BIAS = command.toInt();
      }

      //governer forward
      if (command.startsWith("GF")) {
        command.replace("GF", " ");
        command.trim();
        if (command.toInt() > 0) {
          _GOVERNER_F = command.toInt();
        }
      }

