- Fix sliceByteBuffer, getBytes, and putBytes implementations, which had
functional errors. Also, getBytes and putBytes now use the ByteBuffer
get/put byte[] functions, which should improve performance.
- Don't generate wrappers for functions that are not available in the
shared library.
Change-Id: Iaf45814b34720d3fdcd58adf99ad9c3ff2703bc3
- sliceByteBuffer() was not setting native order on the duplicated buffer.
This caused all array-copyin functions to generate bad values.
- Correctly handle unsigned byte and unsigned short values. These could
read/write to bad locations previously.
- Implement custom version of imaqReadFile() to always pass in NULL for
the colorTable. Eventually a more-complete version should be written.
Also this works around a crash in imaqGetErrorText() by not calling it from
throwJavaException(). It's not clear why imaqGetErrorText() is crashing at
present (my best guess is there's still something fishy with multiple C++
lib versions getting loaded somehow), as this used to work. Instead,
the exception now just gives the error code without the error message,
which is not user friendly but at least doesn't crash. This will be fixed
in a future commit by creating our own version of imaqGetErrorText() based
on the information available in the header file.
Change-Id: I4d099e62ee41f8e2a50089806561be191cb5d9d7
AnalogTrigger.createOutput is now public. It was mistakenly made
package local before.
The AnalogTriggerType enum now uses the same naming convension
as other enumerations in WPILib. There's no way that this breaks
existing code, since AnalogTrigger.createOutput wasn't public before
this commit.
Change-Id: I9a2b921a996012f61dac0e395602f8cc429d7611
This includes getters, setters, video mode enumerate, and get image data.
These are necessary to improve the CameraServer code performance.
Also clean up unused return generation.
Change-Id: I3e7365e046d0ea9370586c5158138a5b07e20218
Change-Id: Iaa4062ec124b968b27e7c812cc754032fcb354d2
Add methods to retrieve the FPGA index for counters and encoders and return the encoding type as an integer
Change-Id: If04dc291f39a9b331495d2b97a8b87d3ded71280
The API is basically the same as the C++ one.
The JNI function for Priv_ReadJPEGString_C was manually renamed, since the
python scripts don't name the C++ functions correctly, causing an
UnsatisfiedLinkError at runtime. If further changes are made to the bindings,
either the method will have to be manually renamed again after the code is
regenerated, or the python scripts will have to be updated.
The old ignored edu.wpi.first.wpilibj.camera package was removed.
Change-Id: Icd37fc15c7bb41061568c3b2f580c6765cbf0300
Ported the NIVision libraries from the old NIVision implementation to
the new autogenerated JNI bindings.
Change-Id: I7c68ca6abef1185d59a9787e9a269d720c825e2f
This fixes all encoder variants with the getRate and getPeriod methods.
The clock speed in the HAL was updated, as was the scaling factors for setting
the stall periods. A default of .5 seconds is now set for the max period.
Additionally, a long standing bug was fixed with Java 2x encoders.
Changed tests to take into account the increased default timeout on encoders
Change-Id: I8b54c07ea467154be94d7ae7e9ada1775933dee4
They already existed in Labview, so this will keep parity
New C++/Java funcs
ConfigFwdLimitSwitchNormallyOpen
ConfigRevLimitSwitchNormallyOpen
Change-Id: Ifd65ead827838e7158f7261c67adc3738c72eabf
A simple improvement was to only perform the disable-before-next-set strategy if the caller's request mode is not equal to the current mode.
To keep things simple, SetControlMode was renamed to private method ApplyControlMode so we can still invoke it from c'tor.
Then, the new impl'n of SetControlMode() just calls ApplyControlMode() when caller's request mode is different. That takes care of direct-calls from team source, and indirect calls through enableControl().
Applied to both c++ and java.
Tested in java so far...
Change-Id: I934c06c5339d933918470659acd635e12eb4d113
Java...
added setStatusFrameRateMs() to modify the frame rate for status frames
added missing func that already exists in c++
isFwdLimitSwitchClosed()
isRevLimitSwitchClosed()
getNumberOfQuadIdxRises()
getPinStateQuadA()
getPinStateQuadB()
getPinStateQuadIdx()
added getAnalogInRaw() that doesn't count overflows (for potentiometers).
added setStatusFrameRateMs() to modify the frame rate for status frames
added getBrakeEnableDuringNeutral()
C++...
added GetAnalogInRaw() that doesn't count overflows (for potentiometers).
added SetStatusFrameRateMs() to modify the frame rate for status frames
added GetBrakeEnableDuringNeutral()
added kLimitMode_SrxDisableSwitchInputs to CANSpeedController::LimitMode
Patch set 2: Joe Ross, fixed two javadoc errors
Change-Id: I0bf871e138953de60eeacb547dc359f2125b1327
Increased wait delay to 4ms to cover worst case delays for solicted signal getters.
Specifically....
-Get firmware vers
-Get P,I,D,F gains
-Get IZone, Get CloseLoopRampRate
-Get IAccum (integral accumulator)
Change-Id: I313ea984832cce5182af8e5af5e775837fd54fdc
The other remaining closeloopramprate changes are also merged into this commit, so they may be redundant on gerrit.
Change-Id: Ic3108bb3669e487009b8f52412da3c2f44c42f6f
Change-Id: I4c41b560d879ffc6d8aa4681cad8f75297fe6cda
Fixed some issues with the camera server class
Change-Id: Ifda524b55f84053be004a404a2890905ded7b266
- IMAQdx typedef overrides were being ignored, resulting in incorrect types
(e.g. IMAQdxSession was a long instead of an int).
- Allocated byte buffers byte order was not being set.
- imaqDispose was incorrectly named.
Change-Id: I5d038d45e82755615f0a5bb928defb98f557f93e
The param is capped in the HAL C++ class to [1ms, 95ms] so that zero and negative periods are caped to 1ms, and so that caller can't pass an absurdly large value, which causes TALON is appear disabled.
Change-Id: I4207194be25a33bbd6ad281a75301ce6684659a5