Commit Graph

6 Commits

Author SHA1 Message Date
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