Commit Graph

9 Commits

Author SHA1 Message Date
Tyler Veness
368ad30d37 artf4107: Uniform initialization syntax introduced
Change-Id: I452b4794d757a0817589ec62b75eda7fbdd74904
2015-07-02 21:50:39 -07:00
Tyler Veness
b1befed14f artf4107: clang-modernize was run on WPILib
Loops were converted to their range-based equivalents, variable types were replaced with auto where the type was already specified on the same line, the override keyword was added, and instances of NULL and assignments of 0 to pointers were replaced with nullptr.

Change-Id: If281e46a2e2e1c37f278d56df9915236d4b2c864
2015-07-02 21:49:47 -07:00
James Kuszmaul
7eb8550bdb Major formatting changes (breaks diffs). No code changes.
The changes made in this commit do not affect any actual code,
    they are purely aesthetic. I ran clang-format with google style
    over all .h/.cpp files in wpilibc that weren't in wpilibC++Sim
    or gtest, and the eclipse formatter over all of the Java files
    using the Google eclipse formatting configuration.

Change-Id: I9627bca0bc103c398ecc1c5ba17467193291ae63
2015-06-25 15:07:55 -04:00
James Kuszmaul
4013402134 Add PIDInterface for PIDController and CAN devices.
Added a PIDInterface for the PIDContrller, CANJaguar, and CANTalon to
inherit from.

Change-Id: I88d4943159476a44400009703db5e79d8cd4b5a9
2015-06-25 12:10:35 -04:00
Tyler Veness
5598445a67 Improve const correctness.
See https://usfirst.collab.net/sf/tracker/do/viewArtifact/projects.wpilib/tracker.4_defects/artf4148

Change-Id: I47b0d5a91fd49e47e2c7348b0705e998ec815682
2015-06-24 15:20:44 -07:00
James Kuszmaul
687e2c6711 [artf3709] Fixed PIDController loop timing.
For C++: The PIDController loop had been changed to run an infinite loop
with a Wait(period) rather than using the Notifier class to schedule
exact runs of the CallCalculate command. Essentially a revert to bb50f4b134,
accounting for more recent changes.

For Java: A similar problem had developed; essentially, a TimerTask used
to be used and at some point was changed to a Runnable. The Runnable had
an infinite loop with a Wait; TimerTask actually schedules things reasonably
(although it is not strictly real-time). Also, there were some
Thread-safety issues which I fixed.

Although Java and C++ had similar issues, they seem to have developed
these issues independently.

Changes have been tested on the GearsBot in both C++ and Java (and it
    works).

Change-Id: I478cb8bfd77cd2d031f8e343d0b8193b602dcc2a
2014-10-31 17:01:44 -04:00
Patrick Plenefisch
037d3b2fb5 void* -> void by creating proxy fuction
Change-Id: I903c3d98f3210d1969b9aed6c84f5ccaa803a9ed
2014-10-07 17:19:32 -04:00
Patrick Plenefisch
b6475d0503 Renaming and merging WPILibC++ into Devices and simulator files
Change-Id: I6f4b94d1f2cbf4196ebcef8bc45799a97bcde1d8
2014-09-25 20:36:59 -04:00
Alex Henning
7c8124d76c Allowed sharing of common C++ code between RoboRIO and Simulation.
Change-Id: I8bf2bda9df389c13ae0567a62dbf0ca931ceb6f8
2014-08-08 18:36:03 -04:00