/* Set shake rejection time. Sets the length of time that the gyro must be outside of the threshold set by  */
int dmp_set_shake_reject_time(unsigned short time)
/* Set shake rejection time. Sets the length of time that the gyro must be outside of the threshold set by  */
int dmp_set_shake_reject_time(unsigned short time)
{
    unsigned char tmp[2];
    time /= (1000 / DMP_SAMPLE_RATE);
    tmp[0] = time >> 8;
    tmp[1] = time & 0xFF;
    return mpu_write_mem(D_1_90,2,tmp);
}