Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/server #2

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4d2613e
started the testign of drone codebase
codingwithcn Apr 21, 2022
c9e246f
Read through the code and got it ready to start using with VS Code
codingwithcn Apr 22, 2022
c3d7245
started working on the server side
codingwithcn Apr 22, 2022
c7cc107
Formatted the development path better
codingwithcn Apr 23, 2022
729b51c
Tello program can now host html files
codingwithcn Apr 23, 2022
16d4ca4
Worked on sending post request back and for correctly
codingwithcn Apr 25, 2022
5a5e0f2
Server can now send and process post request
codingwithcn Apr 26, 2022
192a5f1
Started adding new modes to server
codingwithcn Apr 27, 2022
063bab2
Allowing client to start to run modes
codingwithcn Apr 27, 2022
d718dcf
Getting server ready to be able to run modes once client request them
codingwithcn Apr 27, 2022
a86c840
Client can now start running different modes.
codingwithcn Apr 28, 2022
182568c
worked with @codingwithcn to fix the thread issue of only running a m…
AdamDaMiner May 3, 2022
c2dc886
Merge pull request #1 from AdamDaMiner/feature/server
codingwithcn May 3, 2022
51330aa
Feature/server (#2)
BigNoah37 May 3, 2022
87baa56
Change the code so you do not have to initialize modes, it automatica…
codingwithcn May 26, 2022
c8680d9
Merge branch 'feature/server' of https://github.com/codingwithcn/Tell…
codingwithcn May 26, 2022
7779e98
Update HoverLeftMode.java
codingwithcn May 26, 2022
df56aa0
added documentation for feature/server
codingwithcn May 26, 2022
2fe8f41
starting working on new Tello-SDK mode
codingwithcn Sep 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,35 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="opencv-x64/opencv-420.jar">
<classpathentry kind="lib" path="opencv-x64/opencv-420.jar"/>
<classpathentry kind="lib" path="Jamepad.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Tello-SDK/opencv-x64"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="Jamepad.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-10">
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="module" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
Expand Down
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1650377009734</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch Server",
"request": "launch",
"mainClass": "tello.Server",
"projectName": "Tello-Demo"
},
{
"type": "java",
"name": "Launch Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "Launch Main Test",
"request": "launch",
"mainClass": "tello.Main",
"projectName": "Tello-Demo"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
68 changes: 66 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,75 @@ This project is the companion to the STEM Robotics [Java for Robots course](http

On the github repo, click the **green Clone or Download** button. Then click **download zip**.
Once the zip file (approx 35mb) is on your PC, copy the **Tello-SDK-master** directory in the zip
to your Eclipse workspace. Rename the directory to **Tello-SDK**. Next import that directory
into Eclipse as an *existing project into workspace* under the General import category.
to your Visual Studio Code workspace. Rename the directory to **Tello-SDK**.
The import and preparation of the project will take some time so be patient.

*****************************************************************************************

### Getting Started

The Server has already been loaded, so you can test out the project by either running the Main file or the Server file, located in tello.Main or tello.Server.

****************************************************************************************

### How to add new Modes:
All Modes must be put in tello.modes.mode and must be extended from AbstractMode.java, this is because it allows the server to load all the different modes right before it starts.

> A simple Tello Mode will look like so

```Java
package tello.modes.mode

public class SimpleMode extends AbstractMode {

public SimpleMode() {
super();
}

public void run() {
// First set the stillRunning varaible of the class, gotted from AbstractMode

stillRunning = true; // This is used to tell the Server not to start a new mode until this stillRunning is false

// tellcoms is the TelloCommunication varaible for every Tello Mode and you have access to it from AbstractMode

tellocoms.setTimeout(50_000); // Give server enough time to connect

telloControl.connect(); // Connect to the telloDrone.

telloControl.enterCommandMode(); // No command can be fed to the tello drone until you have entered command mode

// Now you can start putting custom commands for the mode

// Commands goes here

//

// Once you are done, you must call this function
stopExecution(); // Tells the server the telloMode is done running
}

@Override
public void execute() {
run(); // The function you want to run when ever this mode needs to be runned.
}

@Override
public String getName() {
return "SimpleMode"; // The name you would like to call this mode.
}

@Override
public String getDescription() {
return "Just a simple tello-mode"; // The description you would like to give your tello-mode
}
}
```

Version 2.0.0

* Development of simple server, which lets you run different tello-modes.

Version 1.0.1

* Fix design error in locking scheme in the TelloCamera class.
Expand Down
57 changes: 44 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,50 @@

<groupId>com.swdevs.tello</groupId>
<artifactId>Tello-Demo</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
<version>2.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency>
<dependency>
<groupId>net.sourceforge.stripes</groupId>
<artifactId>stripes</artifactId>
<version>1.7.0-async-beta</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.sourceforge.stripes</groupId>
<artifactId>tests</artifactId>
<version>1.5.3</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.sourceforge.stripes</groupId>
<artifactId>stripes-parent</artifactId>
<version>1.7.0-async-beta</version>
<type>pom</type>
</dependency>

<dependency>
<groupId>nu.pattern</groupId>
<artifactId>opencv</artifactId>
<version>2.4.9-4</version>
</dependency>
</dependencies>

</project>
Binary file added src/main/java/opencv-x64/opencv-420.jar
Binary file not shown.
Binary file added src/main/java/opencv-x64/opencv_java420.dll
Binary file not shown.
Binary file not shown.
Loading