Commit Graph

50 Commits

Author SHA1 Message Date
Brad Miller
1d0a6b8ace Fix all the samples to build with the C++11/14 language features (constexpr) 2014-11-11 09:15:46 -05:00
Brad Miller (WPI)
cd3db9631e Merge "Move user program to home\lvuser based on comments from Joe" 2014-11-05 05:23:22 -08:00
James Kuszmaul
767686ae2e [artf3717] Added isEnabled to Teleop Loops in Samples.
Anywhere in the sample programs where there was just a
isOperatorControl() in the while loop for Teleop, added an "&&
isEnabled()".

Change-Id: Ib81e8bab79923e262c314a073a591855cbf06846
2014-10-27 15:55:47 -04:00
Kevin O'Connor
8c395ca292 Move user program to home\lvuser based on comments from Joe
Change-Id: I289cfb4603a4ead6641161191129cb5ca0ea9858
2014-10-27 13:43:07 -04:00
Brad Miller (WPI)
5b2520c35f Merge "Fixed building of the frcsim-libwpilibsim-cpp deb." 2014-10-27 09:40:22 -07:00
Alex Henning
fa8d7b843c Fixed building of the frcsim-libwpilibsim-cpp deb.
There is still a bug where the examples have been updated to use 0 based
joysticks, but the simulation libraries have not been updated. I'll fix
that as a separate commit focused on fixing the joystick APIs.

Change-Id: I3b358e67b7fa18b30d1fd2b53098659cfefdfd76
2014-10-26 20:43:50 -04:00
James Kuszmaul
20c60a5fe6 Added C++ Encoder samples to Eclipse Plugin.
Reads values from quadrature encoder and displays them on the
SmartDashbord.

Also added Encoder with Motor Control example, which is identical to the
Motor Control sample but displays an encoder value on the
SmartDashboard.
2014-10-24 16:01:11 -04:00
James Kuszmaul
9af070a4af Added C++ sample for CAN monitoring of PDP.
Uses CAN to monitor PDP and displays values on the SmartDashboard.

Change-Id: Icb06fec0b65ce02b7c396e7d4e379cee0d959095
2014-10-23 10:07:53 -04:00
James Kuszmaul
3abd352be9 Added sample programs for Solenoids and Relays.
Added a sample program to the eclipse plugin which uses joystick buttons
in Operator Control mode in order to control the output of a single and
a double solenoid.
Also added a sample program which uses joystick buttons to control a
spike/Relay.

Bonus: The title on the window that you get when you are opening a sample in
C++ said "Java" instead of "C++". Fixed now.

Change-Id: I0d01c23003d1fba2dbb08cbe6977ec886d97a22f
2014-10-22 09:34:52 -04:00
James Kuszmaul
311a690262 Added sample program for Motor Controller.
Sample uses joystick output to directly control a motor controller.
Added to C++ eclipse plugin with in same way as Java MotorControl
sample.

