FTC SDK v5.5发布

FTC SDK v5.5发布

张北一 -
回帖数:0

Version 5.5 (20200824-090813)

Version 5.5 requires Android Studio 4.0 or later.

New features

  • Adds support for calling custom Java classes from Blocks OpModes (fixes SkyStone issue #161).
    • Classes must be in the org.firstinspires.ftc.teamcode package.
    • Methods must be public static and have no more than 21 parameters.
    • Parameters declared as OpMode, LinearOpMode, Telemetry, and HardwareMap are supported and the argument is provided automatically, regardless of the order of the parameters. On the block, the sockets for those parameters are automatically filled in.
    • Parameters declared as char or java.lang.Character will accept any block that returns text and will only use the first character in the text.
    • Parameters declared as boolean or java.lang.Boolean will accept any block that returns boolean.
    • Parameters declared as byte, java.lang.Byte, short, java.lang.Short, int, java.lang.Integer, long, or java.lang.Long, will accept any block that returns a number and will round that value to the nearest whole number.
    • Parameters declared as float, java.lang.Float, double, java.lang.Double will accept any block that returns a number.
  • Adds telemetry API method for setting display format
    • Classic
    • Monospace
    • HTML (certain tags only)
  • Adds blocks support for switching cameras.
  • Adds Blocks support for TensorFlow Object Detection with a custom model.
  • Adds support for uploading a custom TensorFlow Object Detection model in the Manage page, which is especially useful for Blocks and OnBotJava users.
  • Shows new Control Hub blink codes when the WiFi band is switched using the Control Hub's button (only possible on Control Hub OS 1.1.2)
  • Adds new warnings which can be disabled in the Advanced RC Settings
    • Mismatched app versions warning
    • Unnecessary 2.4 GHz WiFi usage warning
    • REV Hub is running outdated firmware (older than version 1.8.2)
  • Adds support for Sony PS4 gamepad, and reworks how gamepads work on the Driver Station
    • Removes preference which sets gamepad type based on driver position. Replaced with menu which allows specifying type for gamepads with unknown VID and PID
    • Attempts to auto-detect gamepad type based on USB VID and PID
    • If gamepad VID and PID is not known, use type specified by user for that VID and PID
    • If gamepad VID and PID is not known AND the user has not specified a type for that VID and PID, an educated guess is made about how to map the gamepad
  • Driver Station will now attempt to automatically recover from a gamepad disconnecting, and re-assign it to the position it was assigned to when it dropped
    • If only one gamepad is assigned and it drops: it can be recovered
    • If two gamepads are assigned, and have different VID/PID signatures, and only one drops: it will be recovered
    • If two gamepads are assigned, and have different VID/PID signatures, and BOTH drop: both will be recovered
    • If two gamepads are assigned, and have the same VID/PID signatures, and only one drops: it will be recovered
    • If two gamepads are assigned, and have the same VID/PID signatures, and BOTH drop: neither will be recovered, because of the ambiguity of the gamepads when they re-appear on the USB bus.
    • There is currently one known edge case: if there are two gamepads with the same VID/PID signature plugged in, but only one is assigned, and they BOTH drop, it's a 50-50 chance of which one will be chosen for automatic recovery to the assigned position: it is determined by whichever one is re-enumerated first by the USB bus controller.
  • Adds landscape user interface to Driver Station
    • New feature: practice timer with audio cues
    • New feature (Control Hub only): wireless network connection strength indicator (0-5 bars)
    • New feature (Control Hub only): tapping on the ping/channel display will switch to an alternate display showing radio RX dBm and link speed (tap again to switch back)
    • The layout will NOT autorotate. You can switch the layout from the Driver Station's settings menu.

Breaking changes

  • Removes support for Android versions 4.4 through 5.1 (KitKat and Lollipop). The minSdkVersion is now 23.
  • Removes the deprecated LinearOpMode methods waitOneFullHardwareCycle() and waitForNextHardwareCycle()

Enhancements

  • Handles RS485 address of Control Hub automatically
    • The Control Hub is automatically given a reserved address
    • Existing configuration files will continue to work
    • All addresses in the range of 1-10 are still available for Expansion Hubs
    • The Control Hub light will now normally be solid green, without blinking to indicate the address
    • The Control Hub will not be shown on the Expansion Hub Address Change settings page
  • Improves REV Hub firmware updater
    • The user can now choose between all available firmware update files
    • Version 1.8.2 of the REV Hub firmware is bundled into the Robot Controller app.
    • Text was added to clarify that Expansion Hubs can only be updated via USB.
    • Firmware update speed was reduced to improve reliability
    • Allows REV Hub firmware to be updated directly from the Manage webpage
  • Improves log viewer on Robot Controller
    • Horizontal scrolling support (no longer word wrapped)
    • Supports pinch-to-zoom
    • Uses a monospaced font
    • Error messages are highlighted
    • New color scheme
  • Attempts to force-stop a runaway/stuck OpMode without restarting the entire app
    • Not all types of runaway conditions are stoppable, but if the user code attempts to talk to hardware during the runaway, the system should be able to capture it.
  • Makes various tweaks to the Self Inspect screen
    • Renames "OS version" entry to "Android version"
    • Renames "WiFi Direct Name" to "WiFi Name"
    • Adds Control Hub OS version, when viewing the report of a Control Hub
    • Hides the airplane mode entry, when viewing the report of a Control Hub
    • Removes check for ZTE Speed Channel Changer
    • Shows firmware version for all Expansion and Control Hubs
  • Reworks network settings portion of Manage page
    • All network settings are now applied with a single click
    • The WiFi Direct channel of phone-based Robot Controllers can now be changed from the Manage page
    • WiFi channels are filtered by band (2.4 vs 5 GHz) and whether they overlap with other channels
    • The current WiFi channel is pre-selected on phone-based Robot Controllers, and Control Hubs running OS 1.1.2 or later.
    • On Control Hubs running OS 1.1.2 or later, you can choose to have the system automatically select a channel on the 5 GHz band
  • Improves OnBotJava
    • New light and dark themes replace the old themes (chaos, github, chrome,...)
      • the new default theme is light and will be used when you first update to this version
    • OnBotJava now has a tabbed editor
    • Read-only offline mode
  • Improves function of "exit" menu item on Robot Controller and Driver Station
    • Now guaranteed to be fully stopped and unloaded from memory
  • Shows a warning message if a LinearOpMode exists prematurely due to failure to monitor for the start condition
  • Improves error message shown when the Driver Station and Robot Controller are incompatible with each other
  • Driver Station OpMode Control Panel now disabled while a Restart Robot is in progress
  • Disables advanced settings related to WiFi direct when the Robot Controller is a Control Hub.
  • Tint phone battery icons on Driver Station when low/critical.
  • Uses names "Control Hub Portal" and "Control Hub" (when appropriate) in new configuration files
  • Improve I2C read performance
    • Very large improvement on Control Hub; up to ~2x faster with small (e.g. 6 byte) reads
    • Not as apparent on Expansion Hubs connected to a phone
  • Update/refresh build infrastructure
    • Update to 'androidx' support library from 'com.android.support:appcompat', which is end-of-life
    • Update targetSdkVersion and compileSdkVersion to 28
    • Update Android Studio's Android plugin to latest
    • Fix reported build timestamp in 'About' screen
  • Add sample illustrating manual webcam use: ConceptWebcam

Bug fixes

  • Fixes SkyStone issue #248
  • Fixes SkyStone issue #232 and modifies bulk caching semantics to allow for cache-preserving MANUAL/AUTO transitions.
  • Improves performance when REV 2M distance sensor is unplugged
  • Improves readability of Toast messages on certain devices
  • Allows a Driver Station to connect to a Robot Controller after another has disconnected
  • Improves generation of fake serial numbers for UVC cameras which do not provide a real serial number
    • Previously some devices would assign such cameras a serial of 0:0 and fail to open and start streaming
    • Fixes ftc_app issue #638.
  • Fixes a slew of bugs with the Vuforia camera monitor including:
    • Fixes bug where preview could be displayed with a wonky aspect ratio
    • Fixes bug where preview could be cut off in landscape
    • Fixes bug where preview got totally messed up when rotating phone
    • Fixes bug where crosshair could drift off target when using webcams
  • Fixes issue in UVC driver on some devices (ftc_app 681) if streaming was started/stopped multiple times in a row
    • Issue manifested as kernel panic on devices which do not have this kernel patch.
    • On affected devices which do have the patch, the issue was manifest as simply a failure to start streaming.
    • The Tech Team believes that the root cause of the issue is a bug in the Linux kernel XHCI driver. A workaround was implemented in the SDK UVC driver.
  • Fixes bug in UVC driver where often half the frames from the camera would be dropped (e.g. only 15FPS delivered during a streaming session configured for 30FPS).
  • Fixes issue where TensorFlow Object Detection would show results whose confidence was lower than the minimum confidence parameter.
  • Fixes a potential exploitation issue of CVE-2019-11358 in OnBotJava
  • Fixes changing the address of an Expansion Hub with additional Expansion Hubs connected to it
  • Preserves the Control Hub's network connection when "Restart Robot" is selected
  • Fixes issue where device scans would fail while the Robot was restarting
  • Fix RenderScript usage
    • Use androidx.renderscript variant: increased compatibility
    • Use RenderScript in Java mode, not native: simplifies build
  • Fixes webcam-frame-to-bitmap conversion problem: alpha channel wasn't being initialized, only R, G, & B
  • Fixes possible arithmetic overflow in Deadline
  • Fixes deadlock in Vuforia webcam support which could cause 5-second delays when stopping OpMode