public static string GetWiringDiagram(ArduinoModel model, MotorShieldType type)
        {
            string wiringDiagram = "pack://application:,,,/Resources/dcc-ex-logo.png";

            switch (model)
            {
            case ArduinoModel.Mega2560:
                switch (type)
                {
                case MotorShieldType.Arduino:
                    wiringDiagram = "pack://application:,,,/Resources/mega-arduino.png";
                    break;

                case MotorShieldType.Pololu:
                    wiringDiagram = "pack://application:,,,/Resources/mega-pololu.png";
                    break;

                case MotorShieldType.BTS7960B:
                    wiringDiagram = "pack://application:,,,/Resources/dcc-ex-logo.png";
                    break;
                }
                break;

            case ArduinoModel.UnoR3:
                switch (type)
                {
                case MotorShieldType.Arduino:
                    wiringDiagram = "pack://application:,,,/Resources/uno-arduino.png";
                    break;

                case MotorShieldType.Pololu:
                    wiringDiagram = "pack://application:,,,/Resources/uno-pololu.png";
                    break;

                case MotorShieldType.BTS7960B:
                    wiringDiagram = "pack://application:,,,/Resources/dcc-ex-logo.png";
                    break;
                }
                break;
            }
            return(wiringDiagram);
        }
Ejemplo n.º 2
0
 public MotorShield(string name, MotorShieldType type)
 {
     Name       = name;
     ShieldType = type;
 }