Beispiel #1
0
        void InitBP(int channelNumber)
        {
            AntManagerState.Instance.TripTotalKm = 0;
            var channelCad       = usbDevice.getChannel(channelNumber);
            var bikePowerDisplay = new BikePowerDisplay(channelCad, network);

            bpCommander = new BPCommander(bikePowerDisplay);
            bpCommander.Start();
        }
Beispiel #2
0
        void InitBP(int channelNumber)
        {
            Int32 deviceNumber = Int32.Parse(ConfigurationManager.AppSettings["bike_power_device"]);

            if (deviceNumber < 0)
            {
                return;
            }
            var channelCad       = usbDevice.getChannel(channelNumber);
            var bikePowerDisplay = new BikePowerDisplay(channelCad, network);

            bpCommander = new BPCommander(bikePowerDisplay, (UInt16)deviceNumber);
            bpCommander.Start();
        }
Beispiel #3
0
        public void Start()
        {
            var feChannel  = usbDevice.getChannel(0);
            var bpChannel  = usbDevice.getChannel(1);
            var hrChannel  = usbDevice.getChannel(2);
            var bcChannel  = usbDevice.getChannel(3);
            var bscChannel = usbDevice.getChannel(4);

            feDisplay  = new FitnessEquipmentDisplay(feChannel, network);
            bpDisplay  = new BikePowerDisplay(bpChannel, network);
            hrDisplay  = new HeartRateDisplay(hrChannel, network);
            bcDisplay  = new BikeCadenceDisplay(bcChannel, network);
            bscDisplay = new BikeSpeedCadenceDisplay(bscChannel, network);

            BindEvents();
            _ = ConsumeClientDataAsync();

            feDisplay.TurnOn();
            bpDisplay.TurnOn();
            hrDisplay.TurnOn();
            bcDisplay.TurnOn();
            bscDisplay.TurnOn();
        }
Beispiel #4
0
 public BPCommander(BikePowerDisplay simulator)
 {
     this.simulator = simulator;
 }