Skip to content

Commit

Permalink
Merge pull request #97 from robotdotnet/DriverStationReadWriteLock
Browse files Browse the repository at this point in the history
Driver Station Performance Improvements
  • Loading branch information
ThadHouse committed Jan 13, 2016
2 parents 109495f + 1379b5e commit 78a39d7
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 129 deletions.
8 changes: 4 additions & 4 deletions WPILib.Tests/TestDriverStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public void TestJoystickButtons([Range(0,32)] int numButtons)
}
};
DriverStationHelper.UpdateData();
Thread.Sleep(10);
Thread.Sleep(150);
int buttonCount = DriverStation.Instance.GetStickButtonCount(0);
Assert.That(buttonCount, Is.EqualTo(numButtons));
for (int i = 0; i < buttonCount; i++)
Expand All @@ -271,7 +271,7 @@ public void TestJoystickButtons([Range(0,32)] int numButtons)
buttons[i] = true;
}
DriverStationHelper.UpdateData();
Thread.Sleep(10);
Thread.Sleep(150);
for (int i = 0; i < buttonCount; i++)
{
bool button = DriverStation.Instance.GetStickButton(0, (byte)(i + 1));
Expand Down Expand Up @@ -301,7 +301,7 @@ public void TestJoystickAxes([Range(0, 6)] int numAxes)
}
};
DriverStationHelper.UpdateData();
Thread.Sleep(10);
Thread.Sleep(150);
int axesCount = DriverStation.Instance.GetStickAxisCount(0);
Assert.That(axesCount, Is.EqualTo(numAxes));
for (int i = 0; i < axesCount; i++)
Expand All @@ -316,7 +316,7 @@ public void TestJoystickAxes([Range(0, 6)] int numAxes)
axes[i] = -.598;
}
DriverStationHelper.UpdateData();
Thread.Sleep(10);
Thread.Sleep(150);
for (int i = 0; i < axesCount; i++)
{
double axis = DriverStation.Instance.GetStickAxis(0, i);
Expand Down
2 changes: 1 addition & 1 deletion WPILib.Tests/WPILib.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down
Loading

0 comments on commit 78a39d7

Please sign in to comment.