Ejemplo n.º 1
0
/**
 * Sets the user-specified yaw offset to the current
 * yaw value reported by the navX MXP.
 *
 * This user-specified yaw offset is automatically
 * subtracted from subsequent yaw values reported by
 * the getYaw() method.
 */
void IMU::ZeroYaw()
{
    if ( this->IsBoardYawResetSupported() ) {
        /* navX MXP supports on-board yaw offset reset */
        EnqueueIntegrationControlMessage( NAVX_INTEGRATION_CTL_RESET_YAW );
    } else {
        yaw_offset = GetAverageFromYawHistory();
    }
}
Ejemplo n.º 2
0
void IMU::ZeroYaw()
{
        yaw_offset = GetAverageFromYawHistory();
}