Commit Graph

1304 Commits

Author SHA1 Message Date
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
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
Peter Johnson
b0de0b7386 Rewrite C++ Notifier to use HAL multi-notifier support.
This removes redundant queue code from the C++ library.

The old queue code is still needed by simulation, and as the delta between
the simulation and athena headers has grown significantly, this splits the
header into two separate files.

Change-Id: Ia76b38337a25eb9d4890b3eb9bd76b1cbda7f285
2015-12-29 18:33:29 -08:00
Peter Johnson
5dc5ed83b3 Rewrite Java Notifier and update Interrupt JNI.
Notifier takes advantage of the multi-notifier support now in HAL.

Each Notifier is now handled by a separate thread at the JNI level, so
one notifier taking longer to process (or being breakpointed) does not
stop the other notifiers from running.  These threads are configured as
daemon threads.

In both Notifier and Interrupt JNI, the JNI thread attachment no longer
repeatedly calls AttachCurrentThread().  This improves performance but more
importantly avoids impacting the Eclipse debugger, which attempts to
track each call to AttachCurrentThread() as a separate Java thread.

Note: There is currently no way to free an interrupt handler.  Repeatedly
calling attachInterruptHandler() will result in leaking previous handlers.

Change-Id: Ib12e3df88943c03e0269d3906e5b153767139391
2015-12-29 18:33:22 -08:00
Brad Miller (WPI)
fe01096e7a Merge "finishing up FRCSim installer" 2015-12-29 14:25:28 -08:00
Peter_Mitrano
acc7fbbf01 finishing up FRCSim installer
adds build of gz_msgs on end-user computer
This means we don't need to provide different zips for different
versions of ubuntu.
The problem was that gazebo on 14.04 comes with protobuf 2.5 but gazebo on 15.10 comes with 2.6
added a few other fixes to the install script as well

also fix dependency between simluation publishing and libwpilibcsim
building

Change-Id: I57d5a26ed7795bc61a25402e2986c6023d1d78ac
2015-12-29 13:48:59 -05:00
Peter Johnson (294)
416a238bed Merge "Artf4776 Fixes First DIO PWM usage errors" 2015-12-29 08:23:56 -08:00
Peter Johnson (294)
3d2b54a1c0 Merge "Artf4774 Fixes HAL getHALErrorMessage missing error" 2015-12-28 18:39:44 -08:00
Brad Miller (WPI)
ae99eb6761 Merge "Prevent double free in DigitalGlitchFilter" 2015-12-28 18:33:36 -08:00
Brad Miller (WPI)
e2fb1c6d46 Merge "Set correct error message" 2015-12-28 18:30:08 -08:00
Dustin Spicuzza
4881795a92 Prevent double free in DigitalGlitchFilter
Change-Id: Icf9660762c78054895bf8e86a6dfae0615288de6
2015-12-28 21:11:29 -05:00
Peter_Mitrano
17b363f3b4 working on install process for FRCSim 2016
To publish the simulation zip, run ./gradlew publish -PmakeSim

Targeting Ubuntu 14.04 and 15.10 for now, with 14.04 being the
currently best supported.
Two scripts have been drafted for installing, for 14.04 and 15.10
It currently publishes to ~/releases/maven/development/simulation

There is a known bug that gz_msgs for 15.10 must be built using
protobuf 2.6, which is not the default on 14.04.

Change-Id: I6cccd601671553d30fd05bbbc79c2b7dc1efbf1d
2015-12-28 16:42:24 -05:00
Brad Miller (WPI)
85c3e6a4fd Merge "This commit adds documentation generation, including grabbing ntcore sources, for both Java and C++. This will need changes made in the wpilib promotion tasks to copy the generatd documentation to the correct places." 2015-12-25 20:45:12 -08:00
Peter_Mitrano
2c04cf135b Improved READMEs
fixed a few incorrect statements
added structure and organization to main README to help people find
stuff when they're first starting

