Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davewalker5/tellocommander
C# API for controlling a Tello Drone with associated collector to write drone telemetry to a SQL database
https://github.com/davewalker5/tellocommander
api csharp dontnet drone drones efcore library netcore netstandard sql-database sqlite tello tello-drone tellodrone
Last synced: 20 days ago
JSON representation
C# API for controlling a Tello Drone with associated collector to write drone telemetry to a SQL database
- Host: GitHub
- URL: https://github.com/davewalker5/tellocommander
- Owner: davewalker5
- License: mit
- Created: 2020-01-04T13:37:21.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-28T06:53:19.000Z (24 days ago)
- Last Synced: 2024-12-02T04:12:21.262Z (21 days ago)
- Topics: api, csharp, dontnet, drone, drones, efcore, library, netcore, netstandard, sql-database, sqlite, tello, tello-drone, tellodrone
- Language: C#
- Homepage:
- Size: 300 KB
- Stars: 9
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TelloCommander
[![Build Status](https://github.com/davewalker5/TelloCommander/workflows/.NET%20Core%20CI%20Build/badge.svg)](https://github.com/davewalker5/TelloCommander/actions)
[![GitHub issues](https://img.shields.io/github/issues/davewalker5/TelloCommander)](https://github.com/davewalker5/TelloCommander/issues)
[![Coverage Status](https://coveralls.io/repos/github/davewalker5/TelloCommander/badge.svg?branch=master)](https://coveralls.io/github/davewalker5/TelloCommander?branch=master)
[![Releases](https://img.shields.io/github/v/release/davewalker5/TelloCommander.svg?include_prereleases)](https://github.com/davewalker5/TelloCommander/releases)
[![NuGet](https://img.shields.io/nuget/v/TelloCommander)](https://www.nuget.org/packages?q=tellocommander)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/davewalker5/TelloCommander/blob/master/LICENSE)
[![Language](https://img.shields.io/badge/language-c%23-blue.svg)](https://github.com/davewalker5/TelloCommander/)
[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/davewalker5/TelloCommander)](https://github.com/davewalker5/TelloCommander/)> **_NOTE:_** The separate Tello Commander Database and demo application repositories have been merged with the TelloCommander repository. The intention is to update the README and the Wiki to provide further guidance on the merged repository structure
## About
Tello Commander is a C# API for controlling a Tello drone, offering the following features:
- A simple interface to connect to, control and disconnect from the drone
- Validation of all commands to ensure only valid commands are sent to the drone
- Command/response history
- Response parser for processing drone "read" command responses
- Execution of commands from pre-prepared scripts
- Background monitoring and reporting of drone status
- Capture of drone telemetry information to CSV
- Capture of drone telemetry to a SQL databaseThe following database types are supported:
| Type | Purpose |
| --------- | -------------------------------------------------------------------------------- |
| In Memory | In-memory database for transient storage and primarily targetted at unit testing |
| SQLite | Permanent storage in a SQLite database |A demonstration console application is provided to demonstrate use of the API to connect to and communicate with a drone. It provides the following connection types:
| Type | Purpose |
| --------- | ------------------------------------------------------------------------------------- |
| Mock | Uses a mock that simulates responses from the drone without establishing a connection |
| Simulator | The application is connected to the simulator, running on the same machine |
| Drone | The application is connected to a real drone |It is based on the ConsoleCommander class provided by the API.
## Getting Started
Once the API is referenced by a project, you should include the following "using" statements to import the necessary types:
```csharp
using TelloCommander.CommandDictionaries;
using TelloCommander.Commander;
using TelloCommander.Connections;
using TelloCommander.Interfaces;
```The following code snippet can be pasted into the Main() method of a C# console application to demonstrate connection to the drone, command processing and disconnection from the drone:
```csharp
// Connect to the drone
var dictionary = CommandDictionary.ReadStandardDictionary("1.3.0.0");
var commander = new DroneCommander(new TelloConnection(), dictionary);
commander.Connect();// Ask for a command to process and process it. Repeat until the an empty
// command is entered
bool isEmpty;
do
{
Console.Write("Please enter a command or press [ENTER] to quit : ");
string command = Console.ReadLine().Trim();
isEmpty = string.IsNullOrEmpty(command);
if (!isEmpty)
{
try
{
// Process the command using the API
Console.WriteLine($"Command : {command}");
commander.RunCommand(command);
Console.WriteLine($"Response : {commander.LastResponse}");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
while (!isEmpty);// Disconnect from the drone
commander.Disconnect();
```The argument passed to the "ReadStandardDictionary" is the Tello API version number and defines the set of available commands (see the [wiki](https://github.com/davewalker5/TelloCommander/wiki/Home)) for more details.
The following is example output for a simple takeoff, height query and landing:
```
Please enter a command or press [ENTER] to quit : takeoff
Command : takeoff
Response : ok
Please enter a command or press [ENTER] to quit : height?
Command : height?
Response : 6dm
Please enter a command or press [ENTER] to quit : land
Command : land
Response : ok
```## Wiki
More complete information on the capabilities and use of the API are provided in the [Wiki](https://github.com/davewalker5/TelloCommander/wiki)
## Authors
- **Dave Walker** - _Initial work_
## Feedback
To file issues or suggestions, please use the [Issues](https://github.com/davewalker5/TelloCommander/issues) page for this project on GitHub.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details