edit the image folder name
@ -58,7 +58,7 @@ Instead of a Java file, select the .jar or .aar library file to upload from the
|
||||
|
||||
OnBot Java will recognize that it's an archive file, and will automatically create a folder called `ExternalLibraries`. This folder will appear above the `teamcode` folder.
|
||||
|
||||
<p align="center">[[/images/external-libraries-in-onbot-java-and-blocks/400-folder-and-wrench.png|ExternalLibraries folder and Build Everything icon]]
|
||||
<p align="center">[[/images/External-Libraries-in-OnBot-Java-and-Blocks/400-folder-and-wrench.png|ExternalLibraries folder and Build Everything icon]]
|
||||
<br><i><b>ExternalLibraries folder and Build Everything icon</b></i><p>
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
@ -112,7 +112,7 @@ For Step 3B or Step 3C, your **Blocks users** must be taught how to use the new
|
||||
|
||||
Start with good documentation. For myBlocks, use the existing tools to make helpful labels (for input parameters), clear tooltips and detailed comments. The comments appear in a text box that expands after clicking the blue question-mark icon on that Block. Tell your users it's there.
|
||||
|
||||
<p align="center">[[/images/external-libraries-in-onbot-java-and-blocks/450-wiggle-myBlock.png|wiggle servo myBlock]]
|
||||
<p align="center">[[/images/External-Libraries-in-OnBot-Java-and-Blocks/450-wiggle-myBlock.png|wiggle servo myBlock]]
|
||||
<br><i><b>myBlock documented using comment, tooltip and input labels</b></i><p>
|
||||
|
||||
Meet with your team's Blocks programmer(s) to explain the new features. Consider writing a short description, for their future reference. Encourage users to give you feedback, to improve your code. Congratulations, you are now a Java developer!
|
||||
@ -186,12 +186,12 @@ Note that myHypotenuse() is a ```static``` method, required for all myBlock meth
|
||||
|
||||
Here is the myBlock that will appear in the Blocks toolbox (menu):
|
||||
|
||||
<p align="center">[[/images/external-libraries-in-onbot-java-and-blocks/460-myHypotenuse-myBlock.png|myHypotenuse myBlock]]
|
||||
<p align="center">[[/images/External-Libraries-in-OnBot-Java-and-Blocks/460-myHypotenuse-myBlock.png|myHypotenuse myBlock]]
|
||||
<br><i><b>myBlock using library method Geometry.hypot()</b></i><p>
|
||||
|
||||
On your own, you can try this with the two remaining methods. Use myBlocks to show telemetry output of various input values.
|
||||
|
||||
<p align="center">[[/images/external-libraries-in-onbot-java-and-blocks/470-myBlocks-telemetry.png|myBlocks telemetry]]
|
||||
<p align="center">[[/images/External-Libraries-in-OnBot-Java-and-Blocks/470-myBlocks-telemetry.png|myBlocks telemetry]]
|
||||
<br><i><b>Telemetry of myBlocks using Geometry library</b></i><p>
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
@ -204,7 +204,7 @@ This library contains a class name ```com.example.google.ftc.MoreMath```, with p
|
||||
|
||||
This library **is annotated** specifically for FTC use, as described above. After you upload the .aar file and `Build Everything`, its 4 "pass-through" methods will automatically appear as Blocks:
|
||||
|
||||
<p align="center">[[/images/external-libraries-in-onbot-java-and-blocks/510-MoreMath-Blocks.png|MoreMath Blocks]]
|
||||
<p align="center">[[/images/External-Libraries-in-OnBot-Java-and-Blocks/510-MoreMath-Blocks.png|MoreMath Blocks]]
|
||||
<br><i><b>Pass-through methods from class MoreMath in annotated library Arithmetic For Blocks</b></i><p>
|
||||
|
||||
You **could** also use these methods in OnBot Java, including to create a myBlock. For example, perhaps you want to also provide a custom version of a pass-through method. But you **don't need** an OnBot Java file to support this library or its methods; that's done automatically by OnBot Java when it processes the library at upload.
|
||||
|
Reference in New Issue
Block a user