Commit Graph

63 Commits

Author SHA1 Message Date
thomasclark
6053a0cc24 Added BuiltInAccelerometer in Java and updated C++
Change-Id: I5a3360c51334e85da6a15fd640f9420bc3b64dca
2014-07-21 10:09:41 -04:00
Jonathan Leitschuh
3d740a9a25 Adds Resource tracking to CANJaguar
Change-Id: Ic5da91d378d997f57c65b3bace5fcfd24485dddb
2014-07-18 15:00:59 -04:00
Thomas Clark (WPI)
1dd1e0be1e Merge "Adds a Unit Test for the Resource object in Java. Fixes a bug in the Resource class caused by allocating a negative resource value." 2014-07-17 12:55:24 -07:00
Jonathan Leitschuh
437e3ff266 Adds a Unit Test for the Resource object in Java. Fixes a bug in the Resource class caused by allocating a negative resource value.
Change-Id: I3a3b368d429dc5cd00baf94ccd80a676a10cbb48
2014-07-17 15:51:01 -04:00
Kevin O'Connor
60d8508a65 Fix artf2636 Don't consume ByteBuffer when checking class specific status
Change-Id: I94e46bd436cc8fd41c7550f1135287027e8be9c4
2014-07-17 15:22:53 -04:00
Kevin O'Connor
02a28c8f04 Add allocation checking for I2C MXP. Update DIO counts in Lib layer until resource checking moves down to HAL
Change-Id: I0abe80bcbe9cbbc81f0887a1cd1a3aa0862df5f1
2014-07-17 15:22:53 -04:00
Thomas Clark (WPI)
d0fdb3e704 Merge "Port SPI to roboRIO. Java SPIDevice renamed to SPI and rewritten to match C++ API." 2014-07-17 12:16:14 -07:00
Jonathan Leitschuh
fc0eb4e956 Adds/updates the documentation for the CANJaguar Classes for C++ & Java.
Also removes private unused methods in Java and an unused constructor.

Change-Id: I0a810a4839a5c6752872d947239dd9305141672e
2014-07-17 14:36:51 -04:00
Kevin O'Connor
343c7f4f3e Port SPI to roboRIO. Java SPIDevice renamed to SPI and rewritten to match C++ API.
Change-Id: I9b2c05a05cbe443331a5b6da6a6d7c7be751a5e7
2014-07-16 16:34:37 -04:00
thomasclark
f566c087dc Fix a few wrong messages in CANJaguar
Change-Id: I8e1a8fa9b0c20a40e060a8319dbbd605173dc407
2014-07-16 10:27:17 -04:00
Brad Miller (WPI)
65c3c0ba09 Merge "Updated the HAL, wpilibj, and wpilibc for PCM and PDP" 2014-07-02 14:04:51 -07:00
thomasclark
255a3a5b12 Updated the HAL, wpilibj, and wpilibc for PCM and PDP
Removed #if 0...#endif from PCM.cpp

Change-Id: I2d117c87a3fa10bddebf83706f79c2e767d22a0d

Update the HAL to the PCM/PDP changes

Change-Id: If554b650e263f174e90864f1e9ffba91daf20f7e

Update C++ to the PCM/PDP changes

Change-Id: Ia3114d4526be1dc5cc2f74fd8f7ab44f204d15f2

Updated PCM/PDP in Java

Change-Id: I8fe03afbcb1739d555e86abc0eaae1e12313d490
2014-07-02 16:49:36 -04:00
thomasclark
b97d2eb0c3 Fixed periodic voltage status message
Previously, the voltage was requested as a percentage and decoded as
a number of volts, which resulted in values being scaled wrong. The
correct message is requested now.

Change-Id: I5e81c7a4a2e2698f2e8a84ba747217e0e14f7676
2014-07-02 12:14:49 -04:00
thomasclark
5bd546f1fd CANJaguar uses periodic status updates [artf2621]
All status data is now in 3 messages automatically sent periodically
by the Jaguar, removing the need to send several hundred requests
every second.

The C++ integration test was also updated to be more robust against
timing problems.

