Example #1
0
        public MainWindow()
        {
            OnPacketReceivedMethod = OnPacketReceived;
            server  = new UDPServer(OnPacketReceivedMethod);
            arduino = new ArduinoSerialPort();
            InitializeComponent();

            sw_display  = new SteeringWheelDisplay(c_display);
            sw_leds     = new SteeringWheelLeds(c_leds);
            speedometer = new Speedometer(c_speedometer);
            cmb_port.DisplayMemberPath = "Key";
            cmb_port.SelectedValuePath = "Value";

            // Canvas Init
            sw_display.Init();
            sw_leds.Init();
            speedometer.Init();

            SetAvailablePorts();
            server.Listen();
        }