Change-Id: I6148f2e9bc63cbeaf5f2e40566bf9d274ed36aaa
2015-12-25 21:16:00 -05:00
thouse
dbba4a1036 Artf4776 Fixes First DIO PWM usage errors
Adds Java and C++ integration tests for testing DIO PWM

Change-Id: Iae32b57636a9648b92e8e0520f6cbba4c3c377ca
2015-12-25 08:34:43 -08:00
Brad Miller
083c90d377 Added libnipalu to make vision programs link properly
Change-Id: Ib45dbc2944f80bba1063cbd7c7875d3cf215584b
2015-12-24 21:35:31 -05:00
Fredric Silberberg
729545809e This commit adds documentation generation,
including grabbing ntcore sources, for both
Java and C++. This will need changes made in
the wpilib promotion tasks to copy the generatd
documentation to the correct places.

Change-Id: I64590b5eda001da2cc8ae498b2b1c0fd298da284
2015-12-24 14:43:51 -05:00
Dustin Spicuzza
842aba97b8 Set correct error message
Change-Id: Ieed132ec95568b4c01dce9c59feaa36eda4c56dc
2015-12-24 01:05:08 -05:00
thouse
d3f4400035 Artf4774 Fixes HAL getHALErrorMessage missing error
Change-Id: Ie0686363939f4be389f1dc284bb2a68f2783836d
2015-12-23 11:00:20 -08:00
Peter_Mitrano
20749ed6e9 Condition java sim build on -PmakeSim flag
This prevents issues building wpilib if you have ntcore but haven't
built desktop
If you want to build sim, use -PmakeSim
This will require the desktop build of ntcore, which can be done with:
./gradlew build publish -PmakeDesktop

Change-Id: I20f379267a226dbdfcff8fe6223670257725965a
2015-12-23 10:38:51 -08:00
Peter Johnson (294)
684da8d89f Merge "Add SPARK and SD540 motor controllers" 2015-12-21 10:24:05 -08:00
Austin Schuh
13496c75b4 Fixed double free of DriverStation.
DriverStation was being added to the singletons and also as a const
member variable.  This made it so that on program exit, it was
getting double freed.

Change-Id: I87f8260615dc31d57ce7c7204c1dfde22973ad51
2015-12-20 16:15:24 -08:00
Peter_Mitrano
d69803804f Repaired simulation build on linux
Reverted to old driverstation and joystick code because we're not ready
for windows drive station yet

updated paths to reflect new wpilib organization
fixed name of gazebo topic (if you want /gazebo/frc/time use ~/time)
included network tables in wpilibJavaSim
Added ds script, and improved frcsim script
always start gazebo with verbose

Change-Id: I3c54b7000019a5985079a88200896a8069e69b86
2015-12-19 14:42:43 -05:00
Peter_Mitrano
0d062fba3a Add Cmake wrappers and unzip desktop ntcore builds
the task allcsim will build everything
requires ntcore desktop to be built
also fixed Driverstation to match non-sim C++ API

Conflicts:
	wpilibc/simulation/CMakeLists.txt

Change-Id: Id38141a5b48ed7fe064c7e6c8d2f618481b7e298
2015-12-18 22:29:57 -05:00
Kevin O'Connor
fa903dd9ce Add SPARK and SD540 motor controllers
Change-Id: I33f9c588b6d535b1f274d211563ef146f34439b1
2015-12-17 16:28:05 -05:00
Brad Miller (WPI)
9316933454 Merge changes I55ce71c6,I803680c1
* changes:
  Rewrite CANTalon JNI layer.
  Last feature addition for CANTalon java/C++ user-facing API.
jenkins-beta-2015.304
2015-12-17 10:56:37 -08:00
Brad Miller (WPI)
31e1041ba3 Merge "Remove broken and unused HALLibrary.java." 2015-12-16 09:33:27 -08:00
Peter Johnson
1b03f818ad Rewrite CANTalon JNI layer.
Also update C++ and C functions from generator script output.

