From c418f93be4a3e2b0fae27d213ecfe1ca4b7c88c5 Mon Sep 17 00:00:00 2001 From: matt Date: Tue, 11 Feb 2020 14:57:48 -0800 Subject: [PATCH] Release 0.993 Signed-off-by: matt --- .../DlgTestRun.cs | 9 +++- .../QA401_QA450.cs | 44 +++++++++++++------ .../Other/EfficiencyA07.cs | 11 +++-- .../Other/ImpedanceA03.cs | 1 + .../Other/MicCompareA01.cs | 1 + Tractor/Constants.cs | 2 +- Tractor/Form1.cs | 2 +- 7 files changed, 49 insertions(+), 21 deletions(-) diff --git a/Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgTestRun.cs b/Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgTestRun.cs index b66d4b5..a356f74 100644 --- a/Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgTestRun.cs +++ b/Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgTestRun.cs @@ -108,8 +108,13 @@ private void button1_Click(object sender, EventArgs e) private bool CheckConnections(out string result) { ((IInstrument)Tm.TestClass).LaunchApplication(); - ((IInstrument)Tm.TestClass).ConnectToDevice(out result); - return ((IInstrument)Tm.TestClass).IsConnected(); + bool ok = ((IInstrument)Tm.TestClass).ConnectToDevice(out result); + if (ok && ((IInstrument)Tm.TestClass).IsConnected()) + { + return true; + } + + return false; } private void Start() diff --git a/Tractor/Com.QuantAsylum.Tractor.TestManagers/QA401_QA450.cs b/Tractor/Com.QuantAsylum.Tractor.TestManagers/QA401_QA450.cs index 634128f..764457a 100644 --- a/Tractor/Com.QuantAsylum.Tractor.TestManagers/QA401_QA450.cs +++ b/Tractor/Com.QuantAsylum.Tractor.TestManagers/QA401_QA450.cs @@ -238,34 +238,50 @@ public bool ConnectToDevice(out string result) bool qa401Ok = false, qa450Ok = false; - if (Qa401.IsConnected() == false) + if (Qa401.IsConnected() == true) + { + qa401Ok = true; + } + else { qa401Ok = Qa401.ConnectToDevice(out result); } - if (qa401Ok && Qa401.GetVersion() >= Constants.RequiredQa401Version) + if (qa401Ok) { - qa401Ok = true; + if (Qa401.GetVersion() >= Constants.RequiredQa401Version) + { + // Version OK + } + else + { + qa401Ok = false; + result += "The QA401 application version was not current. Must be >= " + Constants.RequiredQa401Version.ToString("0.00") + ". "; + } } else { - if (qa401Ok == false) - result += "Unable to connect to the QA401."; - else - result += "The QA401 application version was not current. Must be >= " + Constants.RequiredQa401Version.ToString("0.00"); + result += "Unable to connect to the QA401. "; } qa450Ok = Qa450.IsConnected(); - if (qa450Ok && Qa450.GetVersion() >= Constants.RequiredQa450Version) + + if (qa450Ok) { - qa450Ok = true; + if (Qa450.GetVersion() >= Constants.RequiredQa450Version) + { + // Version OK + } + else + { + qa450Ok = false; + result += "The QA450 application version was not current. Must be >= " + Constants.RequiredQa450Version.ToString("0.00") + ". "; + } } else { - if (qa450Ok == false) - result += "Unable to connect to the QA450."; - else - result += "The QA450 application version was not current. Must be >= " + Constants.RequiredQa450Version.ToString("0.00"); + qa450Ok = false; + result += "Unable to connect to the QA450. "; } if (qa401Ok && qa450Ok) @@ -273,7 +289,7 @@ public bool ConnectToDevice(out string result) return true; } - result += "The testing will now stop."; + result += "The testing will now stop. "; return false; } diff --git a/Tractor/Com.QuantAsylum.Tractor.Tests/Other/EfficiencyA07.cs b/Tractor/Com.QuantAsylum.Tractor.Tests/Other/EfficiencyA07.cs index 9cc1de8..9b22182 100644 --- a/Tractor/Com.QuantAsylum.Tractor.Tests/Other/EfficiencyA07.cs +++ b/Tractor/Com.QuantAsylum.Tractor.Tests/Other/EfficiencyA07.cs @@ -52,8 +52,10 @@ public override void DoTest(string title, out TestResult tr) ((IAudioAnalyzer)Tm.TestClass).AudioAnalyzerSetTitle(title); ((IAudioAnalyzer)Tm.TestClass).SetYLimits(YMax, YMin); + ((IAudioAnalyzer)Tm.TestClass).SetOffsets(PreAnalyzerInputGain, 0); ((IAudioAnalyzer)Tm.TestClass).SetInputRange(AnalyzerInputRange); ((IAudioAnalyzer)Tm.TestClass).SetFftLength(FftSize * 1024); + if (LeftChannel == true && RightChannel == false) { ((IAudioAnalyzer)Tm.TestClass).SetMuting(false, true); @@ -87,8 +89,8 @@ public override void DoTest(string title, out TestResult tr) // Get dBV out and adjust based on input gains ((IAudioAnalyzer)Tm.TestClass).ComputeRms(TestFrequency * 0.98f, TestFrequency * 1.02f, out double peakLDbv, out double peakRDbv); - peakLDbv -= PreAnalyzerInputGain; - peakRDbv -= PreAnalyzerInputGain; + //peakLDbv -= PreAnalyzerInputGain; + //peakRDbv -= PreAnalyzerInputGain; // Convert to Volts RMS double leftVrms = (double)Math.Pow(10, peakLDbv / 20); @@ -147,7 +149,10 @@ public override string GetTestDescription() { return "Measures the efficiency of the amplifier under test. This is done by measuring amplifier output power " + "and measuring amplifier input power (supply voltage and supply current). The ratio of these measurements " + - "is the efficiency, expressed in % (0..100). Both channels must be used and loaded."; + "is the efficiency, expressed in % (0..100). If both Left and Right are selected, then the assumption is " + + "that the channels are sharing the power into the amp equally. If a single channel is specified, then the " + + "other channel output will be muted and the assumption is the specified channel is using the the full power " + + "into the amplifier. "; } internal override int HardwareMask diff --git a/Tractor/Com.QuantAsylum.Tractor.Tests/Other/ImpedanceA03.cs b/Tractor/Com.QuantAsylum.Tractor.Tests/Other/ImpedanceA03.cs index 406f7e5..2e96b1d 100644 --- a/Tractor/Com.QuantAsylum.Tractor.Tests/Other/ImpedanceA03.cs +++ b/Tractor/Com.QuantAsylum.Tractor.Tests/Other/ImpedanceA03.cs @@ -42,6 +42,7 @@ public override void DoTest(string title, out TestResult tr) Tm.SetToDefaults(); ((IAudioAnalyzer)Tm.TestClass).AudioAnalyzerSetTitle(title); ((IAudioAnalyzer)Tm.TestClass).SetYLimits(YMax, YMin); + ((IAudioAnalyzer)Tm.TestClass).SetOffsets(PreAnalyzerInputGain, 0); ((IAudioAnalyzer)Tm.TestClass).SetInputRange(AnalyzerInputRange); // First, we make 8 ohm measurement diff --git a/Tractor/Com.QuantAsylum.Tractor.Tests/Other/MicCompareA01.cs b/Tractor/Com.QuantAsylum.Tractor.Tests/Other/MicCompareA01.cs index 3300e8e..f3b5f08 100644 --- a/Tractor/Com.QuantAsylum.Tractor.Tests/Other/MicCompareA01.cs +++ b/Tractor/Com.QuantAsylum.Tractor.Tests/Other/MicCompareA01.cs @@ -46,6 +46,7 @@ public override void DoTest(string title, out TestResult tr) ((IAudioAnalyzer)Tm.TestClass).SetFftLength(FftSize * 1024); ((IAudioAnalyzer)Tm.TestClass).AudioAnalyzerSetTitle(title); ((IAudioAnalyzer)Tm.TestClass).SetYLimits(YMax, YMin); + ((IAudioAnalyzer)Tm.TestClass).SetOffsets(PreAnalyzerInputGain, 0); ((IAudioAnalyzer)Tm.TestClass).SetInputRange(AnalyzerInputRange); ((IAudioAnalyzer)Tm.TestClass).DoFrAquisition(AnalyzerOutputLevel, WindowingMs/1000, SmoothingDenominator); diff --git a/Tractor/Constants.cs b/Tractor/Constants.cs index 38a45c1..ea8967c 100644 --- a/Tractor/Constants.cs +++ b/Tractor/Constants.cs @@ -14,7 +14,7 @@ static class Constants public static string VersionSuffix = ""; public static double RequiredWebserviceVersion = 0.5; - public static double RequiredQa401Version = 1.822; + public static double RequiredQa401Version = 1.900; public static double RequiredQa450Version = 1.21; public static string DataFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "QuantAsylum", "Tractor"); diff --git a/Tractor/Form1.cs b/Tractor/Form1.cs index 8943cbe..031ca53 100644 --- a/Tractor/Form1.cs +++ b/Tractor/Form1.cs @@ -698,7 +698,7 @@ private void settingsToolStripMenuItem_Click(object sender, EventArgs e) private void openLogInBrowserToolStripMenuItem_Click(object sender, EventArgs e) { - string s = Constants.TestLogsPath + Constants.LogFileName; + string s = Path.Combine(Constants.TestLogsPath, Constants.LogFileName); if (File.Exists(s)) {