Skip to content

Commit 78a39d7

Browse files
committed
Merge pull request #97 from robotdotnet/DriverStationReadWriteLock
Driver Station Performance Improvements
2 parents 109495f + 1379b5e commit 78a39d7

File tree

3 files changed

+232
-129
lines changed

3 files changed

+232
-129
lines changed

WPILib.Tests/TestDriverStation.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public void TestJoystickButtons([Range(0,32)] int numButtons)
256256
}
257257
};
258258
DriverStationHelper.UpdateData();
259-
Thread.Sleep(10);
259+
Thread.Sleep(150);
260260
int buttonCount = DriverStation.Instance.GetStickButtonCount(0);
261261
Assert.That(buttonCount, Is.EqualTo(numButtons));
262262
for (int i = 0; i < buttonCount; i++)
@@ -271,7 +271,7 @@ public void TestJoystickButtons([Range(0,32)] int numButtons)
271271
buttons[i] = true;
272272
}
273273
DriverStationHelper.UpdateData();
274-
Thread.Sleep(10);
274+
Thread.Sleep(150);
275275
for (int i = 0; i < buttonCount; i++)
276276
{
277277
bool button = DriverStation.Instance.GetStickButton(0, (byte)(i + 1));
@@ -301,7 +301,7 @@ public void TestJoystickAxes([Range(0, 6)] int numAxes)
301301
}
302302
};
303303
DriverStationHelper.UpdateData();
304-
Thread.Sleep(10);
304+
Thread.Sleep(150);
305305
int axesCount = DriverStation.Instance.GetStickAxisCount(0);
306306
Assert.That(axesCount, Is.EqualTo(numAxes));
307307
for (int i = 0; i < axesCount; i++)
@@ -316,7 +316,7 @@ public void TestJoystickAxes([Range(0, 6)] int numAxes)
316316
axes[i] = -.598;
317317
}
318318
DriverStationHelper.UpdateData();
319-
Thread.Sleep(10);
319+
Thread.Sleep(150);
320320
for (int i = 0; i < axesCount; i++)
321321
{
322322
double axis = DriverStation.Instance.GetStickAxis(0, i);

WPILib.Tests/WPILib.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<DefineConstants>DEBUG;TRACE</DefineConstants>
2929
<ErrorReport>prompt</ErrorReport>
3030
<WarningLevel>4</WarningLevel>
31-
<PlatformTarget>x86</PlatformTarget>
31+
<PlatformTarget>AnyCPU</PlatformTarget>
3232
</PropertyGroup>
3333
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3434
<DebugType>pdbonly</DebugType>

0 commit comments

Comments
 (0)