diff --git a/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino b/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino index 1874b8d..0b25355 100644 --- a/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino +++ b/Hardware/OSRTT_Full_Code/OSRTT_Full_Code.ino @@ -35,7 +35,7 @@ SPISettings settingsA(10000000, MSBFIRST, SPI_MODE0); //Serial connection values bool connected = false; -String firmware = "2.1"; +String firmware = "2.2"; int testRuns = 4; bool vsync = true; bool extendedGamma = true; @@ -306,11 +306,15 @@ void runInputLagTest(int timeBetween) } void checkLatency() { + delay(100); Keyboard.print('Q'); delay(100); runADC(1000,1000,'F',"TL:"); - while (input[0] != 'X') + char input[INPUT_SIZE + 1]; + unsigned long startTime = micros(); + while (curr_time < (startTime + 3000)) { + curr_time = micros(); for (int i = 0; i < INPUT_SIZE + 1; i++) { input[i] = ' '; @@ -373,7 +377,8 @@ void loop() { { // Brightness Calibration screen Serial.setTimeout(200); - int potVal = 165; + int mod = input[1] - '0'; + int potVal = 165 + mod; digitalPotWrite(potVal); Serial.println("BRIGHTNESS CHECK"); delay(500); @@ -467,6 +472,7 @@ void loop() { Serial.print(","); } Serial.println(); + Serial.println("Handshake"); } else if (input[0] == 'M') { @@ -551,6 +557,11 @@ void loop() { if (buttonState == HIGH) //Run when button pressed { Serial.setTimeout(300); + Keyboard.print(fpsLimit); + if (vsync == false) + { + Keyboard.print('V'); + } // Check USB voltage level //int voltageTest = checkUSBVoltage(); //if (voltageTest == 0) @@ -579,19 +590,11 @@ void loop() { delay(100); Serial.println("Test Started"); // Set FPS limit (default 1000 FPS, key '1') - Keyboard.print(fpsLimit); delay(50); - if (vsync == false) - { - Keyboard.print('V'); - } runGammaTest(); delay(100); while (input[0] != 'X') { - Keyboard.print('Q'); - delay(100); - runADC(1000,1000,'F',"TL:"); for (int i = 0; i < INPUT_SIZE + 1; i++) { input[i] = ' '; diff --git a/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs b/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs index 056bdda..8ab3328 100644 --- a/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs +++ b/OSRTT Launcher/OSRTT Launcher/Main.Designer.cs @@ -857,6 +857,7 @@ private void InitializeComponent() this.opnResultsBtn.TabIndex = 15; this.opnResultsBtn.Text = "Open Results Folder"; this.opnResultsBtn.UseVisualStyleBackColor = false; + this.opnResultsBtn.Click += new System.EventHandler(this.opnResultsBtn_Click); // // importRawFolder // diff --git a/OSRTT Launcher/OSRTT Launcher/Main.cs b/OSRTT Launcher/OSRTT Launcher/Main.cs index 45895de..5b2e375 100644 --- a/OSRTT Launcher/OSRTT Launcher/Main.cs +++ b/OSRTT Launcher/OSRTT Launcher/Main.cs @@ -20,15 +20,16 @@ using System.Runtime.InteropServices; using Excel = Microsoft.Office.Interop.Excel; using Microsoft.Win32; +using System.Globalization; namespace OSRTT_Launcher { public partial class Main : Form { // CHANGE THESE VALUES WHEN ISSUING A NEW RELEASE - private double boardVersion = 2.1; - private double downloadedFirmwareVersion = 2.1; - private string softwareVersion = "2.2"; + private double boardVersion = 2.2; + private double downloadedFirmwareVersion = 2.2; + private string softwareVersion = "2.3"; // TODO // // Test new testing method (program run instead of device run) @@ -72,6 +73,7 @@ public partial class Main : Form private int currentRun = 0; private int potVal = 0; + private int basePotVal = 0; private double timeBetween = 0.3; private int numberOfClicks = 20; @@ -84,7 +86,7 @@ public partial class Main : Form private List inputLagRawData = new List(); private List inputLagProcessed = new List(); private List importedFile = new List(); - private int[] testLatency; + private List testLatency = new List(); private List> multipleRunData = new List>(); private Excel.Application resultsTemplate; @@ -279,6 +281,10 @@ public Main() { InitializeComponent(); UpdateMe(); + CultureInfo customCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone(); + customCulture.NumberFormat.NumberDecimalSeparator = "."; + + Thread.CurrentThread.CurrentCulture = customCulture; setupFormElements(); ControlDeviceButtons(false); path = new Uri(System.IO.Path.GetDirectoryName(path)).LocalPath; @@ -755,6 +761,15 @@ public void sendText(string textToSend) } } + private void setVsyncState(int state) + { + if (this.vsyncStateList.InvokeRequired) + { + this.vsyncStateList.Invoke((MethodInvoker)(() => vsyncStateList.SelectedIndex = state)); + } + else { this.vsyncStateList.SelectedIndex = state; } + } + private void SetDeviceStatus(string text) { // InvokeRequired required compares the thread ID of the @@ -1117,7 +1132,7 @@ public void Read() } else if (message.Contains("BRIGHTNESS CHECK")) { - port.Write(potVal.ToString("X")); + port.Write(basePotVal.ToString("X")); } else if (message.Contains("USB V:")) { @@ -1188,13 +1203,13 @@ public void Read() } else { - if (voltage > 50000) { potVal = 0; } - else if (voltage > 49500) { potVal = 1; } - else if (voltage > 49000) { potVal = 2; } - else if (voltage > 48500) { potVal = 3; } - else if (voltage > 48000) { potVal = 4; } - else if (voltage > 47500) { potVal = 5; } - else { potVal = 6; } + if (voltage > 50000) { basePotVal = 0; } + else if (voltage > 49500) { basePotVal = 1; } + else if (voltage > 49000) { basePotVal = 2; } + else if (voltage > 48500) { basePotVal = 3; } + else if (voltage > 48000) { basePotVal = 4; } + else if (voltage > 47500) { basePotVal = 5; } + else { basePotVal = 6; } } } else if (message.Contains("TEST CANCELLED")) @@ -1215,6 +1230,12 @@ public void Read() { testMode = true; } + else if (message.Contains("Handshake")) + { + setCaptureTime(); + setFPSLimit(); + port.Write("V" + Properties.Settings.Default.VSyncState.ToString()); + } else if (message.Contains("IL")) { if (message.Contains("IL:")) @@ -1289,57 +1310,60 @@ public void Read() } processInputLagData(); } - else if (message.Contains("TL")) + } + else if (message.Contains("TL")) + { + // Split result string into individual results + String newMessage = message.Remove(0, 3); + string[] values = newMessage.Split(','); + int[] intValues = new int[values.Length - 1]; + for (int i = 0; i < values.Length - 1; i++) { - // Split result string into individual results - String newMessage = message.Remove(0, 3); - string[] values = newMessage.Split(','); - int[] intValues = new int[values.Length - 1]; - for (int i = 0; i < values.Length - 1; i++) + if (values[i] == "0") { - if (values[i] == "0") + intValues[i] = 0; + } + else if (values[i] != "") + { + try { - intValues[i] = 0; + intValues[i] = int.Parse(values[i]); } - else if (values[i] != "") + catch (Exception ex) { - try - { - intValues[i] = int.Parse(values[i]); - } - catch (Exception ex) - { - Console.WriteLine(values[i]); - } + Console.WriteLine(values[i]); } - else { continue; } } - testLatency = intValues; - int start = 0; - for (int m = 0; m < intValues.Length; m++) + else { continue; } + } + testLatency.AddRange(intValues); + int start = 0; + for (int m = 0; m < intValues.Length; m++) + { + if (intValues[m] > 8000) { - if (intValues[m] > 8000) - { - start = m; - break; - } + start = m; + break; } - if (Properties.Settings.Default.captureTime == 0) + } + if (Properties.Settings.Default.captureTime == 0) + { + if (start == 0 || start > 1100) { - if (start == 0 || start > 1100) - { - port.Write("S1"); - } - else - { - port.Write("S0"); - } + Thread.Sleep(100); + port.Write("S1"); } else { - port.Write("S" + Properties.Settings.Default.captureTime.ToString()); + Thread.Sleep(100); + port.Write("S0"); } } + else + { + Thread.Sleep(100); + port.Write("S" + Properties.Settings.Default.captureTime.ToString()); + } } else { @@ -1450,6 +1474,11 @@ private void launchGameAndWaitForExit() setFPSLimit(); Thread.Sleep(200); setRepeats(); + if (port != null) + { + port.Write("V" + Properties.Settings.Default.VSyncState.ToString()); + } + Thread.Sleep(200); testRunning = true; // Launch UE4 game @@ -1499,6 +1528,7 @@ private void launchGameAndWaitForExit() try { gamma.Clear(); + testLatency.Clear(); testStarted = false; port.Write("T"); } @@ -1752,7 +1782,10 @@ private void runComplete() string strSeparator = ","; StringBuilder csvString = new StringBuilder(); - csvString.AppendLine(string.Join(strSeparator, testLatency)); + if (testLatency.Count != 0) + { + csvString.AppendLine(string.Join(strSeparator, testLatency)); + } foreach (var res in gamma) { csvString.AppendLine(string.Join(strSeparator, res)); @@ -1993,7 +2026,7 @@ private void resultsBtn_Click(object sender, EventArgs e) Array.Resize(ref intLine, intLine.Length - 1); if (intLine[0] == 1000) { - testLatency = intLine; + testLatency.AddRange(intLine); } else if (intLine[0] == intLine[1]) { @@ -2302,7 +2335,7 @@ private void processResponseTimeData() } int startDelay = 150; - if (testLatency.Length != 0) + if (testLatency.Count != 0) { int[] tl = testLatency.Skip(5).ToArray(); for (int n = 0; n < tl.Length; n++) @@ -2671,6 +2704,10 @@ private void processResponseTimeData() endAverage /= (samples.Length - avgEnd); endAverage = Math.Round(endAverage, 0); int arrSize = (transEnd - transStart + 100); + if (samples.Length < (transEnd + 100)) + { + arrSize = samples.Length - transStart; + } if (arrSize < 110) { arrSize = 200; @@ -2802,6 +2839,10 @@ private void processResponseTimeData() // os *= -1; os *= 100; overshootPercent = Math.Round(os, 1); + if (overshootPercent != 0 && overshootPercent < 1) + { + overshootPercent = 0; + } } } @@ -2902,7 +2943,7 @@ private void processResponseTimeData() } for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point { - if (endOffsetRGB > EndRGB || overUnderRGB == -1 || (endOffsetRGB == 0 && peakValue > (endPer3 + 100))) // Including overshoot in the curve + if (endOffsetRGB > EndRGB || overUnderRGB == -1 || (endOffsetRGB == 0 && endPer3 > endAverage && overshootPercent > 1)) // Including overshoot in the curve { if (samples[j] >= endPer3) // add the same sort of more detailed check like complete for finding this { @@ -3032,7 +3073,7 @@ private void processResponseTimeData() } for (int j = (transEnd + 20); j > (transStart - 20); j--) // search samples for end point { - if ((endOffsetRGB < EndRGB && endOffsetRGB != 0) || (peakValue < (endPer3 - 100) && endOffsetRGB == 0)) // Including undershoot in the curve + if ((endOffsetRGB < EndRGB && endOffsetRGB != 0) || (endPer3 < endAverage && endOffsetRGB == 0 && overshootPercent > 1)) // Including undershoot in the curve { if (samples[j] <= endPer3) { @@ -3764,7 +3805,7 @@ private void importRawFolder_Click(object sender, EventArgs e) Array.Resize(ref intLine, intLine.Length - 1); if (intLine[0] == 1000) { - testLatency = intLine; + testLatency.AddRange(intLine); } else if (intLine[0] == intLine[1]) { @@ -3921,9 +3962,10 @@ private void launchBrightnessCal() } try { - port.Write("B"); + port.Write("B" + potVal.ToString()); brightnessWindowOpen = true; brightnessCanceled = false; + potVal = basePotVal; } catch (Exception e) { @@ -4001,11 +4043,11 @@ private void incPotValBtn_Click(object sender, EventArgs e) private void resetBtn_Click(object sender, EventArgs e) { - potVal = 0; + potVal = basePotVal; incPotValBtn.Enabled = true; try { - port.Write(potVal.ToString("X")); + port.Write(basePotVal.ToString("X")); } catch (Exception ex) { @@ -5214,6 +5256,7 @@ private void extendedGammaTestToolStripMenuItem_Click(object sender, EventArgs e } } } + } } diff --git a/OSRTT Launcher/OSRTT Launcher/Matrix.cs b/OSRTT Launcher/OSRTT Launcher/Matrix.cs deleted file mode 100644 index c3ec50c..0000000 --- a/OSRTT Launcher/OSRTT Launcher/Matrix.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Work in this file is derived from code originally written by Hans-Peter Moser: - * http://www.mosismath.com/Basics/Basics.html - * http://www.mosismath.com/Matrix_Gauss/MatrixGauss.html - * It is included in ScottPlot under a MIT license with permission from the original author. - */ - -namespace ScottPlot.Statistics.Interpolation -{ - public class Matrix - { - public double[,] a; - public double[] y; - public double[] x; - - public Matrix(int size) - { - a = new double[size, size]; - y = new double[size]; - x = new double[size]; - } - } -} \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/MatrixSolver.cs b/OSRTT Launcher/OSRTT Launcher/MatrixSolver.cs deleted file mode 100644 index d87381b..0000000 --- a/OSRTT Launcher/OSRTT Launcher/MatrixSolver.cs +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Work in this file is derived from code originally written by Hans-Peter Moser: - * http://www.mosismath.com/Basics/Basics.html - * http://www.mosismath.com/Matrix_Gauss/MatrixGauss.html - * It is included in ScottPlot under a MIT license with permission from the original author. - */ - -using System; - -namespace ScottPlot.Statistics.Interpolation -{ - // Matrix equation solver using the Gaussian elimination algorithm - public class MatrixSolver - { - public readonly Matrix m; - public readonly int maxOrder; - public bool calcError; - - public MatrixSolver(int size, Matrix mi) - { - maxOrder = size; - m = mi; - } - - void SwitchRows(int n) - { - double tempD; - int i, j; - for (i = n; i <= maxOrder - 2; i++) - { - for (j = 0; j <= maxOrder - 1; j++) - { - tempD = m.a[i, j]; - m.a[i, j] = m.a[i + 1, j]; - m.a[i + 1, j] = tempD; - } - tempD = m.y[i]; - m.y[i] = m.y[i + 1]; - m.y[i + 1] = tempD; - } - } - - public bool Eliminate() - { - int i, k, l; - calcError = false; - for (k = 0; k <= maxOrder - 2; k++) - { - for (i = k; i <= maxOrder - 2; i++) - { - if (Math.Abs(m.a[i + 1, i]) < 1e-8) - { - SwitchRows(i + 1); - } - if (m.a[i + 1, k] != 0.0) - { - for (l = k + 1; l <= maxOrder - 1; l++) - { - if (!calcError) - { - m.a[i + 1, l] = m.a[i + 1, l] * m.a[k, k] - m.a[k, l] * m.a[i + 1, k]; - if (m.a[i + 1, l] > 10E260) - { - m.a[i + 1, k] = 0; - calcError = true; - } - } - } - m.y[i + 1] = m.y[i + 1] * m.a[k, k] - m.y[k] * m.a[i + 1, k]; - m.a[i + 1, k] = 0; - } - } - } - return !calcError; - } - - public void Solve() - { - int k, l; - for (k = maxOrder - 1; k >= 0; k--) - { - for (l = maxOrder - 1; l >= k; l--) - { - m.y[k] = m.y[k] - m.x[l] * m.a[k, l]; - } - if (m.a[k, k] != 0) - m.x[k] = m.y[k] / m.a[k, k]; - else - m.x[k] = 0; - } - } - } -} \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/NaturalSpline.cs b/OSRTT Launcher/OSRTT Launcher/NaturalSpline.cs deleted file mode 100644 index e8ba604..0000000 --- a/OSRTT Launcher/OSRTT Launcher/NaturalSpline.cs +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Work in this file is derived from code originally written by Hans-Peter Moser: - * http://www.mosismath.com/NaturalSplines/NaturalSplines.html - * It is included in ScottPlot under a MIT license with permission from the original author. - */ - -using System; - -namespace ScottPlot.Statistics.Interpolation -{ - /// - /// Natural Spline data interpolator - /// - public class NaturalSpline : SplineInterpolator - { - public NaturalSpline(double[] xs, double[] ys, int resolution = 10) : base(xs, ys, resolution) - { - m = new Matrix(n - 2); - gauss = new MatrixSolver(n - 2, m); - - a = new double[n]; - b = new double[n]; - c = new double[n]; - d = new double[n]; - h = new double[n - 1]; - - CalcParameters(); - Integrate(); - Interpolate(); - } - - public void CalcParameters() - { - for (int i = 0; i < n; i++) - a[i] = givenYs[i]; - - for (int i = 0; i < n - 1; i++) - h[i] = givenXs[i + 1] - givenXs[i]; - - for (int i = 0; i < n - 2; i++) - { - for (int k = 0; k < n - 2; k++) - { - m.a[i, k] = 0.0; - m.y[i] = 0.0; - m.x[i] = 0.0; - } - } - - for (int i = 0; i < n - 2; i++) - { - if (i == 0) - { - m.a[i, 0] = 2.0 * (h[0] + h[1]); - m.a[i, 1] = h[1]; - } - else - { - m.a[i, i - 1] = h[i]; - m.a[i, i] = 2.0 * (h[i] + h[i + 1]); - if (i < n - 3) - m.a[i, i + 1] = h[i + 1]; - } - - if ((h[i] != 0.0) && (h[i + 1] != 0.0)) - m.y[i] = ((a[i + 2] - a[i + 1]) / h[i + 1] - (a[i + 1] - a[i]) / h[i]) * 3.0; - else - m.y[i] = 0.0; - } - - if (gauss.Eliminate() == false) - throw new InvalidOperationException("error in matrix calculation"); - - gauss.Solve(); - - c[0] = 0.0; - c[n - 1] = 0.0; - - for (int i = 1; i < n - 1; i++) - c[i] = m.x[i - 1]; - - for (int i = 0; i < n - 1; i++) - { - if (h[i] != 0.0) - { - d[i] = 1.0 / 3.0 / h[i] * (c[i + 1] - c[i]); - b[i] = 1.0 / h[i] * (a[i + 1] - a[i]) - h[i] / 3.0 * (c[i + 1] + 2 * c[i]); - } - } - } - } -} \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj b/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj index 3e3c816..3243c67 100644 --- a/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj +++ b/OSRTT Launcher/OSRTT Launcher/OSRTT Launcher.csproj @@ -127,19 +127,21 @@ Main.cs - - Form MeasurementsExplained.cs - + + Form + + + ResultsView.cs + - Main.cs @@ -156,6 +158,9 @@ Resources.resx True + + ResultsView.cs + diff --git a/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs b/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs index 845a8fe..199217b 100644 --- a/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs +++ b/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.0.2")] -[assembly: AssemblyFileVersion("2.0.0.2")] +[assembly: AssemblyVersion("2.0.0.3")] +[assembly: AssemblyFileVersion("2.0.0.3")] diff --git a/OSRTT Launcher/OSRTT Launcher/ResultsView.Designer.cs b/OSRTT Launcher/OSRTT Launcher/ResultsView.Designer.cs new file mode 100644 index 0000000..e9c9c07 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/ResultsView.Designer.cs @@ -0,0 +1,145 @@ + +namespace OSRTT_Launcher +{ + partial class ResultsView + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView1.ColumnHeadersHeight = 31; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Column1, + this.Column2, + this.Column3, + this.Column4, + this.Column5, + this.Column6, + this.Column7}); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2; + this.dataGridView1.Location = new System.Drawing.Point(43, 71); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(359, 205); + this.dataGridView1.TabIndex = 0; + // + // Column1 + // + this.Column1.HeaderText = ""; + this.Column1.Name = "Column1"; + this.Column1.Width = 45; + // + // Column2 + // + this.Column2.HeaderText = "0"; + this.Column2.Name = "Column2"; + this.Column2.Width = 45; + // + // Column3 + // + this.Column3.HeaderText = "51"; + this.Column3.Name = "Column3"; + this.Column3.Width = 45; + // + // Column4 + // + this.Column4.HeaderText = "102"; + this.Column4.Name = "Column4"; + this.Column4.Width = 45; + // + // Column5 + // + this.Column5.HeaderText = "153"; + this.Column5.Name = "Column5"; + this.Column5.Width = 45; + // + // Column6 + // + this.Column6.HeaderText = "204"; + this.Column6.Name = "Column6"; + this.Column6.Width = 45; + // + // Column7 + // + this.Column7.HeaderText = "255"; + this.Column7.Name = "Column7"; + this.Column7.Width = 45; + // + // ResultsView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1384, 761); + this.Controls.Add(this.dataGridView1); + this.Name = "ResultsView"; + this.Text = "ResultsView"; + this.Load += new System.EventHandler(this.ResultsView_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; + private System.Windows.Forms.DataGridViewTextBoxColumn Column3; + private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private System.Windows.Forms.DataGridViewTextBoxColumn Column5; + private System.Windows.Forms.DataGridViewTextBoxColumn Column6; + private System.Windows.Forms.DataGridViewTextBoxColumn Column7; + } +} \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/ResultsView.cs b/OSRTT Launcher/OSRTT Launcher/ResultsView.cs new file mode 100644 index 0000000..acb706b --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/ResultsView.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace OSRTT_Launcher +{ + public partial class ResultsView : Form + { + public ResultsView() + { + InitializeComponent(); + } + + private void ResultsView_Load(object sender, EventArgs e) + { + + } + + } +} diff --git a/OSRTT Launcher/OSRTT Launcher/ResultsView.resx b/OSRTT Launcher/OSRTT Launcher/ResultsView.resx new file mode 100644 index 0000000..e6ca147 --- /dev/null +++ b/OSRTT Launcher/OSRTT Launcher/ResultsView.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/OSRTT Launcher/OSRTT Launcher/SplineInterpolator.cs b/OSRTT Launcher/OSRTT Launcher/SplineInterpolator.cs deleted file mode 100644 index a475b16..0000000 --- a/OSRTT Launcher/OSRTT Launcher/SplineInterpolator.cs +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Work in this file is derived from code originally written by Hans-Peter Moser: - * http://www.mosismath.com/NaturalSplines/NaturalSplines.html - * It is included in ScottPlot under a MIT license with permission from the original author. - */ - -using System; - -namespace ScottPlot.Statistics.Interpolation -{ - public abstract class SplineInterpolator - { - public double[] givenYs, givenXs; - public double[] interpolatedXs, interpolatedYs; - - protected Matrix m; - protected MatrixSolver gauss; - - protected readonly int n; - protected double[] a, b, c, d, h; - - protected SplineInterpolator(double[] xs, double[] ys, int resolution = 10) - { - if (xs is null || ys is null) - throw new ArgumentException("xs and ys cannot be null"); - - if (xs.Length != ys.Length) - throw new ArgumentException("xs and ys must have the same length"); - - if (xs.Length < 4) - throw new ArgumentException("xs and ys must have a length of 4 or greater"); - - if (resolution < 1) - throw new ArgumentException("resolution must be 1 or greater"); - - givenXs = xs; - givenYs = ys; - n = xs.Length; - - interpolatedXs = new double[n * resolution]; - interpolatedYs = new double[n * resolution]; - } - - public void Interpolate() - { - int resolution = interpolatedXs.Length / n; - for (int i = 0; i < h.Length; i++) - { - for (int k = 0; k < resolution; k++) - { - double deltaX = (double)k / resolution * h[i]; - double termA = a[i]; - double termB = b[i] * deltaX; - double termC = c[i] * deltaX * deltaX; - double termD = d[i] * deltaX * deltaX * deltaX; - int interpolatedIndex = i * resolution + k; - interpolatedXs[interpolatedIndex] = deltaX + givenXs[i]; - interpolatedYs[interpolatedIndex] = termA + termB + termC + termD; - } - } - - // After interpolation the last several values of the interpolated arrays - // contain uninitialized data. This section identifies the values which are - // populated with values and copies just the useful data into new arrays. - int pointsToKeep = resolution * (n - 1) + 1; - double[] interpolatedXsCopy = new double[pointsToKeep]; - double[] interpolatedYsCopy = new double[pointsToKeep]; - Array.Copy(interpolatedXs, 0, interpolatedXsCopy, 0, pointsToKeep - 1); - Array.Copy(interpolatedYs, 0, interpolatedYsCopy, 0, pointsToKeep - 1); - interpolatedXs = interpolatedXsCopy; - interpolatedYs = interpolatedYsCopy; - interpolatedXs[pointsToKeep - 1] = givenXs[n - 1]; - interpolatedYs[pointsToKeep - 1] = givenYs[n - 1]; - } - - public double Integrate() - { - double integral = 0; - for (int i = 0; i < h.Length; i++) - { - double termA = a[i] * h[i]; - double termB = b[i] * Math.Pow(h[i], 2) / 2.0; - double termC = c[i] * Math.Pow(h[i], 3) / 3.0; - double termD = d[i] * Math.Pow(h[i], 4) / 4.0; - integral += termA + termB + termC + termD; - } - return integral; - } - } -} \ No newline at end of file diff --git a/UE4 Project/Config/DefaultEngine.ini b/UE4 Project/Config/DefaultEngine.ini index fb47617..a8ede75 100644 --- a/UE4 Project/Config/DefaultEngine.ini +++ b/UE4 Project/Config/DefaultEngine.ini @@ -29,4 +29,7 @@ AppliedDefaultGraphicsPerformance=Maximum [/Script/Engine.Engine] +ActiveGameNameRedirects=(OldGameName="TP_FirstPersonBP",NewGameName="/Script/ResponseTimeTest") +ActiveGameNameRedirects=(OldGameName="/Script/TP_FirstPersonBP",NewGameName="/Script/ResponseTimeTest") +SmoothedFrameRateRange=(LowerBound=(Type=Open,Value=22.000000),UpperBound=(Type=Open,Value=62.000000)) +MinDesiredFrameRate=60.000000 +GenerateDefaultTimecodeFrameRate=(Numerator=60,Denominator=1) diff --git a/UE4 Project/Content/FirstPersonBP/Blueprints/MainMenu.uasset b/UE4 Project/Content/FirstPersonBP/Blueprints/MainMenu.uasset index 72fbeb7..f0994aa 100644 Binary files a/UE4 Project/Content/FirstPersonBP/Blueprints/MainMenu.uasset and b/UE4 Project/Content/FirstPersonBP/Blueprints/MainMenu.uasset differ