Tyler Veness
26a36779a6
Performed cleanup of Timer's free functions ( #776 )
...
* GetClock() is now officially deprecated since its comment already informally
did so and the function just forwards to Timer::GetFPGATimestamp().
* The declaration of GetPPCTimestamp() is missing a definition and has been
removed.
* std::this_thread::sleep_for() returns immediately when given a negative
duration, so the check for that was removed from Wait().
2017-11-27 21:59:00 -08:00
Tyler Veness
dfc0656e5c
Fix wpilibj FilterOutputTest null pointer exception ( #778 )
2017-11-27 12:28:25 -08:00
Peter Johnson
0f3f5218ad
Kill FRC_NetCommDaemon as well as robot programs. ( #780 )
...
Also use flock on Jenkins side to prevent multiple simultaneous runs, instead of using teststand mutex.
2017-11-27 12:24:46 -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
sciencewhiz
c9d440f338
Fix Java Compressor test. Make limits same as C++. ( #772 )
2017-11-24 20:14:36 -08:00
Peter Johnson
aa2de65bad
Use Twine instead of StringRef where appropriate. ( #259 )
...
Deprecated interfaces were not updated.
2017-11-24 20:13:00 -08:00
Tyler Veness
a00b2449db
Removed unused includes and replaced Ultrasonic's std::set with std::vector ( #767 )
2017-11-23 20:46:24 -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
Peter Johnson
877c7f51c1
raw_istream: Don't forward declare Twine et al. ( #59 )
...
It breaks existing users who use StringRef.
2017-11-22 23:49:57 -08:00
Peter Johnson
912b74151f
Use llvm::Twine instead of llvm::StringRef in several places. ( #58 )
2017-11-22 21:47:56 -08:00
Peter Johnson
f73db4a49b
Twine::isSingleStringRef(): Support CharKind. ( #57 )
2017-11-22 21:38:25 -08:00
PJ Reiniger
12c4418bda
Added callbacks for CAN ( #757 )
...
Added callback scheme for a pass through to something higher
level. Since the ID is embedded into the arbitration ID, and some
devices can use different schemes whether it is plugged in through a
device or put into the daisy chain (pigeonImu), I made one "internal
data object" for max reusability.
2017-11-22 19:48:32 -08:00
Caleb Smith
0431cf97ff
Cleanup PIDController ( #597 )
2017-11-22 18:56:35 -08:00
Tyler Veness
ba879f4663
Cleaned up variable names for std::lock_guard and their associated mutexes ( #759 )
2017-11-22 17:10:21 -08:00
Tyler Veness
96de0b5b11
Variable name fixes ( #758 )
2017-11-22 17:06:57 -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
029246ed28
Replaced extra constructors in LinearDigitalFilter with llvm::ArrayRef<> ( #755 )
...
llvm::ArrayRef<> replaces both the std::initializer_list<> and std::vector<>
constructor overloads.
2017-11-20 21:23:00 -08:00
sciencewhiz
6377ab774d
Allow deprecated warnings for tests ( #756 )
2017-11-20 21:21:50 -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
Peter Johnson
c73dd807e1
ErrorBase: Remove last use of sstream and iostream. ( #750 )
2017-11-19 20:16:42 -08:00
Tyler Veness
7a0dd9baa9
Add return-to-zero test for LinearDigitalFilter moving average ( #751 )
...
Ensures LinearDigitalFilter moving average returns to zero after non-zero
values are inserted.
Tests for issue #642
2017-11-19 20:16:09 -08:00
Tyler Veness
11f37683c3
Added constructor to PIDController that takes references instead of pointers ( #745 )
2017-11-19 19:06:00 -08:00
Tyler Veness
5af0c9c101
Replaced const variables with constexpr ( #731 )
2017-11-19 19:04:28 -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
Tyler Veness
cf828ca858
Upgraded clang-format to 5.0 ( #103 )
2017-11-19 15:15:41 -08:00
Peter Johnson
7847c69231
Update for wpi::Now() change to microseconds. ( #113 )
...
Also be explicit in docs about what timebase and step are used.
2017-11-19 14:35:50 -08:00
Peter Johnson
7f46b50b21
Unify WPI_Now and HAL_GetFPGATime. ( #743 )
...
Depends on wpilibsuite/wpiutil#56 .
2017-11-19 12:33:36 -08:00
Peter Johnson
0e4a1c5dae
NetworkTable: Add key utility functions. ( #256 )
...
- BasenameKey
- NormalizeKey
- GetHierarchy
2017-11-19 11:52:10 -08:00
Peter Johnson
551504e773
Update documentation for Now() for 1 us steps. ( #258 )
...
This is to match wpilibsuite/wpiutil#56 .
2017-11-19 11:47:37 -08:00
Peter Johnson
85e83f1bba
WPI_Now(): return microseconds, and make backend replaceable. ( #56 )
...
- Add function documentation.
- Use uint64_t instead of unsigned long long
2017-11-19 11:47:06 -08:00
Peter Johnson
7eac3fcbda
Java NetworkTableEntry.setValue() and kin: Handle common Java types. ( #257 )
...
This restores the behavior of the old NetworkTable.putValue() function.
2017-11-19 11:44:54 -08:00
PJ Reiniger
303c259b89
Simulate ADX* family of accelerometers and gyros ( #688 )
2017-11-18 12:31:51 -08:00
Thad House
cd1dbb1e3a
Adds a const buffer listener ( #742 )
...
Replaces need for const_cast in SPI and I2C functions
v2018.1.1-beta-3
2017-11-17 10:01:49 -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
Peter Johnson
e9b0b9d8f6
MjpegServer: Use sink name in title. ( #112 )
...
Fixes #83 .
2017-11-17 09:34:30 -08:00
Peter Johnson
cad1b9413c
Add exposure quirk for LifeCam Cinema. ( #111 )
...
This is the same quirk as the LifeCam HD-3000.
Fixes #110 .
2017-11-17 09:30:56 -08:00
Peter Johnson
3324bcc5ce
Use magic statics instead of ATOMIC_STATIC. ( #109 )
2017-11-17 09:29:20 -08:00
Peter Johnson
20c8d29ae9
Fix wpi::mutex usage in SetVideoMode().
2017-11-17 02:04:24 -08:00
Thad House
110726c5bf
Adds support to test library for JNI testing ( #54 )
2017-11-17 01:53:25 -08:00
Peter Johnson
df7c1389de
Remove ni-libraries libi2c and libspi.
2017-11-16 23:01:28 -08:00