WPILib

View Original

WPILib 2020.3.2 Update

We are pleased to announce the availability of the second 2020 update release (2020.3.2) of WPILib, the official FIRST libraries for robot programming in C++ and Java.

Changes in This Release (since 2020.2.2)

WPILib

Java

  • TrapezoidProfile: Fixed aliasing of m_initial to result in calculate() (#2284)
  • Added more detail to RuntimeLoader failure message (#2309)
  • Fixed null check order in SendableRegistry (#2314)
  • Added methods for getting the color of an AddressableLED (#2366)

C++

  • Removed "Set Camera Server Shared" message (#2285)
  • Added missing include to ShuffleboardEventImportance.h (#2310)
  • Added support to circular_buffer for types that are not implicitly convertible from int (#2350)
  • Fixed two cases in circular_buffer where a reference was being returned to a constant (#2350)
  • Made units of TrapezoidProfile public (#2342)

C++ and Java

  • Don't create a duplicated state at knot points when generating trajectories using quintic splines (#2307)
  • Added setEnabled method to RamseteController (#2313)
  • Added hasElapsed and advanceIfElapsed functions to Timer class. We encourage teams to consider using these functions instead of hasPeriodPassed, which has the confusing behavior of resetting the timer--advanceIfElapsed has the same functionality as hasPeriodPassed. If you want to only check that the time period has elapsed, use hasElapsed instead (#2322)
  • Fixed DifferentialDriveVoltageConstraint for tight turns with zero velocity (#2341)
  • Fixed notifier race that could happen with very fast notifiers (#2370)
  • Added a method for releasing a waiting interrupt (#2347)
  • Added a way to access NetComm's SendConsoleLine function (#2337)

New Command Framework

  • [C++] Fixed POVButton (#2294)
  • [C++] Fixed ParallelRaceGroup multiple calls behavior--the Java version was correct, but the C++ version would only run once (#2339)

Documentation

  • Added new speed controllers to shuffleboard docs and fix a few bad links/typos (#2288)
  • Fixed DriveSubsystem.getHeading() javadoc (#2282)
  • Added missing references to "f" in PIDSubsystem javadoc (#2318)
  • Added note that only a single instance of ADXRS450 is supported (#2349)

Simulation

  • Added support for naming I/O in the GUI. Nearly any name in the GUI (e.g. "PWM[0]") can be renamed by right clicking on it and changing the name (#2292)
  • Added 2D field view to the GUI. The field image and robot image can be loaded or just a wireframe used. The robot can be moved and rotated with a mouse click + drag. The robot position is settable in robot code via the Field2d class (#2261)
  • Changed Filesystem.getDeployDirectory() to src/main/deploy in simulation (#2293)
  • Fixed ADXL345 and ADXL362 simulation Y value (#2332)
  • Added SimulationInit and SimulationPeriodic functions. These can be used as an easy way to add code that runs only in simulation (#2377)

Examples

  • Fixed GearsBot log methods not being called periodically (#2280)
  • Fixed RamseteCommand RobotDrive watchdog (#2298)
  • Added feed-forward and slew rate limiting to advanced drive examples (#2301)
  • Examples which use SendableChooser now set a default option (#2361)

Templates

  • Added missing methods to Timed and TimedSkeleton (#2306)

PathWeaver

  • PathWeaver paths that used different units than meters would cause issues with WPILib trajectory following. For new projects, PathWeaver now defaults to converting to meters in the exported file, regardless of the units used in the project. For backwards compatibility, projects created with earlier versions will default to exporting in project units, but a warning is displayed recommending the setting be changed (wpilibsuite/PathWeaver#180)

RobotBuilder

  • Replaced deprecated SendableChooser addObject with addOption (wpilibsuite/RobotBuilder#205)

Shuffleboard

  • Fixed theme plugins (wpilibsuite/shuffleboard#645)

SmartDashboard

  • Fixed StringChooser not showing up if a default wasn't set (wpilibsuite/SmartDashboard#133)

GradleRIO

  • The Java simulation task now prefers the WPILib JDK and warns about potential missing runtimes (wpilibsuite/GradleRIO#401)

Visual Studio Code WPILib Extension

  • Added setting for selecting a default extension (wpilibsuite/vscode-wpilib#349)

Installation Instructions

The installation instructions for this release are the same as for 2020.2.2. However for this update, it is okay to skip reinstalling Visual Studio Code, the JDK, and the compiler if you already installed them with 2020.2.2.

After you install the update, VS Code will prompt when opening an older project whether or not you want to upgrade it to 2020.3.2.