Commit Graph

1388 Commits

Author SHA1 Message Date
Jonathan Leitschuh
000a98f193 Fix apt-get update -q causing build to fail (#20)
`sudo apt-get update -q` can fail a site doesn't respond.
This is the solution proposed here:
Related https://github.com/travis-ci/travis-ci/issues/5221
2016-05-12 17:51:57 -04:00
Fredric Silberberg
bb64dd3546 Updated README, and added in CONTRIBUTING. This adds tables of contents,
as well as fixing a few other issues.
2016-05-12 14:20:20 -04:00
Jonathan Leitschuh
d0c40b5ce2 Fixes indentation in .travis.yml 2016-05-11 15:06:06 -04:00
Jonathan Leitschuh
6794ff9ce8 Add Travis Build Configuration 2016-05-11 14:57:22 -04:00
Tyler Veness
083362bd86 Removed {@inheritDoc} from C++ sources and readded .inc files to Doxygen extension mapping
{@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
2016-05-11 02:11:00 -07:00
Thad House
0f228e7b7d Implements a common PWMSpeedController base class
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
2016-05-11 01:01:31 -07:00
Tyler Veness
686f5d9fef Fix incorrect comments in the HAL I2C functions and incorrect return values for some I2C class member functions.
These issues were found and fixed while interfacing with an ITG3200 gyroscope. Fixes artf4173.

Change-Id: Id3c6b34aa707650480e90605e98ae1b44d7a7b98
2016-05-11 00:24:15 -07:00
Tyler Veness
ad8763fc8d Removed unused pcre.h header. If regexes are needed in the future, use C++11's regex header.
Change-Id: I0284943f3f09bbe9184885da6a486b82f73fd089
2016-05-10 23:12:36 -07:00
Thad House
1011b56b4c Fixes notifier restart error when last notifier is deleted
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
2016-05-10 23:06:13 -07:00
Peter Johnson
5904314a75 Improve ADXRS450 error detection.
Ensure the POR, PWR, and CST error bits are not set when reading the sample.

Reported by: Jared Russell, Austin Schuh

Change-Id: Ib38178d6b51880480aee86e13c16f9ba89a80693
2016-05-10 23:04:54 -07:00
Thad House
e852547344 Makes Java Timer timing more accurate
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
2016-05-10 23:02:35 -07:00
Peter Johnson
fa8b68419f Make Java AnalogGyro.getAngle() thread-safe.
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
2016-05-09 20:36:36 -07:00
Fredric Silberberg
ec13d00b18 Fixed gradle build issue where files were not getting added to the wpilib java jar correctly.
Change-Id: I6c3cdd9906a94ff2d00340eb060a629d26c39a4a
2016-05-09 12:53:29 -07:00
Peter Johnson (294)
36447d86d8 Merge "Clear error buffer total when clearing the buffer contents" 2016-05-05 23:30:50 -07:00
Joe Ross
1e14403b3b Update POV documentation with examples of POV angles
Change-Id: If0f5b75366785b94a97b02694667fc00f8bfe196
2016-03-19 14:06:38 -07:00
Dustin Spicuzza
bee507eda8 Clear error buffer total when clearing the buffer contents
- Reported by Eli Barnett
- See http://www.chiefdelphi.com/forums/showthread.php?p=1559160`

Change-Id: I0efa4584452940bdfab3cc57c1823a8b33d387ff
2016-03-17 21:27:44 -04:00
Fredric Silberberg
16343bbe71 Updated release to version 5. v2016.5.1 2016-03-01 15:55:19 -05:00
Peter Johnson
623a5fcf8d Fix C++ CameraServer request handling.
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
2016-02-24 00:18:59 -08:00
Fredric Silberberg
6bd1654b80 Updated release number for the new release
Change-Id: Ib05f1db442cd1eacd77653c0e0984a5337609f7b
jenkins-release-2016.433 jenkins-stable-2016.433
2016-02-11 16:12:35 -05:00
Fredric Silberberg
952ebb11ad This adds StopMotor() to the SpeedController interface for C++ and Java.
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
2016-02-11 12:19:52 -08:00
Brad Miller (WPI)
91c5db06db Merge "More updates to the Gyro test fixing potential null pointer exception" 2016-02-11 11:17:06 -08:00
Omar Zrien
df33a78221 Added Config routine to allow enabling/disabling of limit switch and soft limits. This improves upon the ConfigLimitMode routine, which does not allow certain combinations of enable/disabled limit features.
Also keeps parity with LV and Java.

Change-Id: Id2f4c9f169effc6bc3ea48529e8f04f387609ddc
2016-02-11 09:11:30 -08:00
Brad Miller (WPI)
a33076ab9a Merge "Add an additional member variable for "stopped" which indicates the CAN motor controller has been explicitly stopped, but not disabled by the user (main use case is MotorSafety tripping). When Set() is called the next time the controller will be re-enabled automatically." 2016-02-10 08:33:39 -08:00
Kevin O'Connor
d567bd0bca Add an additional member variable for "stopped" which indicates the CAN motor controller has been explicitly stopped, but not disabled by the user (main use case is MotorSafety tripping). When Set() is called the next time the controller will be re-enabled automatically.
Change-Id: Ib1c0e5d0ddd55343d83039acbc46c0f9c4e451a1
2016-02-08 18:13:57 -05:00
Patrick
f436b33d79 More updates to the Gyro test fixing potential null pointer exception
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
2016-02-08 15:03:51 -05:00
Peter Johnson
3c3b2c75c0 Rate-limit duplicate error messages to avoid flooding console.
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
2016-02-08 01:14:56 -08:00
Brad Miller (WPI)
f17d27aacf Merge "artf4818: Fix CAN Talon JNI references with underscores." 2016-02-06 09:38:26 -08:00
Brad Miller (WPI)
94629bcb78 Merge "Updated PDP port of Talon and disabled PDP tests for Victor and Jaguar since the Victor and Jaguar don't draw enough current for the PDP to read above 0. PDP tests for both java and cpp only test the Talon now." 2016-02-06 08:45:44 -08:00
Patrick
4a6f55b61d Fixed the gyro deviation over time test
Also modified the testgyroCalibratedParameters to reduce code duplication.

Change-Id: I356562df4e9da1848d84e82ee82c5fbfc47d7d31
2016-02-02 13:38:51 -05:00
Joe Ross
fdfedd12fc artf4818: Fix CAN Talon JNI references with underscores.
Add test to verify bindings are correct

Change-Id: I766f2d7ff32a1bee2289974e331a4d8d5d563a35
2016-01-31 20:30:37 -08:00
Brad Miller (WPI)
ae1171d1be Merge "Fixed the motor tests by reducing speed to within the limits of the encoders we use. Also fixed java pid tolerances since getAvgError() was broken. It is now fixed and works properly. Added tests for both java and cpp that test if pid tolerances are working using fake input output pairs." 2016-01-31 09:48:51 -08:00
Patrick
6b356020f3 Updated PDP port of Talon and disabled PDP tests for Victor and Jaguar since the Victor and Jaguar don't draw enough current for the PDP to read above 0. PDP tests for both java and cpp only test the Talon now.
Change-Id: I84b2f168b27d07b444e223ae225013b6e97edde3
2016-01-29 14:49:58 -05:00
Patrick
7041cbc5eb Fixed the motor tests by reducing speed to within the limits of the encoders we use. Also fixed java pid tolerances since getAvgError() was broken. It is now fixed and works properly. Added tests for both java and cpp that test if pid tolerances are working using fake input output pairs.
Change-Id: I5bf23dbbdab996c582e1035fc2b2f36dd5f52417
2016-01-28 14:47:15 -05:00
Peter_Mitrano
f24c8b1b8d Fixed robot drive for C++ Simulation
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
jenkins-stable-2016.422
2016-01-25 12:03:48 -05:00
Fred Silberberg (WPI)
d62256156e Merge "Update version number for Release 3 Print distinctive message on robot program startup Change-Id: Ic91b81bd298ee6730503933cf0e733702e4b4405" 2016-01-24 16:07:23 -08:00
Brad Miller
61dbd43664 Update version number for Release 3
Print distinctive message on robot program startup
Change-Id: Ic91b81bd298ee6730503933cf0e733702e4b4405
2016-01-24 18:31:23 -05:00
Brad Miller (WPI)
f913b5de8c Merge "Removed publishing of java sim jar" 2016-01-24 15:27:54 -08:00
Omar Zrien
bd3e068f3b PDP Classes should support any PDP address
Change-Id: I3a8586e099559ee51449185734b89aaa6cd075d6
2016-01-22 23:53:49 -05:00
Fred Silberberg (WPI)
c6ff69079a Merge "Remove maven local as a possible search location" 2016-01-21 15:40:44 -08:00
Omar Zrien
5d3ac3ea71 Another improvement to HAL-joy getting to ensure it works in future RIO image updates.
Change-Id: I1f396b151e42dfd2b31de1fabde24b2988e8b599
2016-01-21 14:52:51 -08:00
Peter_Mitrano
f9e87f0cce Removed publishing of java sim jar
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
2016-01-20 15:15:02 -05:00
Peter Johnson
8801568325 DriverStation::GetJoystickName(): Make work for stick>0.
Change-Id: I1c62742cf8b80c81d21c2198f966c8151a758a01
jenkins-release-2016.413
2016-01-15 10:45:20 -08:00
Peter_Mitrano
75a91e24ef Remove maven local as a possible search location
maven caches are not stored in maven local, and searching here can
cause problems for building simulation.

Change-Id: Id106e80cfb9129431fd43500b06f879e7c682115
2016-01-15 11:56:35 -05:00
Brad Miller (WPI)
6adf4c48cd Merge "Fix HALGetJoystickDescriptor()." 2016-01-15 08:44:03 -08:00
Brad Miller (WPI)
026c427a2b Merge "Fixed Simulation C++ API" 2016-01-15 08:43:31 -08:00
Peter_Mitrano
63878d8ab7 Fixed Simulation C++ API
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
2016-01-15 11:26:16 -05:00
Peter Johnson
83f902f2f6 Fix HALGetJoystickDescriptor().
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
2016-01-14 21:49:50 -08:00
Thad House
f79ed1ab44 Artf4800: Fixes HALGetJoystick*** Segfault
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
2016-01-14 11:19:51 -08:00
Brad Miller (WPI)
bf89762e82 Merge "fix sim_ds launch script" 2016-01-13 10:19:40 -08:00
Brad Miller (WPI)
bd1e091629 Merge "Added build dir specification for sim javadoc to not overwrite athena javadoc" 2016-01-13 10:17:15 -08:00