Example #1
0
 public void StopRotation()
 {
     for (int i = 0; i < gyros.Count; ++i)
     {
         IMyGyro gyro = gyros[i] as IMyGyro;
         gyro.SetValue(GyroAction.Pitch.GetName(), gyro.GetDefaultValue <float>(GyroAction.Pitch.GetName()));
         gyro.SetValue(GyroAction.Yaw.GetName(), gyro.GetDefaultValue <float>(GyroAction.Yaw.GetName()));
         gyro.SetValue(GyroAction.Roll.GetName(), gyro.GetDefaultValue <float>(GyroAction.Roll.GetName()));
     }
 }
        public Gyroscopes(IMyTerminalBlock referenceBlock, List <IMyTerminalBlock> blocks)
            : base(referenceBlock)
        {
            UpdateGyroscopes(blocks);

            IMyGyro gyro = gyroscopeBlocks[0];

            Min     = gyro.GetMininum <float>(GyroAction.Pitch.Name);
            Max     = gyro.GetMaximum <float>(GyroAction.Pitch.Name);
            Default = gyro.GetDefaultValue <float>(GyroAction.Pitch.Name);
        }