Commit Graph

1342 Commits

Author SHA1 Message Date
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
Fredric Silberberg
2662a7ab0d Initialized the m_sensors variable to fix artf4798.
Change-Id: Iab7b76c0e36b3a8e5ab764f7dcd6772a2058bd0f
2016-01-12 16:27:34 -05:00
Fredric Silberberg
713d54fd2f Added build dir specification for sim javadoc to not overwrite athena javadoc
Change-Id: Idcc1303628134dd37c6c178b0bd66cfe2d24f928
2016-01-11 22:26:25 -05:00
Peter_Mitrano
75a07fc3e4 fix sim_ds launch script
It seems the tilde character doesn't always resolve to the home
directory

Change-Id: I69ecbab266901b271a16ce81b60a8bf7873f8a20
2016-01-08 01:31:01 -05:00
Peter Johnson
6b740e87b3 Fix C++ PIDController SetToleranceBuffer and OnTarget locking.
Also implement OnTarget fix in simulation PIDController.

Change-Id: Ic4b452759f80aa769a721f22cb6e732c2a9a213a
2016-01-07 20:55:10 -08:00
Brad Miller (WPI)
ac27f4b644 Merge "Fix onTarget() so that it returns false until there are any values retrieved" jenkins-release-2016.404 jenkins-release-2016.405 2016-01-07 09:25:52 -08:00
Brad Miller
99b6000a65 Fix onTarget() so that it returns false until there are any values retrieved
The onTarget() method uses the average error and there might not be a valid value
until the PIDController runs once. This is causing commands to bail out early in
simulation.

Change-Id: I7bac9ecb847cbe4f378385b1a6998bba10147554
2016-01-07 12:03:17 -05:00
Peter Johnson
628811ed03 Correctly set smart dashboard type for AnalogGyro and ADXRS450_Gyro.
The GetSmartDashboardType() function defined by GyroBase was returning the
correct "Gyro", but the overrides in AnalogGyro and ADXRS450_Gyro were
incorrectly changing this, resulting in SmartDashboard not recognizing these
as being gyros.

Additionally, AddSensor in the C++ AnalogGyro was setting the name to Gyro
rather than AnalogGyro.

Change-Id: Ib2e31cd2712cc2bc26c8082ed760175d0ee80fb6
2016-01-06 20:45:47 -08:00
Brad Miller (WPI)
c57e749a94 Merge "Fixed sim_ds script library path" 2016-01-06 14:41:44 -08:00
Brad Miller (WPI)
3350926d26 Merge "PIDController feed forward term can now be calculated by the end user" 2016-01-06 14:38:59 -08:00
Peter_Mitrano
4dec393c2d Fixed sim_ds script library path
Change-Id: I12fe435ea397cbcaf5da5b214c36ef5f76eb88cb
2016-01-06 00:14:11 -05:00
Brad Miller (WPI)
0e9f07d1c2 Merge "Fixing install script... again" 2016-01-05 19:30:43 -08:00
Peter Johnson
5765b13976 Use absolute path for NT persistent storage.
Fixes artf4782.

Change-Id: I34c142b3e17e2ba26cff429ceb771e30196f9bfd
2016-01-05 19:20:16 -08:00
Peter_Mitrano
2d43048807 Fixing install script... again
apparently `ln -sf` does not overwrite existing symlinks
so we use `rm -f` first, then use `ls -s`

Change-Id: I033839e50b942cc3508004c84837e9090f1b4f5c
2016-01-05 16:45:22 -05:00
Tyler Veness
e3ce991f18 PIDController feed forward term can now be calculated by the end user
The current feed forward calculation is only useful for velocity PID controllers where F, the feed forward constant, is 1 over the maximum setpoint for the output. For motion profiles which use position PID controllers, the appropriate calculation for velocity and acceleration feed forwards is different. This change allows the user to provide their own feed forward implementation without having to rewrite the entire Calculate() function.

Both default feed forward calculations are velocity feed forwards. Suggestions for sensible feed forward constants are included in the inline comments.

