 unsigned long lastAccTime = 0;
 float xVelocity = 0.0;
 
+int throttleBluetoothOut = 0;
+
 #if AccelerometerNewDataInterrupt
 // tells that accelerometer data is ready (with interrupt)
 volatile bool accDataReady = false;

// declarations
void setupBluetooth();
bool setupAccelerometer();
inline float getUnfilteredXAcc();
inline float getXAccSample();
void calibrateZeroVel();

#endif

    int throttleIn = getThrottleSample();
    int throttleSensorOut = 126 + ((float)(1023 - throttleIn)) / 1023.0 * 126.0 ;


    while (Bluetooth.available()) {
        switch (Bluetooth.read()) {
            case 'X':
                errorStop();
                break;
            case 'G':
                throttleBluetoothOut = 126 + constrain(Bluetooth.parseInt()*1.26, 0, 126);
                break;
            default:
                break;
        }
        if (Bluetooth.available() && Bluetooth.read() == '\n') continue;
    }

#if SendThrottleDebug
    Bluetooth.print('E');
    Bluetooth.print(throttleIn);
    Bluetooth.print(',');
    Bluetooth.print(((int)throttleSensorOut) * 8);
    Bluetooth.print(',');
    Bluetooth.print(((int)throttleBluetoothOut) * 8);
    Bluetooth.println();
#endif

    analogWrite(ThrottleOut, (byte) ((throttleBluetoothOut > 0) ? throttleBluetoothOut : throttleSensorOut) );
}

inline float getUnfilteredXAcc() {
