void InitCAD(int channelNumber) { var channelCad = usbDevice.getChannel(channelNumber); var bikeCadenceDisplay = new BikeCadenceDisplay(channelCad, network); cadCommander = new CADCommander(bikeCadenceDisplay); cadCommander.Start(); }
void InitCAD(int channelNumber) { Int32 deviceNumber = Int32.Parse(ConfigurationManager.AppSettings["cadence_device"]); if (deviceNumber < 0) { return; } var channelCad = usbDevice.getChannel(channelNumber); var bikeCadenceDisplay = new BikeCadenceDisplay(channelCad, network); cadCommander = new CADCommander(bikeCadenceDisplay, (UInt16)deviceNumber); cadCommander.Start(); }