Change-Id: I7ce36b8000fbeb94e637a820f82399462b1416e5
2014-10-21 10:03:02 -04:00
Kevin O'Connor
f99b57b1fe Run the scheduler in disabled (fixes artf3631)
Change-Id: Ib1614e2c96b4cda580110ea427398bcfe2ff6fbe
2014-10-15 15:32:38 -04:00
Patrick Plenefisch
591e1de721 use WPILIB eclipse var & use luna to build
Change-Id: I5e8560329226fca3c60f337b6b4744c50a09cdc9
2014-10-08 10:39:06 -04:00
Brad Miller
2f26361398 Added Mecanum drive sample program
Change-Id: I0538c21116cd6c8836f76b6d4446b83d8723a20f
2014-10-05 16:03:36 -04:00
Patrick Plenefisch
244ecd23ee Too many bugs with LTO in GCC 4.9 & Binutils 2.24. Disabling. Maybe later.
Change-Id: Id10ebb9768743e5f852275ae1f1d7a80094c99ed
2014-10-02 23:15:50 -04:00
Brad Miller
8b806e11e2 Added Arcade C++ example and a hierarchy for C++ examples.
Change-Id: I31094dd4f158345103628aacd7de3cb86f27c483
2014-10-02 14:42:24 -04:00
Brad Miller
1cef27134e Changed joystick port numbers to be zero-based for C++ and Java.
Change-Id: Ifd55e8654be3b15abbe7460d2e9e6fff8acd9977
2014-10-01 11:25:51 -04:00
Patrick Plenefisch
fa4a39dcc6 Initial linker script to abstract away the massive library list
Change-Id: Iada981fc9d50c640d4c519f5024f48f6b3df7433
2014-09-25 17:13:37 -04:00
Patrick Plenefisch
21f728c802 Moving to arm-frc-linux-gnueabi in cproject and attempting to use gdb (overwritten)
Change-Id: I7dd5017f461bbff82c5ed6f64842880e4f0a44c9
2014-09-23 22:19:43 -04:00
Patrick Plenefisch
1f35670a18 Enabling C++14 and removing path for new toolchains
Change-Id: I248d27cceeb16fd2b5690a9637245c7451f2c527
2014-09-23 15:23:48 -04:00
Patrick Plenefisch
d1d81e5e19 Remove unnecessary config for cproject/Simulate target
Change-Id: I5576959974bede623fb0fe267f0d8b163124c2c9
2014-09-23 15:20:45 -04:00
Patrick Plenefisch
8199fb28d8 Updating template .cproject to avoid specifiyng commands and defaults
Fixes unknown GCC errors (supposedly)

Change-Id: I7688b8cd66f8ea70195a7e60500e212766415eb2
2014-09-21 16:38:42 -04:00
Kevin O'Connor
62d6579428 Add missing semi-colon to cproject file
Change-Id: I540730c3a4be32c6a636296ce36aab5b230afc8a
2014-09-16 00:50:43 -04:00
Kevin O'Connor
d9b974300f Add quotes around linker flag path to libs (fixes artf2390 / artf3453)
Change-Id: I0d4aac49edb0e93f0bfd2cc8937eca476deafc4c
2014-09-08 14:45:08 -04:00
Thomas Clark
2144b853d1 Set the cpp-version variable per-project
Set cpp-version in the build.properties of each C++ project, instead of
globally in wpilib.properties.  It's 'current' by default.

Change-Id: I4618131be14390f51763b39aa751aa110f7af56f
2014-09-03 16:37:33 -04:00
Kevin O'Connor
e5e568fa73 Wrap CPP Lib and Include paths in quotes (fixes artf2390)
Change-Id: Ied08c559140ecb28a41f61d968a37cd772255b8c
2014-08-27 15:27:18 -04:00
Joe Ross
023f955a56 Change SampleRobot template to use 0 based PWM
Change-Id: Ia299db32ba724e5a5ddc2e9a3c0dbb5d8acbb08f
2014-08-23 15:06:31 -07:00
Kevin O'Connor
597e209c09 Add back SampleRobot Template
Add GettingStarted example based on IterativeRobot

Change-Id: Ic8caec4f62b7bdbaae7fafedfec5859b2f936809
2014-08-14 07:51:20 -04:00
Thomas Clark
f7e1753e03 Fix C++ linker settings
Change-Id: I980e00968b0b465e6bba26a6586e23cc4e20f320
2014-08-13 11:56:36 -04:00
Alex Henning
ae10d43900 Fixes for examples and Gazebo 3.1.
Change-Id: Ie41a29b4b8f5cee87357f44adb45f54e03487622
2014-08-12 15:47:10 -04:00
Thomas Clark (WPI)
d4e377fc0e Merge "Adds the Trigger template and adds WPILib.h import to all templates" 2014-08-12 12:33:46 -07:00
Jonathan Leitschuh
9126646fef Adds the Trigger template and adds WPILib.h import to all templates
Change-Id: Ibaecc4802822cf4c0a4a5bf9ddc960b96e40d1e9
2014-08-12 15:32:29 -04:00
Jonathan Leitschuh (WPI)
1742634a96 Merge "Fix the example programs" 2014-08-12 12:06:42 -07:00
Thomas Clark
d5c73c95dc Fix the example programs
Remove the test examples that don't do anything helpful

