Exemplo n.º 1
0
        /// <summary>Initializes the CAN bus.</summary>
        /// <param name="speed">The desired bus speed.</param>
        /// <param name="channel">The CAN channel to use.</param>
        public void Initialize(ControllerAreaNetwork.Speed speed, ControllerAreaNetwork.Channel channel)
        {
            this.can = new ControllerAreaNetwork(channel, speed);

            this.can.MessageAvailable += this.OnCanMessagesAvailable;
            this.can.ErrorReceived    += this.OnCanErrorReceived;

            this.can.Enabled = true;
        }
Exemplo n.º 2
0
 /// <summary>Initializes the CAN bus.</summary>
 /// <param name="speed">The desired bus speed.</param>
 public void Initialize(ControllerAreaNetwork.Speed speed)
 {
     this.Initialize(speed, ControllerAreaNetwork.Channel.One);
 }