Change-Id: I13bacc6c8173ea1a2291a96ad3bd80ff5b18d16f
2014-07-01 12:02:44 -04:00
Jonathan Leitschuh
4de246876a Adds/Formats the CANJaguar.set() Javadocs
Change-Id: I7e8735d9de336ba906b319b01eff4b2e88fb2a26
2014-06-27 11:24:51 -04:00
Brad Miller (WPI)
606eaa67b9 Merge "CANJaguar waits in the constructor for initial status data" 2014-06-26 09:28:33 -07:00
thomasclark
1cafebc5a3 CANJaguar waits in the constructor for initial status data
The C++ and Java CANJaguar constructors now wait up to 50 ms for the status
data to arrive at least one time.  They break early if it arrives sooner.

This allows status getters to always work immediately after the object is
constructed.

Change-Id: I4a1f1538837c11b24d45e87251743b6c106ddefb
2014-06-26 11:54:58 -04:00
Brad Miller (WPI)
cc76500fdb Merge "* Add WriteBulk and ReadOnly to C++ I2C" 2014-06-26 07:05:26 -07:00
thomasclark
f3593c6986 CANJaguar in Java now requires control mode configuration data at compile time
Change-Id: I80b63e876d330d693375d69137c78e487c03c1c7
2014-06-25 16:25:39 -04:00
thomasclark
1bbf350811 Java CANJaguar changes
Change-Id: Icb15b1b140816e44caec36cda2466a64e5cabf1d

Change-Id: Idd6aebefe03acff5ab211a5e3e73a29563601515
2014-06-24 16:22:25 -04:00
Kevin O'Connor
605148456e * Add WriteBulk and ReadOnly to C++ I2C
Change-Id: If6082f6b92b4be5e328278ba536d5a7681082c9f (+4 squashed commit)

Squashed commit:

[86b4ae7] * Port I2C to roboRIO in JNI and Java. Left read method as a transaction and added readOnly. Left write as a single byte and added writeBulk. Need to go back to C++ and update to match.

Change-Id: I290d84211a4b7bb942d785730c0e6929449cf69f

[7d37419] * Remove HiTechnic sensors from Java. May be added back later as examples

Change-Id: Ie93e23a70fd953c99c03d50d9529220f86d32e03

[e62bfbf] * I2C ported to roboRIO i2clib in HAL and C++

Change-Id: Idb0e8cee5a1e8c1a0b0733ca94b528f659352915

[1059a48] * Remove HiTechnic sensors (Lego connector) may be added back as examples later

Change-Id: I84b8e1e022db2c69d487ed9ad5b3ec0e7ea57282 (+2 squashed commit)

Squashed commit:

[e62bfbf] * I2C ported to roboRIO i2clib in HAL and C++

Change-Id: Idb0e8cee5a1e8c1a0b0733ca94b528f659352915

[1059a48] * Remove HiTechnic sensors (Lego connector) may be added back as examples later

Change-Id: I84b8e1e022db2c69d487ed9ad5b3ec0e7ea57282
2014-06-23 18:23:14 -04:00
Colby Skeggs
f5862582e6 FRCSim artf2604: Synchronized the codebases of WPILibJ-Simulation
and the main WPILibJ.

Change-Id: I9b933b6f21be21cd5e9808b6f8d127a995a742e7
2014-06-23 11:05:46 -07:00
Jonathan Leitschuh
1fb6d9fd0c Updates/Tests the AnalogPotentiometer
New constructor for the AnalogPotentiometer to allow users to pass it an AnalogInput into the constructor
New FakePotentiometerSource to emulate a AnalogPotentiometer

Change-Id: I0f85b3d38e99d7ccbc7676bdf17fc3ec7e041e84
2014-06-18 17:21:53 -04:00
Alex Henning
9ff7412780 Fixes for rebasing.
Change-Id: I765d2f2fc044fb30caef3cda8ff6bd03fef6b4e0
2014-06-17 14:09:58 -07:00
Jonathan Leitschuh
fc2f0e37ba Adds JNI methods for the new CANSessionMUX
Updates the CAN send message to use CANSessionMuxSendMessage in the C++ JNI

Updates the CANJNI to use the new C++ JNI parameters

Change-Id: Ib7da7d5929c7c5656bf388246aa72aed23590173
2014-06-16 15:39:27 -04:00
thomasclark
58021f7397 Removed analog and digital module numbers
AnalogModule and DigitalModule classes still exist, at least until they are
refactored into the classes that use them.

