示例#1
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();
        }
示例#2
0
 public void Start()
 {
     simulator.SensorFound             += Found;
     simulator.BikeCadenceDataReceived += OnPageBikeCadence;
     simulator.TurnOn();
 }