Permalink
...
Comparing changes
Open a pull request
- 12 commits
- 12 files changed
- 0 commit comments
- 2 contributors
Commits on Jan 07, 2016
|
|
ThadHouse |
825dcf8
|
Commits on Jan 08, 2016
|
|
ThadHouse |
e6c1454
|
|||
|
|
ThadHouse |
bb76d23
|
|||
|
|
ThadHouse |
50506fc
|
Commits on Jan 09, 2016
|
|
ThadHouse |
dd86fe3
|
|||
|
|
msoucy |
af0da3f
|
|||
|
|
ThadHouse |
0996697
|
Commits on Jan 12, 2016
|
|
ThadHouse |
1379b5e
|
|||
|
|
ThadHouse |
03e0b97
|
Commits on Jan 13, 2016
|
|
ThadHouse |
109495f
|
|||
|
|
ThadHouse |
78a39d7
|
|||
|
|
ThadHouse |
94be211
|
Unified
Split
Showing
with
430 additions
and 359 deletions.
- +1 −1 HAL/HAL.csproj
- +158 −171 WPILib.Extras/NavX/AHRS.cs
- +1 −43 WPILib.Tests/SpecScaners/TestHALImpl.cs
- +6 −0 WPILib.Tests/TestADXRS450.cs
- +1 −1 WPILib.Tests/TestAnalogGyro.cs
- +4 −4 WPILib.Tests/TestDriverStation.cs
- +1 −1 WPILib.Tests/WPILib.Tests.csproj
- +0 −3 WPILib/ADXRS450_Gyro.cs
- +0 −3 WPILib/AnalogGyro.cs
- +233 −126 WPILib/DriverStation.cs
- +24 −5 WPILib/PIDController.cs
- +1 −1 appveyor.yml
View
2
HAL/HAL.csproj
| @@ -95,7 +95,7 @@ | ||
| <Compile Include="Base\HALAccelerometer.cs" /> | ||
| <Compile Include="Base\HALAnalog.cs" /> | ||
| <Compile Include="Base\HALCAN.cs" /> | ||
| - <Compile Include="Base\HALCanTalonSRX.cs" /> | ||
| + <Compile Include="Base\HALCANTalonSRX.cs" /> | ||
| <Compile Include="Base\HALCompressor.cs" /> | ||
| <Compile Include="Base\HALDigital.cs" /> | ||
| <Compile Include="Base\HALErrors.cs" /> | ||
View
44
WPILib.Tests/SpecScaners/TestHALImpl.cs
| @@ -282,53 +282,11 @@ public void TestHALBlittable() | ||
| } | ||
| - internal struct Function | ||
| - { | ||
| - public bool Equals(Function other) | ||
| - { | ||
| - return string.Equals(m_retType, other.m_retType) && string.Equals(m_identifier.ToLower(), other.m_identifier.ToLower()) && m_parameters.SequenceEqual(other.m_parameters); | ||
| - } | ||
| - | ||
| - public override int GetHashCode() | ||
| - { | ||
| - unchecked | ||
| - { | ||
| - var hashCode = m_retType?.GetHashCode() ?? 0; | ||
| - hashCode = (hashCode * 397) ^ (m_identifier?.GetHashCode() ?? 0); | ||
| - hashCode = (hashCode * 397) ^ (m_parameters?.GetHashCode() ?? 0); | ||
| - return hashCode; | ||
| - } | ||
| - } | ||
| - | ||
| - public Function(string ret, string id, string[] p) | ||
| - { | ||
| - m_retType = ret; | ||
| - m_identifier = id; | ||
| - m_parameters = p; | ||
| - } | ||
| - | ||
| - private readonly string m_retType; | ||
| - private readonly string m_identifier; | ||
| - private readonly string[] m_parameters; | ||
| - | ||
| - public override bool Equals(object obj) | ||
| - { | ||
| - if (ReferenceEquals(null, obj)) return false; | ||
| - return obj is Function && Equals((Function)obj); | ||
| - } | ||
| - } | ||
| - | ||
| - public struct HALMethodClass | ||
| - { | ||
| - public string ClassName; | ||
| - public List<MethodDeclarationSyntax> Methods; | ||
| - } | ||
| - | ||
| public struct HALDelegateClass | ||
| { | ||
| public string ClassName; | ||
| public List<DelegateDeclarationSyntax> Methods; | ||
| } | ||
| - | ||
| + | ||
| } | ||
View
6
WPILib.Tests/TestADXRS450.cs
| @@ -77,5 +77,11 @@ public void TestReset() | ||
| m_gyro.Reset(); | ||
| Assert.AreEqual(0.0, m_gyro.GetAngle(), 0.0001); | ||
| } | ||
| + | ||
| + [Test] | ||
| + public void TestSmartDashboardType() | ||
| + { | ||
| + Assert.That(m_gyro.SmartDashboardType, Is.EqualTo("Gyro")); | ||
| + } | ||
| } | ||
| } | ||
View
2
WPILib.Tests/TestAnalogGyro.cs
| @@ -232,7 +232,7 @@ public void TestSmartDashboardType() | ||
| { | ||
| using (AnalogGyro s = GetAnalogGyro(0)) | ||
| { | ||
| - Assert.That(s.SmartDashboardType, Is.EqualTo("AnalogGyro")); | ||
| + Assert.That(s.SmartDashboardType, Is.EqualTo("Gyro")); | ||
| } | ||
| } | ||
View
8
WPILib.Tests/TestDriverStation.cs
| @@ -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++) | ||
| @@ -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)); | ||
| @@ -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++) | ||
| @@ -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); | ||
View
2
WPILib.Tests/WPILib.Tests.csproj
| @@ -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> | ||
View
3
WPILib/ADXRS450_Gyro.cs
| @@ -172,8 +172,5 @@ public override double GetRate() | ||
| } | ||
| return m_spi.GetAccumulatorLastValue() * DegreePerSecondPerLSB; | ||
| } | ||
| - | ||
| - /// <inheritdoc/> | ||
| - public override string SmartDashboardType => nameof(ADXRS450_Gyro); | ||
| } | ||
| } | ||
View
3
WPILib/AnalogGyro.cs
| @@ -197,8 +197,5 @@ private double Deadband | ||
| AnalogInput.AccumulatorDeadband = deadband; | ||
| } | ||
| } | ||
| - | ||
| - ///<inheritdoc /> | ||
| - public override string SmartDashboardType => "AnalogGyro"; | ||
| } | ||
| } | ||
Oops, something went wrong.