Update .jar and .aar sample library links from WestsideRobotics repo to FTC WikiSupport repo

Westside Robotics
2021-11-16 15:40:19 -08:00
parent 777ed1b168
commit 35d7f89840

@ -7,7 +7,7 @@ An external library is a collection of specialized software ready for public use
This beginner-level tutorial shows how to incorporate a library's features into your FTC OpModes, and provides simple examples. It does not teach Java.
Many thanks to [Liz Looney](https://github.com/lizlooney) who developed this capability, along with myBlocks and many other useful features of FTC software.
Many thanks to [**Liz Looney**](https://github.com/lizlooney) who developed this capability, along with myBlocks and many other useful features of FTC software.
_Note: This new capability exists for an FTC Robot Controller (RC) running Android 7 & and higher. Moto G 2nd Gen and Moto G 3rd Gen RC phones cannot use this feature._
@ -135,7 +135,7 @@ As a third benefit, FTC judges love to hear about Outreach. For example your te
## Example 1 - non-annotated library
The first example uses a very basic "homemade" library called Geometry For OBJ. To get your own copy, click the Download button [here](https://github.com/WestsideRobotics/FTC-Libraries/blob/main/Libraries/GeometryForObj.jar).
The first example uses a very basic "homemade" library called Geometry For OBJ. To get your own copy, click the **`Download`** button [here](https://github.com/WestsideRobotics/FTC-Libraries/blob/main/Libraries/GeometryForObj.jar). There's no point in clicking "View raw", since archive files are compressed and not intended for reading.
As with any current real-world library, this one is **not annotated** for FTC use. You can use it in OnBot Java only (Step 3A), **or** you can create a myBlock (Step 3B) to share its capabilities with Blocks programmers. Lacking annotations, this library does not provide direct "pass-through" methods (Step 3C) to Blocks.
@ -198,7 +198,7 @@ On your own, you can try this with the two remaining methods. Use myBlocks to s
## Example 2 - FTC-annotated library
Now let's try another "homemade" library that **does** already contain the FTC annotations. This one is called Arithmetic For Blocks; click the Download button [here](https://github.com/WestsideRobotics/FTC-Libraries/blob/main/Libraries/ArithmeticForBlocks.aar).
Now let's try another "homemade" library that **does** already contain the FTC annotations. This one is called Arithmetic For Blocks; click the **`Download`** button [here](https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/SampleOpModes/External-Libraries-in-OnBot-Java-and-Blocks/ArithmeticForBlocks.aar).
This library contains a class name ```com.example.google.ftc.MoreMath```, with public methods ```sum```, ```min```, ```max``` and ```average```. Each accepts two numbers and provides a numeric result.
@ -213,9 +213,9 @@ What if you have an FTC-annotated library, and don't want **any** of its methods
Here are two other "homemade" libraries, both **annotated**. Feel free to experiment with these.
- [JniExample.aar](https://github.com/WestsideRobotics/FTC-Libraries/blob/main/Libraries/JniExample.aar) contains a class named ```com.example.google.ftc.IntegerMath```, with methods for simple arithmetic operations, implemented in native C++ code. Its public methods are ```add```, ```subtract```, ```multiply```, and ```divide```. Each accepts two integers and provides an integer result.
- [JniExample.aar](https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/SampleOpModes/External-Libraries-in-OnBot-Java-and-Blocks/JniExample.aar) contains a class named ```com.example.google.ftc.IntegerMath```, with methods for simple arithmetic operations, implemented in native C++ code. Its public methods are ```add```, ```subtract```, ```multiply```, and ```divide```. Each accepts two integers and provides an integer result.
- [RevPotentiometer.aar](https://github.com/WestsideRobotics/FTC-Libraries/blob/main/Libraries/RevPotentiometer.aar) contains a class named ```com.example.google.ftc.RevPotentiometer```, which is a hardware device class for the [REV Potentiometer](https://www.revrobotics.com/rev-31-1155/). It uses `AnalogSensorType` and `DeviceProperties` annotations to make this sensor appear in the "Configure Robot" menu of the FTC RC app or paired DS app. After the .aar file has been uploaded (and `Build Everything`), configure your robot's Analog Input Devices and choose `REV Potentiometer`. It has a public method ```getRotation``` with parameter of type AngleUnit.
- [RevPotentiometer.aar](https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/SampleOpModes/External-Libraries-in-OnBot-Java-and-Blocks/RevPotentiometer.aar) contains a class named ```com.example.google.ftc.RevPotentiometer```, which is a hardware device class for the [REV Potentiometer](https://www.revrobotics.com/rev-31-1155/). It uses `AnalogSensorType` and `DeviceProperties` annotations to make this sensor appear in the "Configure Robot" menu of the FTC RC app or paired DS app. After the .aar file has been uploaded (and `Build Everything`), configure your robot's Analog Input Devices and choose `REV Potentiometer`. It has a public method ```getRotation``` with parameter of type AngleUnit.
[<p align="right"><i>Return to Top</i>](#introduction)<p>