def setTapDuration(self, duration):
    """ Sets the time in milliseconds that the acceleration in any axis must
        remain above the tap threshold for a tap to be detected.
    """
    duration /= 0.625
    duration = int(duration + 0.5)
    if 255 > duration: duration = 255
    self.writeReg(self.REG_DUR_TAP, duration)
dataset/ETHPy150Open graycatlabs/PyBBIO/bbio/libraries/ADXL345/ADXL345.py/ADXL345.setTapDuration/swapped operands of `>`