Esempio n. 1
0
 /// <summary>
 /// 实例化一个默认的飞行器状态。
 /// </summary>
 public MiniquadStatus()
 {
     _propellers = new Propeller[4];
     for (int i = 0; i < 4; ++i)
     {
         _propellers[i] = new Propeller();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 使用四个飞行器动力装置的引脚编号实例化一个新的飞行器状态。
 /// </summary>
 /// <param name="propeller1Pin">飞行器动力装置1的引脚编号。</param>
 /// <param name="propeller2Pin">飞行器动力装置2的引脚编号。</param>
 /// <param name="propeller3Pin">飞行器动力装置3的引脚编号。</param>
 /// <param name="propeller4Pin">飞行器动力装置4的引脚编号。</param>
 public MiniquadStatus(int propeller1Pin, int propeller2Pin, int propeller3Pin, int propeller4Pin)
 {
     _propellers = new Propeller[4];
     for (int i = 0; i < 4; ++i)
     {
         _propellers[i] = new Propeller();
     }
     _propellers[0].PinNumber = propeller1Pin;
     _propellers[1].PinNumber = propeller2Pin;
     _propellers[2].PinNumber = propeller3Pin;
     _propellers[3].PinNumber = propeller4Pin;
 }