Skip to content

FTC Android Studio project to create FTC Robot Controller app.

Notifications You must be signed in to change notification settings

emmell620/ftc_app

 
 

Repository files navigation

ftc_app

FTC Android Studio project to create FTC Robot Controller app.

This is the FTC SDK that can be used to create an FTC Robot Controller app, with custom op modes. The FTC Robot Controller app is designed to work in conjunction with the FTC Driver Station app. The FTC Driver Station app is available through Google Play.

To use this SDK, download/clone the entire project to your local computer. Use Android Studio to import the folder ("Import project (Eclipse ADT, Gradle, etc.)").

Documentation for the FTC SDK are included with this repository. There is a subfolder called "doc" which contains several subfolders:

  • The folder "apk" contains the .apk files for the FTC Driver Station and FTC Robot Controller apps.
  • The folder "javadoc" contains the JavaDoc user documentation for the FTC SDK.
  • The folder "tutorial" contains PDF files that help teach the basics of using the FTC SDK.

For technical questions regarding the SDK, please visit the FTC Technology forum:

http://ftcforum.usfirst.org/forumdisplay.php?156-FTC-Technology


Release 16.02.09

  • Improved battery checker feature so that voltage values get refreshed regularly (every 250 msec) on Driver Station (DS) user interface.
  • Improved software so that Robot Controller (RC) is much more resilient and “self-healing” to USB disconnects:
    • If user attempts to start/restart RC with one or more module missing, it will display a warning but still start up.
    • When running an op mode, if one or more modules gets disconnected, the RC & DS will display warnings,and robot will keep on working in spite of the missing module(s).
    • If a disconnected module gets physically reconnected the RC will auto detect the module and the user will regain control of the recently connected module.
    • Warning messages are more helpful (identifies the type of module that’s missing plus its USB serial number).
  • Code changes to fix the null gamepad reference when users try to reference the gamepads in the init() portion of their op mode.
  • NXT light sensor output is now properly scaled. Note that teams might have to readjust their light threshold values in their op modes.
  • On DS user interface, gamepad icon for a driver will disappear if the matching gamepad is disconnected or if that gamepad gets designated as a different driver.
  • Robot Protocol (ROBOCOL) version number info is displayed in About screen on RC and DS apps.
  • Incorporated a display filter on pairing screen to filter out devices that don’t use the “-“ format. This filter can be turned off to show all WiFi Direct devices.
  • Updated text in License file.
  • Fixed formatting error in OpticalDistanceSensor.toString().
  • Fixed issue on with a blank (“”) device name that would disrupt WiFi Direct Pairing.
  • Made a change so that the WiFi info and battery info can be displayed more quickly on the DS upon connecting to RC.
  • Improved javadoc generation.
  • Modified code to make it easier to support language localization in the future.

Release 16.01.04

  • Updated compileSdkVersion for apps
  • Prevent Wifi from entering power saving mode
  • removed unused import from driver station
  • Corrrected "Dead zone" joystick code.
  • LED.getDeviceName and .getConnectionInfo() return null
  • apps check for ROBOCOL_VERSION mismatch
  • Fix for Telemetry also has off-by-one errors in its data string sizing / short size limitations error
  • User telemetry output is sorted.
  • added formatting variants to DbgLog and RobotLog APIs
  • code modified to allow for a long list of op mode names.
  • changes to improve thread safety of RobocolDatagramSocket
  • Fix for "missing hardware leaves robot controller disconnected from driver station" error
  • fix for "fast tapping of Init/Start causes problems" (toast is now only instantiated on UI thread).
  • added some log statements for thread life cycle.
  • moved gamepad reset logic inside of initActiveOpMode() for robustness
  • changes made to mitigate risk of race conditions on public methods.
  • changes to try and flag when WiFi Direct name contains non-printable characters.
  • fix to correct race condition between .run() and .close() in ReadWriteRunnableStandard.
  • updated FTDI driver
  • made ReadWriteRunnableStanard interface public.
  • fixed off-by-one errors in Command constructor
  • moved specific hardware implmentations into their own package.
  • moved specific gamepad implemnatations to the hardware library.
  • changed LICENSE file to new BSD version.
  • fixed race condition when shutting down Modern Robotics USB devices.
  • methods in the ColorSensor classes have been synchronized.
  • corrected isBusy() status to reflect end of motion.
  • corrected "back" button keycode.
  • the notSupported() method of the GyroSensor class was changed to protected (it should not be public).