Change-Id: Id175786f26bd342de52a1fae89595cbeba5dfc93
2016-01-05 10:52:25 -08:00
Tyler Veness
3cd1253977 artf2612: Update license in source files.
Years update, references to WIND_BASE were removed, and WPILib license was
moved to the root directory of the project.

If there was already a comment block, a year range through 2016 was created
using the first year in the comment. If there was no comment block, a block
with just the year 2016 was added.

Comments were not added to files from external sources (NI, CTRE).

Change-Id: Iff4f098ab908b90b8d929902dea903de2f596acc
2016-01-05 00:35:05 -08:00
Peter Johnson (294)
008fb2e382 Merge "Removed gz_msgs from wpilibcSim" 2016-01-04 23:22:07 -08:00
Tyler Veness
887f220fe7 Ultrasonic: replace linked list with std::set.
Also remove m_mutex.  It's no longer necessary because we ensure the automatic
thread is stopped while the set is being accessed.

Change-Id: I5994bbeba022a2ebd9e166fca369ebc8c229975c
2016-01-04 22:52:35 -08:00
Peter_Mitrano
dd19778152 Removed gz_msgs from wpilibcSim
it's not directly required to link at this time, and if you want to use a different
version of protobuf on the end-user's computer then linking their robot programs
will fail

Change-Id: I9ad7c07a17b7a332b4027adbe71be605e415bc2d
2016-01-04 22:50:21 -05:00
Peter Johnson (294)
7a2be548a7 Merge "Replaced linked list in Notifier with std::list" 2016-01-04 19:49:55 -08:00
Peter Johnson (294)
5f93009661 Merge "Renamed Gyro to AnalogGyro to match athena API" 2016-01-04 19:33:40 -08:00
Tyler Veness
d77f5c8019 Replaced linked list in Notifier with std::list
Change-Id: I3bcb1195102d792db994dba98adc7425767b16e8
2016-01-04 19:13:52 -08:00
Peter_Mitrano
6faa51ff48 Renamed Gyro to AnalogGyro to match athena API
Removed references to HAL classes, enabling moving of these classes into
shared.

Change-Id: I8d9053e1046d6fc2a60e13fb29410fd2c95180d2
2016-01-04 19:09:51 -08:00
Peter Johnson (294)
ce2245110b Merge "Adds CANTalon to LiveWindow" 2016-01-04 14:38:31 -08:00
Brad Miller (WPI)
dfba97a540 Merge "Fixing the frcsim installer script" 2016-01-04 13:41:20 -08:00
Thad House
99b2b65148 Adds CANTalon to LiveWindow
CANTalon was not being added to the LiveWindow list.

Change-Id: I732bb65a899f11bb9b1ef0a7320f0f0cc78233f7
2016-01-04 12:28:27 -08:00
Peter Johnson (294)
5976baec02 Merge "Fixes CAN devices in C++ library not showing in the livewindow" 2016-01-04 12:08:49 -08:00
Peter Johnson
932ec8e302 Merge "HAL: Use extern "C" in implementation files." 2016-01-04 11:58:44 -08:00
Sam Carlberg
1c6fe85a7b Fixes CAN devices in C++ library not showing in the livewindow
Change-Id: I47a9d6370b4b2573272881258d4bb46aa149bed0
2016-01-04 11:48:31 -08:00
Tyler Veness
e15ca5a414 Added linear digital filters
Linear digital filter class based on code from FRC team 341

Change-Id: I4c5198e36a089e08a6d054bf1bf80392def27e23
2016-01-03 23:05:49 -08:00
Peter_Mitrano
70bc630f1f Fixing the frcsim installer script
URL for simulation zip changed as of gerrit 1264
script argument name changed from INSTALLER to INSTALL
fixed jar and logo paths for sim_ds

to use the script, it's now simply:
./frcsim-installer.sh INSTALL

You can optionally supply a promotion status from which to install, such as
./frcsim-installer.sh INSTALL beta
./frcsim-installer.sh INSTALL development