Change-Id: I55ce71c609ba5f5811db2ae78786ab7013a04b69
2015-12-16 00:02:13 -08:00
Omar Zrien
cd5765559a Last feature addition for CANTalon java/C++ user-facing API.
- CANJaguar also touched up to report it can't do the new control mode (just like with follower).
- New third optional param for talon c'tor to speed up enable control frame.
- The pulse width routines have been moved to where the script generator puts them.  No actual changes there but should help Peter integrate the latest code generator.

Last feature additions for TalonSRX HAL for FRC2015-FRC-2016 season.

-HAL driver uses control_5 frame if firmware supports it.  This allows teams to see/confirm control settings taking effect before enabling the robot.
  For example selecting the sensor type and going to web-dash to check sensor values now works without having to enable the robot.
-Motion profile HAL routines added.  Tested on Single-Speed Double reduction (with slave Talon too).
-Start moving ctre frame defs into a new common header (better then shoving a bunch of struct defs at top of module).
-New child class in CANTalonSRX for buffering motion profile points.  Not sure it would be best to leave it as is or make another module.  It's trivial now so I thought that was acceptable, (in future it will likely possess compression strategies => no longer trivial).

Change-Id: I803680c1a6669ca3f5157d7875942def6f75b540
2015-12-16 00:02:01 -08:00
Peter Johnson
4b04073389 Remove broken and unused HALLibrary.java.
Change-Id: Iec501cdf2f05fcdee115471e5fa1ce2a6dfb6d57
2015-12-15 20:56:34 -08:00
Peter Johnson
0a06fdb523 Clean up FRCNetworkCommunicationsLibrary JNI.
Change-Id: I37031c1593c7cb902cec33d4dc787daa9ba9765c
2015-12-15 20:48:55 -08:00
Peter Johnson
c2ecffe708 Update to latest UsageReporting.h.
Also fix DigitalGlitchFilter usage reporting for C++ (only report on
construction rather than on each call) and add for Java.

Change-Id: I73758b16d81c40442c4acec43e0aa6804b2ba250
2015-12-15 20:47:21 -08:00
Kevin O'Connor
ec69c6a866 Fix Solenoid Resource object creation. Fixes artf4758.
Change-Id: I8b40d6606d7091fa6e8bf95b75f820e6b524ae06
2015-12-15 20:02:59 -08:00
Peter Johnson
bc0c895619 Take 2 on usage reporting.
The previous commit missed the MindsensorsSD540 value.

Remove wpilibc/Athena/include/NetworkCommunication/UsageReporting.h copy; it
was not actually used (all references except the one in DriverStation.cpp
had been commented out), and has been superseded by the one in HAL.hpp.

Change-Id: I51e2eafa85ee5e40050d702aa0bf69171e887a60
2015-12-14 21:15:47 -08:00
Peter Johnson
9e18330586 Report usage for ADXL362 and ADRXS450.
Change-Id: I31c6b76923923606ea2838f346b24375b97b01ef
2015-12-13 17:52:10 -08:00
Fredric Silberberg
82d89d3b70 Updated to NI image v18
Change-Id: If120eee63c7815bfcf2f05fdf48a0399497a645d
2015-12-11 18:24:01 -05:00
Brad Miller (WPI)
7ba89306ca Merge "Make C++ Analog Potentiometer test work." 2015-12-10 22:13:08 -08:00
Peter Johnson
c70e710caf Remove raw pointer deprecation warnings.
See discussion in 2016 beta forums for rationale.

Change-Id: I86a4c1bd61655f4895e2fe0e935f25dc8a89d830
2015-12-10 21:54:31 -08:00
Peter Johnson
bafe4e56a7 Notifier: Change back to constructor from ATOMIC_VAR_INIT.
Change-Id: Ia0addacee57f03e12f2ca12f7b5a1ba29d913ac4
2015-12-09 20:24:39 -08:00
Peter Johnson
bd2a28f597 Add ADXRS450_Gyro.
This is a digital gyro interfaced via SPI.  Uses the HAL SPI accumulator.

Basic code function successfully tested on a ADXRS453.

Change-Id: Ibc0c7db9964c041fb1e04af4db17e3310ea83c04
2015-12-09 20:24:39 -08:00