sciencewhiz
cbd08a1e11
Add tests for equivilance of RobotDrive and DifferentialDrive/MecanumDrive ( #732 )
...
Add documentation for how to get same results as RobotDrive and improve
RobotDrive documentation
2017-11-29 21:41:00 -08:00
sciencewhiz
e308dd28f3
Fix javadoc link in Solenoid.java ( #789 )
2017-11-29 21:33:29 -08:00
Tyler Veness
34c44b7ae9
Improved Drive docs and fix implementation bugs ( #774 )
...
I also found some inconsistencies in MecanumDrive and KilloughDrive and fixed
them.
Drive now uses the NED axes convention. Therefore, the positive X axis points
ahead, the positive Y axis points to the right, and the positive Z axis points
down.
Translation in X assumes forward is positive. Translation in Y assumes right is
positive. Rotation rate assumes clockwise is positive. Angles are measured
clockwise from the positive X axis.
Based on the angle origin convention, DrivePolar() for both Mecanum and Killough
needed the normalization removed, sine used to compute the Y component, and
cosine used to compute the X component.
The vector rotation done in DriveCartesian() needs to rotate by a negative angle
instead of positive to undo the robot's rotation. RobotDrive assumed a clockwise
angle and sensors returned counter-clockwise angles, which is why it used a
positive angle for rotation.
2017-11-26 18:36:51 -08:00
sciencewhiz
7a250a1b93
Implement PCM One Shot feature. Fixes artf4731 ( #539 )
2017-11-26 12:55:21 -08:00
Caleb Smith
a338ee8be0
Add PIDController Wrapping ( #601 )
2017-11-25 21:15:33 -08:00
Tyler Veness
5c659fdcdf
Deprecated PIDController::SetTolerance() ( #764 )
...
PIDController::SetPercentTolerance() behaves identically to it, so removing
SetTolerance() leaves one obvious way to do absolute or percent tolerance.
2017-11-23 01:21:36 -08:00
Thad House
d36d72bd4f
Fixes MotorSafetyHelper locking and race conditions ( #762 )
...
Closes #760
2017-11-23 00:36:57 -08:00
sciencewhiz
614093c0c4
Fix documentation for getMatchTime in Timer class to match DriverStation ( #761 )
2017-11-23 00:19:05 -08:00
Caleb Smith
0431cf97ff
Cleanup PIDController ( #597 )
2017-11-22 18:56:35 -08:00
Tyler Veness
85157a56c3
CircularBuffer now uses an idiomatic interface in C++ and Java ( #421 )
2017-11-22 17:04:57 -08:00
Tyler Veness
05e581f409
Fixed crash in wpilibj SampleRobot ( #753 )
...
robotInit() and HAL.observeUserProgramStarting() should be called in
startCompetition() rather than the constructor.
Fixes #752 .
2017-11-19 22:47:39 -08:00
Tyler Veness
259461aee9
Added PIDController::GetAvgError() back in ( #749 )
...
It got removed during the LinearDigitalFilter change (#38 ) instead of deprecated
by mistake.
2017-11-19 18:23:48 -08:00
Peter Johnson
d214b36786
Change HAL notifier to polling. ( #627 )
...
This moves the thread code to the WPILib layer, fixing various potential
races and significantly simplifying the HAL implementation.
2017-11-19 17:58:40 -08:00
Tyler Veness
4a07f0380f
PIDController class now uses LinearDigitalFilter for filtering velocity instead of internal queue ( #38 )
2017-11-19 15:58:30 -08:00
Peter Johnson
a20474bfc7
Update sensors to not use direct byte buffers.
2017-11-17 09:36:57 -08:00
Peter Johnson
479d0beb5a
SerialPort: Use byte[] instead of ByteBuffer in JNI.
2017-11-17 09:36:57 -08:00
Peter Johnson
b93aa176d6
AnalogInput: Remove byte buffer usage.
2017-11-17 09:36:57 -08:00
Peter Johnson
9021b37fd2
I2C: Provide byte[] JNI interfaces.
...
This avoids a direct byte buffer allocation on every read/write/transaction
on the byte[] variants.
Changes HAL I2C interfaces to use const for dataToSend.
2017-11-17 09:36:57 -08:00
Peter Johnson
6307d41002
SPI: Provide byte[] JNI interfaces.
...
This avoids a direct byte buffer allocation on every read/write/transaction
for the byte[] variants.
Also change spiGetAccumulatorOutput() to directly set the AccumulatorResult
object, avoiding a ByteBuffer allocation.
Changes HAL SPI interfaces to use const for dataToSend.
Fixes #733 .
2017-11-17 09:36:57 -08:00
Thad House
dd7563376b
Force load OpenCV and cscore libraries on program initialization ( #716 )
...
Fixes bugs where Mat's are initialized before anything cscore was
called.
2017-11-14 22:04:53 -08:00
Tyler Veness
14fcf3f2f0
Simplified PIDController integration logic ( #645 )
...
A clamp() helper function was written based on C++17's std::clamp().
2017-11-13 22:28:55 -08:00
Thad House
7bbd13d914
Adds match specific calls to Java and C++ ( #720 )
...
Uses caching, matching the joystick calls.
2017-11-09 19:59:29 -08:00
Tyler Veness
7efab4c43a
Replaced ternary operators with if statements ( #346 )
...
Instances of the ternary operator were replaced with if statements to make the code base more consistent.
2017-11-08 23:44:03 -08:00
Peter Johnson
f3cd883c5c
Add Nidec Brushless motor. ( #705 )
2017-11-08 23:40:01 -08:00
Tyler Veness
8b2e656bde
Fixed Java velocity PID not calculating result when P = 0 ( #717 )
2017-11-08 21:28:09 -08:00
Thad House
f4dce9e608
Fixes receive size in Java I2C ( #715 )
...
Allows underrun, which matches c++ behavior.
Fixes #711
2017-11-07 18:43:23 -08:00
Sam Carlberg
237b2df82f
Add .type metadata to preferences table ( #701 )
...
Allows shuffleboard to automatically discover the type, instead of inflexibly hardcoding it
2017-10-30 21:50:49 -07:00
Peter Johnson
a70687aaec
Improve error reporting for the new TCP netconsole. ( #700 )
...
Fixes #695 .
2017-10-30 21:50:14 -07:00
Tyler Veness
595b1df380
Fixed minimum number of joystick axes ( #696 )
2017-10-29 17:21:50 -07:00
Thad House
efc7770e9b
Fixes NPE in DriverStation initialization ( #694 )
...
Introduced by #626 .
2017-10-27 23:16:42 -07:00
Tyler Veness
21585f70a8
Added functions for detecting button press and release events ( #626 )
...
I also shuffled around the HID interfaces to be more intuitive, deprecated some
Joystick and XboxController member functions, and deprecated the JoystickBase
and GamepadBase classes.
Supersedes #89 .
2017-10-27 21:45:56 -07:00
sciencewhiz
12e96c6f13
Add usage reporting to CameraServer ( #682 )
2017-10-27 00:45:54 -07:00
Austin Shalit
b65447b6f5
Fix spelling typos ( #595 )
2017-10-27 00:44:51 -07:00
Thad House
a1ea448406
Adds JNI call to get CANStatus ( #677 )
...
Call already existed in the HAL.
2017-10-21 15:32:05 -07:00
Tyler Veness
9dc1de1d09
Specified angle units for Vector2d rotate() function. ( #679 )
...
Fixes #676 .
2017-10-21 15:29:39 -07:00
Austin Shalit
2fc60680f4
Remove RedundantModifiers ( #578 )
2017-10-17 21:47:55 -07:00
Austin Shalit
877a9eae1f
Add SpeedControllerGroup ( #362 )
2017-10-16 19:54:36 -07:00
Sam Carlberg
f0cc623241
Change metadata format to dotfile, make certain entries metadata ( #666 )
...
Sendable's "Name" is now ".name"
Sendable's "Subsystem" is now ".subsystem"
Command's "name" is now ".name"
Command's "isParented" is now ".isParented"
2017-10-11 20:27:49 -07:00
Jacob Caporuscio
ba3a85d0cc
Changes TalonSRX to PWMTalonSRX in wpilibj and wpilibc. ( #656 )
...
Also brings the java kResourceType list up-to-date with the cpp list.
2017-10-11 12:01:50 -07:00
Tyler Veness
19addb04cf
Split RobotDrive class into a class for each drive type ( #552 )
...
DiffDrive.CurvatureDrive (aka CheesyDrive) and KilloughDrive were also added.
This reorganization paves the way for SwerveDrive.
2017-09-28 23:30:00 -07:00
pjreiniger
db4981f166
Java now asks the HAL if it is a simulation or not ( #647 )
2017-09-23 07:56:53 -07:00
sciencewhiz
423d8f6860
Add missing usage reporting. ( #639 )
...
Compressor C++/Java
Servo C++
2017-09-19 21:17:27 -07:00
Peter Johnson
34c18ef000
Remove getTable from wpilibj Sendable interface.
...
This allows nearly all m_table member variables to be removed.
2017-09-06 22:29:04 -07:00
Peter Johnson
4e80570c4c
Update wpilibj to use new NetworkTables package and interfaces.
...
This may be breaking to CANSpeedController implementations.
2017-09-06 22:29:04 -07:00
Peter Johnson
91529cc435
Update NetworkTables for new API.
...
This fixes breakages due to the JNI move.
Depends on: https://github.com/wpilibsuite/ntcore/pull/204
2017-09-06 22:29:04 -07:00
Peter Johnson
ef3267833f
Fix IterativeRobot/TimedRobot RobotInit(). ( #633 )
...
In C++, it's not legal to call a virtual function from within a constructor,
so the user override was never called (the base function is always called).
See https://isocpp.org/wiki/faq/strange-inheritance#calling-virtuals-from-ctors
While this is technically allowed in Java, also change Java for consistency.
2017-09-05 23:57:26 -07:00
sciencewhiz
a5ef50c9e7
Add documentation for PeriodMultiplier ( #632 )
2017-09-04 22:03:02 -07:00
sciencewhiz
6eee457898
Renable javadoc fail on error ( #631 )
...
Remove reference check and fix HTML error
2017-09-03 14:10:40 -07:00
sciencewhiz
2d78fdabb8
Fix recieve typo in JNI names. ( #629 )
...
Fixes #594
2017-09-01 22:48:33 -07:00
Tyler Veness
f151892db5
Contents of copyright line now has more standard ordering ( #585 )
2017-08-24 00:06:13 -05:00