Release 15.11.04.001

  • Added Support for Modern Robotics Gyro.
  • The GyroSensor class now supports the MR Gyro Sensor.
  • Users can access heading data (about Z axis)
  • Users can also access raw gyro data (X, Y, & Z axes).
  • Example MRGyroTest.java op mode included.
  • Improved error messages
  • More descriptive error messages for exceptions in user code.
  • Updated DcMotor API
  • Enable read mode on new address in setI2cAddress
  • Fix so that driver station app resets the gamepads when switching op modes.
  • USB-related code changes to make USB comm more responsive and to display more explicit error messages.
  • Fix so that USB will recover properly if the USB bus returns garbage data.
  • Fix USB initializtion race condition.
  • Better error reporting during FTDI open.
  • More explicit messages during USB failures.
  • Fixed bug so that USB device is closed if event loop teardown method was not called.
  • Fixed timer UI issue
  • Fixed duplicate name UI bug (Legacy Module configuration).
  • Fixed race condition in EventLoopManager.
  • Fix to keep references stable when updating gamepad.
  • For legacy Matrix motor/servo controllers removed necessity of appending "Motor" and "Servo" to controller names.
  • Updated HT color sensor driver to use constants from ModernRoboticsUsbLegacyModule class.
  • Updated MR color sensor driver to use constants from ModernRoboticsUsbDeviceInterfaceModule class.
  • Correctly handle I2C Address change in all color sensors
  • Updated/cleaned up op modes.
  • Updated comments in LinearI2cAddressChange.java example op mode.
  • Replaced the calls to "setChannelMode" with "setMode" (to match the new of the DcMotor method).
  • Removed K9AutoTime.java op mode.
  • Added MRGyroTest.java op mode (demonstrates how to use MR Gyro Sensor).
  • Added MRRGBExample.java op mode (demonstrates how to use MR Color Sensor).
  • Added HTRGBExample.java op mode (demonstrates how to use HT legacy color sensor).
  • Added MatrixControllerDemo.java (demonstrates how to use legacy Matrix controller).
  • Updated javadoc documentation.
  • Updated release .apk files for Robot Controller and Driver Station apps.

T. Eng November 5, 2015


Release 15.10.06.002

  • Added support for Legacy Matrix 9.6V motor/servo controller.
  • Cleaned up build.gradle file.
  • Minor UI and bug fixes for driver station and robot controller apps.
  • Throws error if Ultrasonic sensor (NXT) is not configured for legacy module port 4 or 5.

T. Eng October 6, 2015


In this latest version of the FTC SDK (20150803_001) the following changes should be noted:

  • New user interfaces for FTC Driver Station and FTC Robot Controller apps.
  • An init() method is added to the OpMode class.
    • For this release, init() is triggered right before the start() method.
    • Eventually, the init() method will be triggered when the user presses an "INIT" button on driver station.
    • The init() and loop() methods are now required (i.e., need to be overridden in the user's op mode).
    • The start() and stop() methods are optional.
  • A new LinearOpMode class is introduced.
    • Teams can use the LinearOpMode mode to create a linear (not event driven) program model.
    • Teams can use blocking statements like Thread.sleep() within a linear op mode.
  • The API for the Legacy Module and Core Device Interface Module have been updated.
    • Support for encoders with the Legacy Module is now working.
  • The hardware loop has been updated for better performance.

T. Eng August 3, 2015

About

FTC Android Studio project to create FTC Robot Controller app.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%