     float x = getUnfilteredXAcc();
 
     if (abs(x) < ZeroResetCounterEps)
-        zeroResetCounter < MaxZeroCounter ? ++zeroResetCounter : 0 ;
+        zeroResetCounter +=
+            (zeroResetCounter < MaxZeroCounter) ? 2 : 0 ;
     else
         zeroResetCounter = (float) zeroResetCounter * 0.4;
 
     Bluetooth.print('E');
     Bluetooth.print(x*1000);
     Bluetooth.print(',');
-#if AccelerometerSoftLPFilter
+#if AccelerometerSoftFilter
     lpFilter.input(x);
     x = lpFilter.output();
 #endif

#define AccelerationRange MMA_RANGE_2G
#define AccelerationDataRate MMA_12_5hz
#define AccelerometerNewDataInterrupt 1
// Filter for 
#define AccelerometerSoftLPFilter 1



#if AccelerometerSoftLPFilter
#include <FilterOnePole.h>
#define LowpassFreq 0.005
auto lpFilter = FilterOnePole( LOWPASS, LowpassFreq );
#endif


    float x, y, z;
    mma.getAcceleration(&x, &y, &z);
    lastAccValue = x;
#if AccelerometerSoftFilter
    lpFilter.input(x);
#endif

