C++\Java Plugin Changelog
Changelog for the WPILib C++\Java
Initial 2019 Kickoff release. For change documentation, see New for 2019!
Network Tables (ntcore)
- Clients (e.g. dashboards) were incorrectly handling synchronization of keys that were modified on both the client and server during reconnects, resulting in ignoring later value changes. It's been made more attentive.
Camera Server (cscore)
- HTTP cameras were lovingly holding on to their existing connections even when the URL was changed (so changing camera settings via URL wasn't forcing a reconnect). They now callously dump the existing connection instead.
- The MJPEG server ignored the FPS setting. It's been made more attentive and bandwidth-concious.
- Cameras now provide telemetry on the actual FPS and bandwidth. Coming soon to a dashboard near you!
- Save files could be corrupted due to a null pointer at random times. This was neither desired nor user-friendly, so it's been fixed.
- The HAL Notifier could take a long time to delete the last notifier. This was unusual to run into (as there's almost always at least one notifier), but it's been fixed.
- PWM did not have a default PWM configuration, so setSpeed() and getSpeed() throw exceptions until it was set. We're reasonable people, so reasonable defaults have been added.
- Documentation for RobotDriveBase::SetDeadband() was confusing. It now mentions that the deadband is applied to the drive inputs.
- CameraServer has been made more robust against cameras throwing errors when trying to publish information.
- Calling setName() on SendableChooser made it stop working. Fixed.
- PWM was claiming it was a Speed Controller to LiveWindow. While true on some levels, it can be used in other ways, so now the raw value is published instead of the speed (and it rightfully calls itself a PWM).
- SerialPort: In some cases (e.g. chained USB hubs), the serial port constants might be insufficient or just not work. A named port option is now available, so it's now possible to build the multi-line BBS robot you always dreamed of. Please note this new API is already deprecated as we're planning to change it for 2019 (it's a temporary solution for teams that need this feature).
- Java only: ADXRS450_Gyro was not checking for null in the reset() function (unlike all other functions). Consistency is a good thing, as is not throwing a NullPointerException, so this has been fixed.
- C++ Command-based examples/templates left out some required files. While we hope you've written your robot program by now, if you're just starting, this should make things easier.
- C++: SendableChooser::GetSelected() was keeping a temporary to a pointer, which is not a wise thing to do in C++ and could cause it to not return the selected value. It's now been made wiser in the ways of C++ so you can trust what it tells you.
- Added tristate DIO support to HAL, for those times when you really don't want the output to be 0 *or* 1.
- If no internet access was available at startup, a dialog regarding not being able to get updates would be displayed that was non-obvious to escape. This check is now significantly less intrusive and no longer requires using a rock hammer to tunnel through the wall at Shawshank (or the use of the Esc key).
The below items mainly affected Shuffleboard viewing of Limelight camera streams)
- HttpCamera was non-compliant to the HTTP spec because it did not accept lowercase content-length and content-type. We asked Q&A about this but didn't get the answer we hoped for, so we had to change our design.
- HttpCamera was dropping every other frame if the camera didn't send us a Content-Length header with each frame. It's considered polite for them to send it, but it was rude for us to reject frames without it.
- Java: Encoder.getDistancePerPulse() was truncating to an integer. This was due to a bad cast, but we prefer to blame the director (or the script).
- Java: TimedRobot was hanging if an exception was thrown by your code. While we don't recommend your robot code crash, we thought it was better to restart it if it does.
- C++: Joystick GetTwist() and GetThrottle() did not obey SetChannel. They've been made more obedient.
- TimedRobot now provides a getPeriod() function. We had been implementing this with write-only memory, but decided to upgrade.
- DifferentialDrive.curvatureDrive() now normalizes the output to -1 to +1 to avoid clipping and maintain the ratio between wheel speeds. While your mentors may exhort you to give 120% effort, your motors can't do that.
- Low level CAN operations for the PCM and PDP have been made thread-safe.
- Similar to the DifferentialDrive changes in 2018.2.2, the right side motors of MecanumDrive are now inverted appropriately on the dashboard, so you can finally upgrade the code on your 2008 robot even if you used mechanum (or mecanum) that year.
- Improved the C++ command templates; we felt this was preferred to disimproving them.
- Shuffleboard has gained a new superpower: it can now update itself independently of Eclipse updates, just like Galactus.
- Previously didn't remember what plugins you had loaded the last time you ran it. It's been made less forgetful.
- Graph widgets were throwing errors when their backing data was deleted; they've been made more tolerant.
- Instead of silently failing to start up when Java 9 is installed, it now noisily fails to start up.
- Now that FMS info is published to NT, Shuffleboard uses that knowledge for good by providing a widget to display it.
- Dark themed scroll panes weren't very pretty; they've been given a makeover.
- Save files had some issues. They've been given extensive counseling and now are much better behaved and remember more things.
- The NetworkTable tree is now expanded by default instead of the CameraServer tree. While we know you love cameras, we know you love fewer clicks too.
- Fixed various odd display bugs caused by threading issues.
- Fixed: Java FMS data could be null before the DS connected. An empty string felt more logical.
- Fixed: Java PIDController.setContinuous(false) could throw an error when it's not supposed to. It now only does if there's a good reason.
Fixed: Gyro was not correctly displaying negative degrees (or negative radians). It's been fixed so that robots are no longer limited to only making right hand turns (after all, it’s not 2008 anymore).
- Fixed: Java getBatteryVoltage() was lacking static. Rubbed shoes on carpet to triboelectric charge it.
- Fixed: PIDController continuous operation was confused if no input range was provided. We applied a non-cursed unicorn horn, so now it just treats the input as non-continuous instead in that case.
- Fixed: SpeedControllerGroup was not inverting individual motor directions appropriately when get()ing or pidWrite()ing. Now they go the right way (or left way, if you've inverted them).
- Fixed: ConditionalCommands cancellation of inner commands did not always take place the way it should have. Now it does.
- Fixed: Driver station inputs were being delayed by 1 packet. One packet may not sound like a lot, but your robot is now ~40ms more responsive to your commands! (whether or not it obeys your commands is still up to you)
- Added: FMS information (game specific data, alliance station location and color, match number, and other info) is now automatically published to NetworkTables. We encourage you to use this knowledge, but only for good.
- Fixed: When linking C++ programs, 3rd party libraries were being linked in random order (which sometimes caused spurious errors). They are now sorted and duplicated, but most importantly, are no longer random.
Added: When building the Java .jar, we now include everything in src/, not just .java files. For this reason, we now recommend you not store your music or movie collection in your robot code src/ folder.
Fixed: Deploy would fail if there were subdirectories in the user libraries folder. We now only copy from the top-level folder, which is as it should be.
Added: Time-travelers in a DeLorean added support for the v17 image. No, the v17 image doesn't exist yet; we're just thinking 4th dimensionally!
- Fixed: SingleKeyNetworkTableSource (buttons, sliders, etc.) updates were fragile and broke too easily, they have been toughened up.
- Fixed: FXML Widgets from external plugins wouldn't load properly. Now they do.
- Fixed: Loading saves with a source missing made it forget about it altogether. It has now been made less forgetful.
- Added: Widget for single axis accelerometer, in case you want to measure gravity, or maybe something more useful.
- Fixed: Quadrature Encoder is a different type than Encoder so it didn't have a default widget. Now it does.
- Fixed: Camera streams kept streaming even after they were closed, hogging bandwidth. They are now more bit-conscious and only stream when open.
- Added: Allow themes to be defined in Shuffleboard directory. Now you can make that rainbow dashboard you wanted without even writing any code!
- Added: Connection Indicators, so you know whether to blame the code or the network when your new value doesn't appear.