Change-Id: I5544d5418822f19d54ba0a5d651e64fad8b7b10d
2014-06-13 17:57:40 -04:00
Brad Miller (WPI)
fdfc33a380 Merge "Removes the print line from the Preferences class so that the write method no longer causes a system print" 2014-06-13 11:41:34 -07:00
Jonathan Leitschuh
4be3bc25ac Removes the print line from the Preferences class so that the write method no longer causes a system print
Change-Id: I42af95c3bdd48fa1e2d92fe1c70b8e777f822616
2014-06-13 14:36:37 -04:00
Brad Miller (WPI)
c7e7f39c4a Merge "Updates the PID.free() method to release the NetworkTable listener. [artf2571] Documentation update on the Depreciated method. Removes the PID.setTolerance(Tolerance tolerance) method because it was private and never used" 2014-06-13 07:26:19 -07:00
Jonathan Leitschuh
94894931a5 Updates the PID.free() method to release the NetworkTable listener. [artf2571]
Documentation update on the Depreciated method.
Removes the PID.setTolerance(Tolerance tolerance) method because it was private and never used

Change-Id: I5cddbcc96ed40b5bb0d9f33e2a3586dce91dc532
2014-06-13 10:24:32 -04:00
Alex Henning
cb56c9a144 Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.

Added Omar's changes to the compressor interface

Fixes to make C++ plugin compile on linux.

Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.

Fixed wpilibJavaSim artifactId to mirror the new convention.

Modified the build of the java plugin to pull in the simulation dependencies.

Added stacktrace printing.

Fixed support for creating projects.

Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.

Added support for a "WPILib Simulate" button.

Added GearsBot to the built in examples.

Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.

Removed unused import.

Added file browser for world files.

Added support for debugging in simulation.

Change simulate icon to be a Gazebo icon.

Switched over to the gazebo messaging system.

Updated location of default world file.

Reverted cmake change.

Fixed bug in WPILibJSim, added better logging and cleaned up code.

Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.

Added installation to frc_gazebo_plugin Makefile.

Fixed running of simulation to actually use frcsim.

Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.

Added notes for generating protobuf messages.

Import of the debuild process into the main repository.

Moved frc_gazebo_plugin under simulation and removed the gazebo folder.

Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].

Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.

Reduced delay between starting frcsim and the users program to 1 second.

Updated GearsBot example.

Fixed a few minor issues for demoable state.

Added simulator support for Victors, Jaguars and Talons.

Added NetworkTables, SmartDashboard and LiveWindow to the simulator.

Added AnalogPotentiometer for simulation.

Added support for simulating encoders.

Added simulation support for Gyro.

Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.

Added RobotDrive support to simulation.

Separated out JavaGazebo so that SimDS will be able to reuse it.

Separated out SimDS into its own application..

Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.

Added DriverStation support to WPILibCSim

Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.

Cleanup of includes for WPILibCSim

Added AnalogPotentiometer to the real WPILibC.

Added AnalogPotentiometer to the real WPILibC.

Added GearsBot example to C++ eclipse plugin.

WPILibCSim fixes to work with launching from the plugin.

Package libwpilibsim in a deb file.

Added includes to plugin distribution.

Added support for external-limit-switches to Gazebo, Java and C++.

Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.

Added support for internal limit switches.

Updated GearsBot programs to use limit switches + range finders.

Added disabling of motors when robot is disabled to more closely mimic the real robot.

Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.

Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-13 09:31:32 -04:00
thomasclark
3538e2c05c Changed AnalogChannel to AnalogInput, added AnalogOutput for MXP
Change-Id: I863d89c61ff2cf4a7a3aeeca1296978e728758b6
2014-06-12 18:08:20 -04:00
thomasclark
8d5c67e6aa Added Omar's changes to the compressor interface
Change-Id: Iff22b0eaa319065b06795b381c4d6072f8087da8
2014-06-12 12:43:03 -04:00
Brad Miller (WPI)
3c5d46c2ae Merge "Added support for digital and analog IO pins on the MXP" 2014-06-12 06:39:25 -07:00
thomasclark
29c4534c58 Added support for digital and analog IO pins on the MXP
Change-Id: I3a4e14ceab885d19a615d6cd45f22a2250ad2856
2014-06-12 09:09:46 -04:00
Jonathan Leitschuh
8b19137ca6 WPILibJ More Integration Tests
Refactors the MotorEncoderTest to make use of the parameterized testing framework
Adds a test for the Preferences Class
Updates the TiltPanCameraTest to work
Makes the TimerTest use math for long values
Adds a Button Test to Test the internal Button
Speeds up the FakeCounterSource/FakeEncoderSource to decrease test time
Moves the AbstractComsSetup Block to a static method so that it only runs once
Updates the logging.properties class so that tests are quieter

