Skip to content

Commit d603169

Browse files
committed
Release 0.62
Signed-off-by: matt <matt@quantasylum.com>
1 parent 2b032e3 commit d603169

File tree

25 files changed

+2350
-66
lines changed

25 files changed

+2350
-66
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#*.jpg binary
4444
#*.png binary
4545
#*.gif binary
46+
*.svg binary
4647

4748
###############################################################################
4849
# diff behavior for common document formats

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
bld/
2222
[Bb]in/
2323
[Oo]bj/
24+
Setup/
2425

2526
# Visual Studio 2015 cache/options directory
2627
.vs/

Tractor/Assets/Tractor Icon.ico

106 KB
Binary file not shown.

Tractor/Assets/Tractor Icon.png

6.03 KB
Loading

Tractor/Assets/Tractor Icon.svg

Lines changed: 95 additions & 0 deletions
Loading

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public DlgTestRun(TestManager tm, TestRunComplete runCompleteCallback, string re
4141

4242
private void DlgReporting_Load(object sender, EventArgs e)
4343
{
44+
dataGridView1.DefaultCellStyle.Font = new Font("Ariel", 12);
45+
dataGridView1.RowTemplate.MinimumHeight= 25;
4446
dataGridView1.ReadOnly = true;
4547

4648
dataGridView1.ColumnCount = Enum.GetValues(typeof(ColText)).Cast<int>().Max() + 1;
@@ -101,15 +103,9 @@ private void Start()
101103
dataGridView1.Refresh();
102104

103105
// Set everthing to defaults by specifying an empty settings file
104-
//string s = Tm.QA401.GetName();
105-
//s = QATestManager.QA450.GetName();
106-
Tm.AudioAnalyzerSetDefaults();
107-
//Tm.QA401.SetLog(true);
108-
Tm.SetInputRange(Tm.GetInputRanges()[0]);
109-
Tm.AudioAnalyzerSetFftLength(16384);
110-
//QATestManager.QA401.SetUnits(QA401.UnitsType.dBV);
111-
112-
Thread.Sleep(500);
106+
Tm.DutSetPowerState(false);
107+
108+
Thread.Sleep(750);
113109

114110
new Thread(() =>
115111
{

Tractor/Com.QuantAsylum.Tractor.TestManagers/QATestManager.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,27 @@ public override void DutSetDefault()
6060

6161
public override void DutSetPowerState(bool powerEnable)
6262
{
63-
QA450.SetDutPower(true);
63+
QA450.SetDutPower(powerEnable);
6464
}
6565

6666
public override bool DutGetPowerState()
6767
{
6868
return QA450.GetDutPower();
6969
}
7070

71-
public override float DutGetCurrent()
71+
public override float DutGetCurrent(int averages = 1)
7272
{
73-
return QA450.GetCurrent();
73+
float current = 0;
74+
75+
if (averages <= 0)
76+
throw new InvalidDataException("Number of averages must be >= 1");
77+
78+
for (int i = 0; i < averages; i++)
79+
{
80+
current += QA450.GetCurrent();
81+
}
82+
83+
return current / averages;
7484
}
7585

7686
public override void DutSetVoltage(float voltage_V)

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public class PointD
2121

2222
/// <summary>
2323
/// Test managers are primarily focused on ensuring all the instruments required for a set of
24-
/// tests are present and working
24+
/// tests are present and working, as well as implementing the various abstract methods that made
25+
/// sense.
2526
/// </summary>
2627
abstract public class TestManager
2728
{
@@ -104,7 +105,7 @@ virtual public string FindUniqueName(string nameRoot)
104105

105106
abstract public void DutSetPowerState(bool powerEnable);
106107
abstract public bool DutGetPowerState();
107-
abstract public float DutGetCurrent();
108+
abstract public float DutGetCurrent(int averages = 1);
108109
abstract public void DutSetVoltage(float voltage_V);
109110
abstract public float DutGetVoltage();
110111
abstract public float DutGetTemperature();

Tractor/Com.QuantAsylum.Tractor.Tests/Gain/Gain01.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class Gain01 : TestBase
2020

2121
public float Offset = 0;
2222

23-
public float MinimumOKGain = -10.5f;
24-
public float MaximumOKGain = -9.5f;
23+
public float MinimumPassGain = -10.5f;
24+
public float MaximumPassGain = -9.5f;
2525

2626
public int InputRange = 6;
2727

@@ -59,7 +59,7 @@ public override void DoTest(string title, out TestResult tr)
5959
if (LeftChannel)
6060
{
6161
tr.StringValue[0] = tr.Value[0].ToString("0.00") + " dB";
62-
if ((tr.Value[0] < MinimumOKGain) || (tr.Value[0] > MaximumOKGain))
62+
if ((tr.Value[0] < MinimumPassGain) || (tr.Value[0] > MaximumPassGain))
6363
passLeft = false;
6464
}
6565
else
@@ -68,7 +68,7 @@ public override void DoTest(string title, out TestResult tr)
6868
if (RightChannel)
6969
{
7070
tr.StringValue[1] = tr.Value[1].ToString("0.00") + " dB";
71-
if ((tr.Value[1] < MinimumOKGain) || (tr.Value[1] > MaximumOKGain))
71+
if ((tr.Value[1] < MinimumPassGain) || (tr.Value[1] > MaximumPassGain))
7272
passLeft = false;
7373
}
7474
else

Tractor/Com.QuantAsylum.Tractor.Tests/Gain/Gain02.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Text;
77
using System.Threading;
88
using System.Threading.Tasks;
9+
using Tractor;
910
using Tractor.Com.QuantAsylum.Tractor.TestManagers;
1011

1112
namespace Com.QuantAsylum.Tractor.Tests.GainTests
@@ -20,8 +21,8 @@ public class Gain02 : TestBase
2021
public float OutputLevel = -30;
2122
public float ExtGain = 0;
2223

23-
public float MinimumOKGain = -10.5f;
24-
public float MaximumOKGain = -9.5f;
24+
public float MinimumPassGain = -10.5f;
25+
public float MaximumPassGain = -9.5f;
2526

2627
public int OutputImpedance = 8;
2728
public int InputRange = 6;
@@ -40,7 +41,7 @@ public override void DoTest(string title, out TestResult tr)
4041
Tm.SetInputRange(InputRange);
4142
Tm.AudioAnalyzerSetTitle(title);
4243

43-
Tm.LoadSetImpedance(OutputImpedance); Thread.Sleep(500);
44+
Tm.LoadSetImpedance(OutputImpedance); Thread.Sleep(Constants.QA450RelaySettle);
4445

4546
Tm.AudioGenSetGen1(true, OutputLevel, Freq);
4647
Tm.AudioGenSetGen2(false, OutputLevel, Freq);
@@ -55,17 +56,17 @@ public override void DoTest(string title, out TestResult tr)
5556
TestResultBitmap = Tm.GetBitmap();
5657

5758
// Compute the total RMS around the freq of interest
58-
tr.Value[0] = (float)Tm.ComputeRms(Tm.GetData(ChannelEnum.Left), Freq * 0.98f, Freq * 1.02f);
59+
tr.Value[0] = (float)Tm.ComputeRms(Tm.GetData(ChannelEnum.Left), Freq * 0.97f, Freq * 1.03f);
5960
tr.Value[0] = tr.Value[0] - OutputLevel - ExtGain;
60-
tr.Value[1] = (float)Tm.ComputeRms(Tm.GetData(ChannelEnum.Right), Freq * 0.98f, Freq * 1.02f);
61+
tr.Value[1] = (float)Tm.ComputeRms(Tm.GetData(ChannelEnum.Right), Freq * 0.97f, Freq * 1.03f);
6162
tr.Value[1] = tr.Value[1] - OutputLevel - ExtGain;
6263

6364
bool passLeft = true, passRight = true;
6465

6566
if (LeftChannel)
6667
{
6768
tr.StringValue[0] = tr.Value[0].ToString("0.00") + " dB";
68-
if ((tr.Value[0] < MinimumOKGain) || (tr.Value[0] > MaximumOKGain))
69+
if ((tr.Value[0] < MinimumPassGain) || (tr.Value[0] > MaximumPassGain))
6970
passLeft = false;
7071
}
7172
else
@@ -74,7 +75,7 @@ public override void DoTest(string title, out TestResult tr)
7475
if (RightChannel)
7576
{
7677
tr.StringValue[1] = tr.Value[1].ToString("0.00") + " dB";
77-
if ((tr.Value[1] < MinimumOKGain) || (tr.Value[1] > MaximumOKGain))
78+
if ((tr.Value[1] < MinimumPassGain) || (tr.Value[1] > MaximumPassGain))
7879
passLeft = false;
7980
}
8081
else

0 commit comments

Comments
 (0)