Also added some information to the README

Also allow any type of file install-resources since it may contain
libraries and jars

Change-Id: Ie876a05c88d3d48b8592f1800959988ae66edd04
2016-01-03 02:05:22 -05:00
Brad Miller (WPI)
6c89f34e44 Merge "Default bufLength for PIDController in Java should be 1" 2016-01-02 19:09:58 -08:00
Peter Johnson (294)
d542fe4293 Merge "Adds WaitResult to Java waitForInterrupt" 2016-01-02 09:54:57 -08:00
Peter Johnson
351e8599ac HAL: Use extern "C" in implementation files.
This turns accidental parameter mismatches between header and implementation
into compiler errors.

Change-Id: Ic26fabb82b2fd5f79407a11435cdbd35348af15f
2016-01-02 09:49:35 -08:00
Dustin Spicuzza
31a39b4e59 Default bufLength for PIDController in Java should be 1
- cpp version defaults to 1
- Documentation in getAvgError() says it defaults to 1

Change-Id: Id45f345f048f4c02709745ec1fb97744b7af7715
2016-01-02 12:00:40 -05:00
Peter Johnson
e2ec34090a Keep track of FPGA time rollovers with 64-bit time.
This allows both greater than 72 minute (2^32 * 1 us) timeouts and also
gracefully handles notifiers across the FPGA time counter rollover.

Change-Id: Ibde0b903155f60b618b0ca4d5f8f6dd49f90b020
2016-01-02 06:29:59 -08:00
Brad Miller (WPI)
063925e737 Merge "Change C++ Notifier to allow std::function callback." 2016-01-02 06:29:20 -08:00
Brad Miller (WPI)
de4708cbdb Merge "Rewrite C++ Notifier to use HAL multi-notifier support." 2016-01-02 06:28:40 -08:00
Brad Miller (WPI)
8bbc1d43bb Merge "Rewrite Java Notifier and update Interrupt JNI." 2016-01-02 06:27:44 -08:00
Peter Johnson (294)
c01146eb02 Merge "Readded styleguide accidentally removed in the reorg" 2016-01-01 20:09:33 -08:00
Peter Johnson (294)
3e71573c51 Merge "Artf4179: Allow alternate I2C addresses for ADXL345_I2C" 2016-01-01 19:34:47 -08:00
Fredric Silberberg
5bc6e1378c Readded styleguide accidentally removed in the reorg
Change-Id: I240516c2c62d056e6ea4c31026918f5414c6a710
2016-01-01 19:32:33 -08:00
Tyler Veness
5cee85f921 Fixed some typos in the comments of MotorEncoderFixture.java, a method name in CANMotorEncoderFixture.java, and the README files
Change-Id: I87d982068f3e7cdcce6e5b06c34a7ef326f5eae0
2016-01-01 16:19:53 -08:00
Thad House
951c81f5b7 Adds WaitResult to Java waitForInterrupt
WaitResult gets returned from C++ and the JNI, so should probably be returned
in Java as well.

Adds WaitResult tests to Java AbstractInterruptTest

Change-Id: Ic3cb2919652696c458c39006b2f716301c0736f4
2016-01-01 11:20:59 -08:00
Joe Ross
75d1891a57 Artf4177: Use read byte count for ReadString
Change-Id: Id27a60553792bf668b5c653b889449e695aebdc6
2015-12-31 19:44:53 -08:00
Joe Ross
376fc6be6f Artf4179: Allow alternate I2C addresses for ADXL345_I2C
Change-Id: I43e65251b4a7a5b90afb698b753b86672110e837
2015-12-31 17:51:16 -08:00
Peter Johnson
91a451f87a Change C++ Notifier to allow std::function callback.
Also provide templated varags constructor for backwards compatibility and
ease of use.

Update PIDController to use new constructor, eliminating static function
CallCalculate().

Change-Id: Iaeae95aa5953f294f5debc5fc569ef6d4684f223
2015-12-29 18:33:29 -08:00