Change-Id: I70b39f34122e6398f406a63e6ef04cde9fbe95ef
2014-06-11 14:43:59 -04:00
Jonathan Leitschuh
85d9ead4e2 Sets the default PIDSourceParameter to be kDistance so there is no null pointer exception
Change-Id: Ice4889ea3f6fd5afe6984f9715758a178222837f
2014-06-11 11:11:01 -04:00
Jonathan Leitschuh
59a1fb2c08 Makes the PIDController completely thread safe and ensures that freeing the PID Loop truly clears it [artf2567]
Change-Id: I96502e1d58bb4353ab5f53086dd275f3c372a7af
2014-06-10 15:44:18 -04:00
Thomas Clark (WPI)
32dc451a72 Merge "Fixes the Preferences putting the preferences in a file 'file:' and instead puts it in the root directory [artf2566]" 2014-06-10 12:36:44 -07:00
Jonathan Leitschuh
63ae47b7e4 Fixes the Preferences putting the preferences in a file 'file:' and instead puts it in the root directory [artf2566]
Change-Id: If532542f1a746bff6b34c9d92462cd1722b4ff05
2014-06-10 15:34:37 -04:00
thomasclark
35ac240d4c Switch to 0-based for all pins on the RoboRIO [artf2564]
Change-Id: I249965a9d55aec53b7d8a9be3ba5cc43500ddda4
2014-06-10 12:44:29 -04:00
thomasclark
59dfb4d216 Removed the old compressor code
Change-Id: Ia36724f42254d49238db687c62f339c2172ba582
2014-06-09 11:12:44 -04:00
thomasclark
36470d3b7c Made Java PCMCompressor methods public
Change-Id: Id5988f8b70868d6b2c9b9060fd0d7435d69c7c58
2014-06-04 19:53:50 -04:00
thomasclark
187aa7a138 Support for the CAN power distribution panel
Change-Id: If4f8f7f050bf1095221cf16f030a6a8a67532656
2014-05-30 14:11:42 -04:00
Brad Miller (WPI)
2bf9db0019 Merge "Adds/Extends several integration tests. Modifies Java Servo with correct values according to the datasheet assoiciated with the Hitec HS-322HD" 2014-05-29 12:59:40 -07:00
Jonathan Leitschuh
efeec5d986 Adds/Extends several integration tests. Modifies Java Servo with correct values according to the datasheet assoiciated with the Hitec HS-322HD
Changes the format of the MotorEncoderFixture usage. Also adds a motor type to easily determine what speed controller is being used

Adds a TiltPanCameraTest to test the Gyroscope as well as the servo classes

Updates the TestBench and the TestSuite to reflect the new tests and the changes to these Tests

Begins integrating a test to check to see if counters and encoders are working correctly

Modifies the ServoClass to have the correct data for PWM generation.
Also  modifies the PWM class to make the setBounds method to be protected

Modifies the TiltPanTest to rotate slower and reduces the acceptable deviation

Reduces the runtime of the MotorEncoderTest by lowering the runtime value

Updates the TestBench to load the Gyroscope before allocating the servos in order to allow for setup time
Also adds Documentation

Reorders the Tests to run the TiltPanTest first

Adds/Updates the copywright header to several files that were previously modified in this commit

Change-Id: I093f998d9687c6b6c6b8d4f6949fbe56ba236212
2014-05-29 15:19:02 -04:00
thomasclark
980d52becc Support for the CAN pneumatics module in C++ and Java
Change-Id: I2ccb1d13d1c5da00a99329c761b75a6c2b3ea56d
2014-05-29 14:43:19 -04:00
thomasclark
c1482cb267 Made CAN actually work in Java
Change-Id: I90709799de02c4cf1800f57bbecd637c76b33469
2014-05-27 15:10:18 -04:00
Brad Miller (WPI)
6b83175b74 Merge "Fixed the package for CANJaguar.java" 2014-05-21 10:21:11 -07:00
Brad Miller (WPI)
9925598da0 Merge "Updated POM files to allow use of compile phase." 2014-05-21 09:51:44 -07:00