{@inheritDoc} doesn't exist in Doxygen, so I removed instances of it from the C++ source. It isn't needed anyway because Doxygen automatically fills in base class documentation for member functions in derived classes if no documentation is given. The extension mapping for .inc files was accidentally removed during the build system changes so this commit adds it back in.
Change-Id: I599e3bdafd76ee7d78a66090d81707cda5a399d7
There was a lot of duplicated code between all 7 PWM speed controllers.
This moves all the duplicated code down to a base class, that will make
it easier to add speed controllers in future years if needed again. Also
if we need to add a method to all speed controllers, we only have to do
it in 1 place, and not 7.
Change-Id: I25eb1d097c0f5f7dbd7656db2f4a30d006d50f98
This actually isn't a large issue, since the HAL automatically creates a
notifier at the beginning to handle the time rollover, but during
testing without that, I noticed that deleting the last notifier would
disable notifiers for the entire lifetime of the program. This seemed to
be caused by the CLOSEST_TRIGGER static variable not being reset, and
causing new notifiers to never be added to the queue. This fixes that.
Not a bug that can be seen normally, but still a bug.
Change-Id: I6ac61c632918c90972cd0664aa833e3bc9e8c535
Ensure the POR, PWR, and CST error bits are not set when reading the sample.
Reported by: Jared Russell, Austin Schuh
Change-Id: Ib38178d6b51880480aee86e13c16f9ba89a80693
Java was using integer division for calulating Timer values, which
was causing Timer values to be concatinated, and only accurate
to the nearest millisecond. This changes it to use double division,
which matches C++ and makes timing much more accurate
Change-Id: I61b893f4ad5791bf4dfdd767ee4346c1ed4ea418
In the Java implementation, "result" is an instance variable (to avoid
needing to perform a memory allocation on each call to getAngle). However,
this means that calls to getAngle() from multiple threads can step on each
other. Synchronize the method to avoid this issue.
Reported by: Jackson Gray (http://www.chiefdelphi.com/forums/showthread.php?threadid=145124)
Note this does not synchronize accesses between configuration methods such
as calibrate() and accessor methods such as getAngle().
Change-Id: I9ecc962d4fba66f6134fd801cfd607f155b41fe5
The request is not guaranteed to be in a single packet, so it may be necessary
to perform multiple reads to get the complete request. The previous code
could unpredictably fail as it only performed a single read.
Fixes artf4817.
Change-Id: I7734a12e1a2542f5d7ca0889453c387f0bb30538
For Java, this is as simple as just adding it, as all motors already
have an implementation from MotorSafety that is correctly resolved. For
C++, I had to override StopMotor in the classes that descend from
SafePWM and explicitly call the SafePWM version. RobotDrive now calls
StopMotor on each of its SpeedControllers, instead of calling Disable or
setting the motor to 0.0 as it was doing previously.
Additional small formatting corrections to the previous commit starting
this were added.
Change-Id: Ie94565394927a910ce74bc628670ac3d658d8df9
also retuned the deviation over time test to make it pass more reliably.
Ran sucessfully 40/40 times run including several run with the entire wpilibj
Change-Id: I2e42c368fdb81f9206e15ce39878ea105da1e405
Fixes artf4809.
In both C++ and Java, error messages are being sent to both the console
(via stdout/stderr) and being reported via the HAL. We don't want to
remove the stdout/stderr reporting at present because users debugging only
via netconsole (e.g. using riolog) won't see the HAL-reported errors. Until
there's an alternative means to getting the HAL-reported errors to those
users, instead store the previous 5 error messages and don't duplicate them
more often than once per second.
Changes the error reporting from setErrorData() to sendError(), which
improves driver station error reporting. The "location" in C++ is given as
the immediate caller (e.g. the WPILib function). The "location" in Java is
given as the first user function in the call stack. Note the full call stack
is provided in both instances.
Change-Id: I590dd63dcb66825301ebb260aff00cd8d7d501ed
initial values for m_invertedMotors is now 1
previously it was done in some of the constructors, but not all of them.
Change-Id: I2c1ce8d8a67f82d02c4c51f1c4d1aaad143f3112
This causes the name of the jar to change, and thus fail to be included
in the simulation zip. There is no need to publish java sim jar.
Also added dependency on jar being built before zipping it
Change-Id: I1fa3dcf405d7da78a8d112381ecc3bfb2d6d367b
maven caches are not stored in maven local, and searching here can
cause problems for building simulation.
Change-Id: Id106e80cfb9129431fd43500b06f879e7c682115
Fixed API in the following classes:
- RobotDrive
- AnalogGyro
moved some files from Athena the shared that are independant of platform
Renamed Gyro to AnalogGyro
added smart pointer constructors to RobotDrive
Change-Id: If8a1bde5aed77fd60869d1993c302dd519bc8848
This reverts the previous commit instead fixing it at the root
HALGetJoystickDescriptor function, which also fixes use of that function
by the C++ DriverStation class.
Change-Id: I1f203a015d8f10d119c61635def2822bf124754c
The HALGetJoystick*** methods were not initializing the descriptor
variable properly. This was causing a SegFault if joysticks were moved
around while one of these methods were running.
Change-Id: If804c7ea724b10381765068e4d6fad75fad69ecb