Fix the PacGoat and GearsBot examples to compile

Change-Id: Ic11ca7a97a5b52524fe60dc24fcec6ecfae7ebb7
2014-08-12 14:52:22 -04:00
Alex Henning
ca7dc5d6ac Removed excessive linking.
Change-Id: Iffc8517da2a4d6b67612b6076023211c07768714
2014-08-12 12:07:09 -04:00
Alex Henning
66e1f2a184 Fixed a few bugs with C++ due to the merge.
Change-Id: I6c5120ff502b40ecba0884f5a3631fa91822cfd4
2014-08-12 10:12:55 -04:00
Thomas Clark
c58a86a3ab Fix the default C++ linker settings
Change-Id: I839b67fa6e9798f980db05f5a4ff9c8f47c32424
2014-08-11 11:27:48 -04:00
Colby Skeggs
0f93247641 Completed artf2675 - rename SimpleRobot -> SampleRobot.
Change-Id: I23fc503f64fa6a715867f4b92f9d03e21f6c5f82
2014-08-08 10:50:16 -07:00
Thomas Clark
89fe909ae6 Added stack traces and better error reporting in C++
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
2014-07-28 16:35:45 -04:00
Jonathan Leitschuh (WPI)
99632e003b Merge "Fixed the Command-Based Robot template [artf2550]" 2014-07-22 11:00:46 -07:00
thomasclark
fe12394c93 Fixed the Command-Based Robot template [artf2550]
Change-Id: I49361a70fd19d59fbeb9e22a8f65de875fa5a04a
2014-07-22 13:57:45 -04:00
Brad Miller (WPI)
244ee8d920 Merge "Fixed C++ deploy in Eclipse" 2014-07-02 10:41:36 -07:00
thomasclark
ae8d22b0f2 Fixed C++ deploy in Eclipse
Eclipse now runs an ant script to deploy C++ programs, which runs the
robot program with the run-at-startup system

Change-Id: I3e63967ebc40ad3c38aa561fd303ca3c577fd2a2
2014-07-01 17:04:28 -04:00
Alex Henning
56cf731680 Re-tuned PID for PacGoat.
Change-Id: I0355db7dcfa2c9147845cdcc37322208e5271d98
2014-06-27 11:37:52 -07:00
Colby Skeggs
ff597e6ac4 Fixed C++ side of artf2604 in FRCSim - synchronized C++ codebases, updated examples.
Change-Id: I2fdc9deb4c8e249448dcbda4214fd900c2bc4ea8
2014-06-25 19:50:32 -07:00
Alex Henning
c7e17b8e35 Added PacGoat code for C++.
Change-Id: I4fd19fbdc65c25c5bbcdce937a31bc6fa1c11cb4
2014-06-25 16:49:14 -07:00
Alex Henning
cb56c9a144 Initial commit of the WPILib simulation support in an alpha quality state.
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
2014-06-13 09:31:32 -04:00
Patrick Plenefisch
9b831ed34c Reverting back to static .a files for C++ and fixing lots of other assorted items 2014-05-27 21:26:10 -04:00
Brad Miller
69d9ad70ab CMake Changes
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
2014-04-01 11:18:29 -04:00
Fredric Silberberg
4546abc8c5 Version 4 Image
Updated the HAL library to work with the new version 3 headers
from NI. There were multiple changes in this verison: more PWM
generators were added, so the functions for setting PWM signals have
been updated. UserWatchdog has been removed, and Watchdog has been
removed from WPILib to accomodate for this. Digital selection has been
consolidated to one function in the NI headers, so this has been updated
in the HAL. New SPI and I2C libraries have been added, but need to
be implemented in the HAL before they will work.
2014-03-20 13:12:02 -04:00
Brad Miller
3178911eef Initial checkin of unified hierarchy of WPILib 2015 2013-12-15 18:30:16 -05:00