Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
Explaination on how to create a class
Browse files Browse the repository at this point in the history
  • Loading branch information
serivesmejia committed Sep 27, 2020
1 parent d2ec234 commit bcea32c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/>

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.

<img src='images/eocvsim_screenshot_structure.png' width='301' height='183'><br/>

*(Also, the simulator already comes by default with some EasyOpenCV samples)*<br/>

To create a new java class, follow these steps:<br/>
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:<br/>

<img src='images/eocvsim_usage_createclass.gif' width='512' height='288'><br/>

The pipeline class **should also** extend the EOCV's OpenCvPipeline abstract class and override the processFrame() method.<br/><br/>
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.<br/><br/>
Here's a empty pipeline template, with the SamplePipeline class we created before:

```java
package org.firstinspires.ftc.teamcode;
Expand Down

0 comments on commit bcea32c

Please sign in to comment.