Esempio n. 1
0
 public GameController(IGameControllerValuesProvider provider, uint idx = 0)
 {
     _provider = provider;
     if (_provider is CTRE.Phoenix.FRC.DriverStation)
     {
         _index = idx;
         _provider.SetRef(this, idx);
     }
     else
     {
         if (idx > 0)
         {
             Microsoft.SPOT.Debug.Print("USB Game Controller should be above 0");
         }
         _index = 0;
     }
 }
 public GameController(IGameControllerValuesProvider provider, uint idx)
 {
     _provider = provider;
     if (_provider is CTRE.FRC.DriverStation)
     {
         _index = idx;
         _provider.SetRef(this, idx);
     }
     else
     {
         if (idx > 0)
         {
             throw new ArgumentException("Can only have index 0 in USB Game Controller");
         }
         _index = 0;
     }
 }