From bcea32c824fd44c2ba12b5a38fb680f5b2bfb98c Mon Sep 17 00:00:00 2001 From: Sebastian Erives Date: Sun, 27 Sep 2020 15:56:23 -0600 Subject: [PATCH] Explaination on how to create a class --- USAGE.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/USAGE.md b/USAGE.md index 82a81b24..9cc0e833 100644 --- a/USAGE.md +++ b/USAGE.md @@ -5,17 +5,26 @@ while also providing OpenCV functionality and a simple GUI. By simulating the af to be the same as they would if you were using the FTC SDK with EasyOpenCV, allowing you to simply copy paste your vision code onto your Android Studio project once you want to transfer it to a robot.
-The pipeline classes **should be** placed under the **org.firstinspires.ftc.teamcode** package, in the **TeamCode** module. This way, they will be +All of the pipeline classes **should be** placed under the *org.firstinspires.ftc.teamcode* package, in the *TeamCode* module. This way, they will be automatically detected by the simulator and will be selectionable from the GUI.
*(Also, the simulator already comes by default with some EasyOpenCV samples)*
+To create a new java class, follow these steps:
+1) In the project files menu, open the TeamCode module +2) Find the *org.firstinspires.ftc.teamcode* package and right click on it +3) On the context menu, click on *New > Java Class* +4) A new menu will appear, type a name and make sure the *Class* option is selected +5) Once you have typed a name, press enter and the class will be created + +Here's a quick gif illustrating these steps:
+
-The pipeline class **should also** extend the EOCV's OpenCvPipeline abstract class and override the processFrame() method.

-Here's a quick, empty pipeline sample: +If you want your class to be a pipeline, it **should also** extend the EOCV's OpenCvPipeline abstract class and override the processFrame() method.

+Here's a empty pipeline template, with the SamplePipeline class we created before: ```java package org.firstinspires.ftc.teamcode;