Skip to content

Commit ef3b471

Browse files
committed
Cleanup for 0.91 based on "Automated Amplifier Test with Tractor" blog post
Signed-off-by: matt <github@quantasylum.com>
1 parent d237538 commit ef3b471

File tree

14 files changed

+55
-43
lines changed

14 files changed

+55
-43
lines changed

Tractor.sln renamed to QA Tractor.sln

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.329
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tractor", "Tractor\Tractor.csproj", "{FCC7870E-B36F-4C9D-BB55-89FA1AAA7907}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QA Tractor", "Tractor\QA Tractor.csproj", "{FCC7870E-B36F-4C9D-BB55-89FA1AAA7907}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,4 +19,7 @@ Global
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {BC00CD58-C0EF-4857-AC6D-3B1F9F9D025C}
24+
EndGlobalSection
2225
EndGlobal

Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgAudition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private void button1_Click(object sender, EventArgs e)
3131
{
3232
try
3333
{
34-
AuditionVolume += 0.05f;
34+
AuditionVolume += 0.01f;
3535

3636
if (AuditionVolume > 1.0f)
3737
AuditionVolume = 1.0f;
@@ -50,7 +50,7 @@ private void button2_Click(object sender, EventArgs e)
5050
{
5151
try
5252
{
53-
AuditionVolume -= 0.05f;
53+
AuditionVolume -= 0.01f;
5454

5555
if (AuditionVolume < 0f)
5656
AuditionVolume = 0f;

Tractor/Com.QuantAsylum.Tractor.Dialogs/DlgTestRun.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ private void Start()
251251
{
252252
SubmitToAuditDb(testGroup, 1, Form1.AppSettings.TestList[i], tr);
253253
}
254-
else
255-
{
256-
SubmitToAuditDb(testGroup, 0, Form1.AppSettings.TestList[i], tr);
257-
}
254+
}
255+
else
256+
{
257+
SubmitToAuditDb(testGroup, 0, Form1.AppSettings.TestList[i], tr);
258258
}
259259
}
260260

Tractor/Com.QuantAsylum.Tractor.TestManagers/TestManager.cs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class TestManager
2424
{
2525
public object TestClass;
2626

27-
public delegate void StartEditing();
28-
public delegate void DoneEditing();
29-
public delegate void CancelEditing();
27+
//public delegate void StartEditing();
28+
//public delegate void DoneEditing();
29+
//public delegate void CancelEditing();
3030

3131
/// <summary>
3232
/// This allows different tests to share data.
@@ -36,15 +36,6 @@ class TestManager
3636
public void SetToDefaults()
3737
{
3838
((IInstrument)TestClass).SetToDefaults();
39-
40-
//if (TestClass is IInstrument)
41-
//{
42-
// ((IInstrument)TestClass).SetToDefaults();
43-
//}
44-
//else if (TestClass is IComposite)
45-
//{
46-
// ((IComposite)TestClass).SetToDefaults();
47-
//}
4839
}
4940
}
5041
}

Tractor/Com.QuantAsylum.Tractor.Tests/GainLevel/RmsLevelA01.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ namespace Com.QuantAsylum.Tractor.Tests.NoiseFloors
1010
[Serializable]
1111
public class RmsLevelA01 : AudioTestBase
1212
{
13-
[ObjectEditorAttribute(Index = 230, DisplayText = "Minimum Level to Pass (dB)", MinValue = -100, MaxValue = 100)]
13+
[ObjectEditorAttribute(Index = 230, DisplayText = "Minimum Level to Pass (dBV)", MinValue = -100, MaxValue = 100)]
1414
public float MinimumPassLevel = -10.5f;
1515

16-
[ObjectEditorAttribute(Index = 240, DisplayText = "Maximum Level to Pass (dB)", MinValue = -100, MaxValue = 100, MustBeGreaterThanIndex = 230)]
16+
[ObjectEditorAttribute(Index = 240, DisplayText = "Maximum Level to Pass (dBV)", MinValue = -100, MaxValue = 100, MustBeGreaterThanIndex = 230)]
1717
public float MaximumPassLevel = -9.5f;
1818

1919
[ObjectEditorAttribute(Index = 250, DisplayText = "Analyzer Input Range", ValidInts = new int[] { 6, 26 })]

Tractor/Com.QuantAsylum.Tractor.Tests/GainLevel/RmsLevelA03.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ namespace Com.QuantAsylum.Tractor.Tests.NoiseFloors
1010
[Serializable]
1111
public class RmsLevelA03 : AudioTestBase
1212
{
13-
[ObjectEditorAttribute(Index = 230, DisplayText = "Minimum Level to Pass (dB)", MinValue = -100, MaxValue = 100)]
13+
[ObjectEditorAttribute(Index = 230, DisplayText = "Minimum Level to Pass (dBV)", MinValue = -100, MaxValue = 100)]
1414
public float MinimumPassLevel = -10.5f;
1515

16-
[ObjectEditorAttribute(Index = 240, DisplayText = "Maximum Level to Pass (dB)", MinValue = -100, MaxValue = 100, MustBeGreaterThanIndex = 230)]
16+
[ObjectEditorAttribute(Index = 240, DisplayText = "Maximum Level to Pass (dBV)", MinValue = -100, MaxValue = 100, MustBeGreaterThanIndex = 230)]
1717
public float MaximumPassLevel = -9.5f;
1818

1919
[ObjectEditorAttribute(Index = 250, DisplayText = "Load Impedance (ohms)", ValidInts = new int[] { 8, 4 })]

Tractor/Com.QuantAsylum.Tractor.Tests/ObjectEditorUiBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private void PopulateUi()
129129
{
130130
bool value = (bool)fi.GetValue(ObjectToEdit);
131131
CheckBox tb = new CheckBox() { Checked = value, Anchor = AnchorStyles.Left };
132-
tb.TextChanged += ValueChanged;
132+
tb.CheckedChanged+= ValueChanged;
133133
Tlp.Controls.Add(tb, 1, row);
134134
}
135135
else if (o is ObjectEditorSpacer)
@@ -371,7 +371,7 @@ public bool VerifyChanges(bool commit = false)
371371
{
372372
if (commit)
373373
{
374-
string s = Tlp.GetControlFromPosition(1, i).Text;
374+
string s = Tlp.GetControlFromPosition(1, i).Text.Trim();
375375
f[i].SetValue(ObjectToEdit, s.Substring(0, Math.Min(s.Length, f[i].GetCustomAttribute<ObjectEditorAttribute>().MaxLength)));
376376
}
377377

Tractor/Com.QuantAsylum.Tractor.Tests/Operator/IdInputA00.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class IdInputA00 : UiTestBase
1212
{
1313

1414
[ObjectEditorAttribute(Index = 200, DisplayText = "Prompt Message:", MaxLength = 32)]
15-
public string Id = "";
15+
public string Msg = "";
1616

1717
public IdInputA00() : base()
1818
{
@@ -25,24 +25,25 @@ public override void DoTest(string title, out TestResult tr)
2525
// Two channels of testing
2626
tr = new TestResult(2);
2727

28-
DlgInput dlg = new DlgInput("Enter serial number");
28+
DlgInput dlg = new DlgInput(Msg);
2929

3030
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
3131
{
32-
Id = dlg.Result;
33-
if (Id != "")
32+
string serialNumber = dlg.Result.Trim().ToUpper();
33+
if (serialNumber != "")
3434
{
35-
Tm.LocalStash.Add("SerialNumber", Id);
35+
Tm.LocalStash.Add("SerialNumber", serialNumber);
3636
tr.Pass = true;
37-
tr.StringValue[0] = Id;
37+
tr.StringValue[0] = serialNumber;
3838
}
3939
}
4040
}
4141

4242
public override string GetTestDescription()
4343
{
44-
return "Prompts the user to enter a serial number. This function returns 'pass = true' if the user " +
45-
"entered something, but no further qualification is performed on the input string. " +
44+
return "Prompts the user to enter some information as a string. This function returns 'pass = true' if the user " +
45+
"entered something, it will be converted to upper case and leading and trailing spaces will be removed, " +
46+
"but no further qualification is performed on the input string. " +
4647
"If the user hit cancel or if the string is empty, then 'pass = false' is returned";
4748
}
4849
}

Tractor/Com.QuantAsylum.Tractor.Tests/Operator/PromptA00.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public override void DoTest(string title, out TestResult tr)
5454

5555
public override string GetTestDescription()
5656
{
57-
return "Instructs the user to complete an action. 'Pass = true' is always returned.";
57+
return "Instructs the user to complete an action. A PNG image may be specified as an instruction aid, and the operator" +
58+
"may optionally decide if the action succeeded or failed.";
5859
}
5960
}
6061
}

Tractor/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Tractor
99
static class Constants
1010
{
1111
public static string TitleBarText = "QuantAsylum TRACTOR";
12-
public static readonly double Version = 0.90;
12+
public static readonly double Version = 0.91;
1313
public static string VersionSuffix = "";
1414

1515
public static double RequiredWebserviceVersion = 0.5;

0 commit comments

Comments
 (0)