Skip to content

Commit

Permalink
Release 0.993
Browse files Browse the repository at this point in the history
Signed-off-by: matt <[email protected]>
  • Loading branch information
QuantAsylum committed Feb 11, 2020
1 parent 7988e90 commit c418f93
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 21 deletions.
9 changes: 7 additions & 2 deletions Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgTestRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
44 changes: 30 additions & 14 deletions Tractor/Com.QuantAsylum.Tractor.TestManagers/QA401_QA450.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,42 +238,58 @@ 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)
{
return true;
}

result += "The testing will now stop.";
result += "The testing will now stop. ";
return false;
}

Expand Down
11 changes: 8 additions & 3 deletions Tractor/Com.QuantAsylum.Tractor.Tests/Other/EfficiencyA07.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Tractor/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion Tractor/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit c418f93

Please sign in to comment.