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
Add IMAQdx and its dependencies
Change-Id: I6befa563e96db224db83fb90985c86eb3e8d4f3e
Add a "CameraServer" class for C++
This class allows the driver station's camera viewer to interact with
a C++ program. It includes both an automatic mode to send images from
a webcam to the dashboard in a background thread, and an option to
manually feed it IMAQ images.
Change-Id: I54fdb164c00dce165859c22f435be647dc9927cc
Fleshed out CANTalon interface; it currently works just to write a
throttle. The firmware doesn't fully support everything yet, so we are
still significantly limited.
Change-Id: I2868c4c168a8cb42cda754589777beef31ffd354
CANSpeedController is a subinterface of SpeedController that adds method
prototypes and enums for all of the common smart speed controller features.
CANJaguar implements this interfaces. CANTalon does too, but
most methods are stubs right now.
Change-Id: I67e0177d91e45444657280502a247d787ad5c74c
We were having issues with intermittent PID tests because one of the
motors on the test stand was sticky and needed a bit of a push to start.
Change-Id: Ic75cd38de867a74be3e4e445bd0d02323dfc4df8
Re-number MXP DIO to match pinout (include SPI and I2C pins) (fixes artf2664)
Change PWM MXP mapping to accommodate DIO re-mapping
This re-implementation also fixes artf2668 for C++ and Java
Change the test bench to reflect this change also
Change-Id: If30bd6a85a9f1f619fbde06a4ecd595a15fd28f7
When interrupts are cancelled on any interruptable class, the resource is now
freed. Previously, the resource was only freed if the object is destructed
before CancelInterrupts() is called, so it was impossible to create and
destruct more than 8 interrupts.
The interrupts resource object is now in InterruptableSensorBase instead of
SensorBase.
A synchronous interrupt integration test was added.
Change-Id: I0806176340cecd4c1480dd8f043474cc05919f24
The gyro class no longer attempts to set a default deadband, but it still
has an optional SetDeadband() method.
The gyro integration tests were modified and still pass consistently.
Change-Id: I08a97b00b98b49b0a3c63306fcc809857523af2b
TestEnvironment::SetUp() will only initialize the first time it's called.
This allows the --gtest_repeat flag to be used to automatically repeat
the tests.
Change-Id: I20c857a37a88f48114d74ae68518d4a9d724d012
Analog interrupts now work in C++.
The interrupts Resource was moved from a global in DigitalInput
to a static member of SensorBase.
An analog interrupt IT was added, and the digital interrupt one modified
to prevent a linker error.
Change-Id: I9a300daafed15e9666a4ccb405a509615e3dbb06
Analog triggers now work in Java.
Integration tests for analog triggers are included.
A message in the C++ analog trigger IT was fixed.
Change-Id: I50007c6901b8391d32c0e81becdbe18e48a7840f
Analog accumulators now wait for the amount of time a full sample
(including oversampling and averaging) lasts after
AnalogInput::ResetAccumulator() is called, so they don't return
old values after being reset.
This delay should be microseconds long and will only happen
when an accumulator is reset.
A new test is is the C++ TiltPanCameraTest that tests this behavior
with the Gyro class.
Change-Id: I1b3ffdeec187959f95c5e637a6d428c9a4bc2cf4
Some tests are more explicitly named now, and negative values are
tested with both voltage and current control.
Change-Id: I316ccfb7670a341e2f13f4ed3a514f283625409e
When an error is reported or an assertion fails in C++, a line is now
printed with information about where the error occured, and a stack trace
is printed.
The stacktrace isn't implemented in the HAL because it's not
hardware-dependent, so StackTrace.hpp and StackTrace.cpp are gone.
The Eclipse project template is modified to include "-export-dynamic" in
the linker options, which is necessary for stack traces.
Change-Id: Ie86c14185b13ed603d0fe6467e87ba4f731b1913
The CANJaguar class now stores a controlEnabled flag. When disabled, it
won't verify the control mode, which involves sending enable messages.
Change-Id: I8baa48eec31de6b4d3fee2b5a074320542a1bbef
A PDP channel number is correct now, the deploy script was changed to
kill Java programs before running and ignore useless messages,
the "Waiting for enable" message is only printed once, and the accelerometer
test is more robust.
Change-Id: I2226140d8c3e44c452e039c27f4f1cf11c952c42
The gyro sensitivity is fixed, the Accelerometer interface is
now used, and some tolerances are adjusted.
Change-Id: Iac1f3c4fbae3be923bd97692684ff72cd2f623f9