public void TestThis() { Simova Sma = new Simova(5, 0); Console.WriteLine(Sma.Add(1).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(2).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(3).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(4).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(5).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(6).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(7).ToString()); Console.WriteLine(Sma.BufferToString()); if (Sma.Add(8) != 6) { throw new Exception("Simova selftest failed!"); } }
private void PowerDetection() { if (!_controlInterface.IsPlaying) { return; } _controlInterface.GetSpectrumSnapshot(_fft_buffer); _smaTunedFrequecy.Add(GetPowerTunedFreq()); _smaTunedBandwidth.Add(GetPowerTunedBandwith()); _smaTunedPeakPowerBandwidth.Add(GetPeakPowerTunedBandwith()); if (_mode == ScannerCompareMode.PeakPowerFrequency) { _scannerCompareRxLevel = _smaTunedFrequecy.IsValid ? _smaTunedFrequecy.Average : _SIMPLE_AVERAGE_MIN; } else if (_mode == ScannerCompareMode.AvgPowerBandwidth) { _scannerCompareRxLevel = _smaTunedBandwidth.IsValid ? _smaTunedBandwidth.Average : _SIMPLE_AVERAGE_MIN; } else if (_mode == ScannerCompareMode.PeakPowerBandwidth) { _scannerCompareRxLevel = _smaTunedBandwidth.IsValid ? _smaTunedPeakPowerBandwidth.Average : _SIMPLE_AVERAGE_MIN; } }
public void TestThis() { Simova Sma = new Simova(5, 0); Console.WriteLine(Sma.Add(1).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(2).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(3).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(4).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(5).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(6).ToString()); Console.WriteLine(Sma.BufferToString()); Console.WriteLine(Sma.Add(7).ToString()); Console.WriteLine(Sma.BufferToString()); if (Sma.Add(8) != 6) { throw new Exception("Simova selftest failed!"); } }