Beispiel #1
0
        private void CheckFirmwareVersion()
        {
            Log.DebugFormat("Crazyradio USB dongle version is {0}.", FirmwareVersion);

            if (FirmwareVersion.CompareTo(MinimumCrazyradioFirmwareVersionRequired) < 0)
            {
                var message = string.Format("Mininum firmware version required for this version of CrazyradioDriver is {0}.", MinimumCrazyradioFirmwareVersionRequired);
                Log.Error(message);
                throw new CrazyradioDriverException(message);
            }
        }
Beispiel #2
0
        private ScanChannelsResult ScanChannelsUsingDataRate(RadioDataRate dataRate, RadioChannel channelStart, RadioChannel channelStop)
        {
            var results = new List <RadioChannel>();

            DataRate = dataRate;

            if (FirmwareVersion.CompareTo(MinimumCrazyradioFastFirmwareChannelScanFirmware) >= 0)
            {
                StartRadioScanningChannels(channelStart, channelStop);
                System.Threading.Thread.Sleep(2000);
                results.AddRange(GetRadioChannelScanningResults());
            }
            else             // slow pc level channel scan
            {
                results.AddRange(ManuallyScanForChannels(channelStart, channelStop));
            }

            return(new ScanChannelsResult(dataRate, results));
        }