Added callback to the accel_state struct