Пример #1
0
        void FFTCallback(float[] fftData) //data received
        {
            Dispatcher.Invoke(() =>
            {
                // MatrixFrame.FFTToFrame(fftData);

                MatrixFrame.FillFrame(new Pixel(0, 0, 0));
                float[] downSampledData = ResizeSampleArray(fftData, MatrixFrame.Width);
                for (int i = 0; i < MatrixFrame.Width; i++)
                {
                    if (SelectedDisplayMode == 0)
                    {
                        MatrixFrame.DrawColumnMirrored(i, (int)(downSampledData[i] * MatrixFrame.Height), _bottomColorPixel, _topColorPixel);
                    }
                    if (SelectedDisplayMode == 1)
                    {
                        MatrixFrame.DrawColumn(i, (int)(downSampledData[i] * MatrixFrame.Height), _bottomColorPixel, _topColorPixel);
                    }
                }
                MatrixFrame.Refresh();
            });
        }
Пример #2
0
 private void PixelOrder_NewLine_Snake_Click(object sender, RoutedEventArgs e)
 {
     MatrixFrame.newLine = PixelOrder.NewLine.SN;
     MatrixFrame.Refresh();
 }
Пример #3
0
 private void PixelOrder_StartCorner_BottomRight_Click(object sender, RoutedEventArgs e)
 {
     MatrixFrame.startCorner = PixelOrder.StartCorner.BR;
     MatrixFrame.Refresh();
 }
Пример #4
0
 private void PixelOrder_StartCorner_TopLeft_Click(object sender, RoutedEventArgs e)
 {
     MatrixFrame.startCorner = PixelOrder.StartCorner.TL;
     MatrixFrame.Refresh();
 }
Пример #5
0
 private void PixelOrder_Orientation_Vertical_Click(object sender, RoutedEventArgs e)
 {
     MatrixFrame.orientation = PixelOrder.Orientation.VT;
     MatrixFrame.Refresh();
 }
Пример #6
0
 private void MenuItem_Serial_ColorMode_BPP1Mono_Click(object sender, RoutedEventArgs e)
 {
     SerialManager.ColorMode = SerialManager.CMode.BPP1Mono;
     MatrixFrame.Refresh();
     OnColorModeChanged();
 }