Skip to content

Commit

Permalink
Merge pull request #3 from AlexanderGranhof/v3.0-async-only
Browse files Browse the repository at this point in the history
V3.0 async only
  • Loading branch information
AlexanderGranhof authored Nov 27, 2019
2 parents aa66876 + 3905e56 commit 3d5a504
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ Im a student learning how to work and publish packages on NPM. This is a simple

This project is currently a work in progress, but as of 1.0.1 it can communicate with a tello drone with the sample code bellow.

## v3.0.0 Breaking changes
- Package is now only async.
- Removed offsetBuffer and async option from config.
- Removed DELAYS attribute from the tello-data.json and the tello package.

### v3.0.0 General changes
- Replaced large sections of the code that could be replaced with native node modules, such as events and assert.
- Added testing and linting

## Information

You can communicate with the drone synchronous or asynchronous. You can pass an option object to switch to asynchronous (synchronous by default). When you connect to the drone it **automatically sends the 'command' command**, so that is not nececary. If you are working with the drone synchronous, you need to wait for the OK message from the drone before you can send the next command.
The goal of this package is to provide an independent (no dependecies), simple and easy-to-use interface between nodejs and a tello drone. You can communicate with the drone asynchronously. When you connect to the drone it **automatically sends the 'command' command**, so that is not nececary.

## Error handling

The drone gives very minimal feedback on errors. Command verification is already built in, it will throw an error if a command is invalid.
The drone gives no feedback on errors. Command verification is already built in, it will throw an error if a command is invalid.
If you recieve back an error and the drone does not execute the command, the most common reason in my experience is low battery.
Charging the battery and trying again solves that error issue.

Expand Down Expand Up @@ -54,7 +63,7 @@ drone.on(event, callback)
```js
const tello = require("tello-drone");

const drone = tello.connect({ async: true });
const drone = tello.connect();

drone.on("connection", () => {
console.log("Connected to drone");
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tello-drone",
"version": "2.1.0",
"version": "3.0.0",
"description": "An independent package that provides a simple, easy to use interface between node.js and a tello drone",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 3d5a504

Please sign in to comment.