Years update, references to WIND_BASE were removed, and WPILib license was
moved to the root directory of the project.
If there was already a comment block, a year range through 2016 was created
using the first year in the comment. If there was no comment block, a block
with just the year 2016 was added.
Comments were not added to files from external sources (NI, CTRE).
Change-Id: Iff4f098ab908b90b8d929902dea903de2f596acc
Having the HAL take a NATIVE_MULTIWAIT_ID without any way to get that
structure from extern "C" code is a problem. This makes it so it just
takes a MULTIWAIT_ID, and then grabs the native handle inside the HAL.
Change-Id: I06da18ba34adcea2f16e4e53da672f38be79e28e
Signed-off-by: Dustin Spicuzza <dustin@virtualroadside.com>
If a lock is used with a mutex that doesn't need to be unlocked again before the lock is destroyed, std::lock_guard can be more efficient than std::unique_lock due to less overhead.
This commit also removes a redundant set of curly braces in PIDController.cpp intended to constrain a lock's scope.
Change-Id: Idd692ce439528ddb319a4c62c40c7351a664eb97
builds two libraries, Athena and Desktop.
Simulation should use Desktop, Robots should use Athena
Also:
- copied Driverstation and Joystick from Devices into Sim
- Descreased dependency of pthreads in JNI.
- removed Simulation ifdef from non simulation
- added missing decprecated attribute for msvc
- removed usage reporting from sim
- removed unused pom.xml and constexpr
Change-Id: If8eb540f9434dce17c77a245fda6985713e80b2d
This deals with the majority of the user-facing code
in wpilibC++Devices and a substantial portion of it in
wpilibC++. wpilibC++Sim and wpilibC++IntegrationTests
are untouched except where it is necessary to make them
work with the rest of the libraries.
There is still a lot to do in the following areas:
-The HAL (which we may not want to touch at all).
-The I2C, Serial, and SPI interfaces in wpilibC++Devices,
which I haven't gotten around to doing yet.
-Most wpilibC++Devices classes have void* pointers
for interacting with the HAL.
-InterruptableSensorBase passes a void *params for
the interrupt handler.
-I haven't converted all the const char* to std::strings.
-There are plenty of other cases of raw pointers still
existing.
-This doesn't fall directly under raw pointer stuff,
but move syntax and rvalue references could be introduced
in many places.
-I haven't touched vision code.
-The Resource classes conflict (one is in the hal, the other
in wpilibC++). Someone should figure out a more
permanent fix (eg, just renaming them), then doing
what I did (making a new namespace for one of them,
essentially the same as renaming it).
A few other things:
-I created a NullDeleter class which is marked as deprecated.
What this does is it can be passed as the deleter to a
std::shared_ptr so that when you are converting raw pointers
to shared_ptrs the shared_ptr doesn't do any deletion if
someone else owns the raw pointer. This should only be
used in making old raw pointer UIs.
-I had to alter the build.gradle so that it did not
emit errors when deprecated functions called deprecated
functions. Unfortunately, gradle doesn't appear to be
actually printing out gcc warnigns for some reason.
The best way I have found to fix this is to patch
the toolchains (https://bitbucket.org/byteit101/toolchain-builder/pull-request/5/make-gcc-not-throw-warnings-for-nested/diff)
so that a deprecated function calling a deprecated
function is fine but a non-deprecated function calling
a deprecated function will throw a warning (which we
then elevate with -Werror). I believe that clang
deals with this properly, although I have not
tried it myself.
Change-Id: Ib8090c66893576fe73654f4e9d268f9d37be06a2
Implemented setTaskPriority() and getTaskPriority() in Task HAL API
Removed all other unimplemented functions in HAL and removed spawnTask()
Replaced instances of pthread_t* with TASK typedef
Removed unused HAL error constants and removed commented-out classes and functions in wpilibj's HALLibrary
Changed Task class API to match the construction semantics of a std::thread
Change-Id: I3bc951a3da90d24c5589fae4d1ca2bb60225c873
Because we want to be able to compile/run wpilibC++Sim on
windows, we would prefer not to require a windows version
of pthread. This commit moves from pthread constructs to
standard library constructs.
Change-Id: I12392a8910189537dd067afdf017e4994d570a66
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
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
This is the changes made by Patrick Plenefisch converting the native
code to use CMake and the CMake Maven Plugin, as opposed to the
native Maven plugin. This is to allow for compatibility with newer
versions of the GCC toolchain. All the cpp sources were moved from
maven style directories to cpp style directories for CMake.
Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593