Only very basic testing performed to date.
The wrappers are still a bit incomplete (some structures and functions),
but are much more complete than the old ones.
Fixes artf3796.
Changes from initial changeset:
- Use // for comments.
- Add auto-generate notices to the beginning of each generated file.
- Include error number with error text in exception.
- Add free() function to structures.
- Fix out-of-order / non-array enums.
- Avoid duplicate calls to DisposedStruct.write() as .getAddress() does it.
- Refactor OpaqueStruct.
- Default to no null allowed except when overridden.
- Implement unowned return values.
- Add gen_struct_sizer script.
Change-Id: Ie0d102c45817ea8812d98fe4938d1a2255c61664
Adds isEnabled and getSetpoint functions to CANTalon classes.
Sets m_controlEnabled=false in Java if changeControlMode(Disabled) is
called.
Change-Id: I08fd0972df22ad83c5578dd43dd6b3536f3b365b
Added Get/clear routine for IntegralAccumulator
Added missing status check in GetFirmwareVersion(). I don't expect this to affect anything.
JAVA
Renamed getRampRate to getCloseLoopRampRate in java to match the set routines in java, and match all routines in cpp.
Added GetFirmwareVersion to java to match cpp.
Added Get/clear routine for IntegralAccumulator
Retested all three routines in java.
Change-Id: I4ce9d9c87a379b9d4a76aae226e2072876218688
Used to be that if you called Set less than ~20 ms after changing the
mode, potentially unwanted behavior could ensue.
Change-Id: I27cb3603286d8fddd894649787d88c0446b00615
Tested analog PID in Java and C++.
Changed to default to controlEnabled.
Loosely wrapped a bunch of CanTalonSRX functions in Java.
Change-Id: I9da380e2368d9a72f08be4434ac63b5710a9f90f
Allows user to cause gyro calibration on demand. It also exposes
the AnalogInput object as protected to allow the user to extend
the gyro class and implement their own calibration.
Change-Id: Ib4206a9b16ce6d5e8e5ca9c28a14471974705a7f
I also updated the C++ and Java code some. For C++, this meant making it
compile and adding in the framework for the closed-loop control of the
motor. For Java, I updated the JNI bindings with SWIG and created an
GetTemperature accessor function to demonstrate how to use the accessors
because swig does funny stuff with pass-by-reference functions.
Change-Id: If51bf61d0a9bc65a8d497f8d91a5be8d6ff4fdcc
Currently, the JNI bindings are generated by Swig and, unfortunately,
the interface available through Java is lower-level than that for C++
(ie, direct access to the ctre code through the JNI bindings, rather
than an interface on top of that), but it does work.
See eclipse plugins for some short samples.
There are a couple of short unit tests as placeholders.
Still needs some cleaning up.
Change-Id: Iae2f74693ca6b80bf7d5aca0625c66aa6e0b7f85
Added quick samples for C++/Java CAN Talon stuff.
Change-Id: I3acb27d6fd5568d88931e0d678c09973d436735d
If the byte array allocated is longer then the count passed to the
write method, there will be a buffer overflow exception. Only put
the number of bytes specified by count.
Change-Id: I10ff48d5a5cf3f82c4e4e347326be033db300cdb