Skip to content

Commit

Permalink
Merge pull request #11 from AlexanderGranhof/move-to-typescript
Browse files Browse the repository at this point in the history
Move to typescript
  • Loading branch information
AlexanderGranhof authored May 23, 2020
2 parents cbfd15b + c422291 commit 73173bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,15 @@ Note that all the parameters for a command needs to be an object as a second par
Below is a general description of all the parameters and events:

```js
const tello = require("tello-drone");
const Tello = require("tello-drone");

// All option parameters are optional, default values shown
const drone = tello.connect(
{
const drone = new Tello({
host: "192.168.10.1", // manually set the host.
port: "8889", // manually set the port.
statePort: "8890", // manually set the state port.
skipOK: false, // dont send the OK message.
}
);
})

// Sends a command to the drone
drone.send("battery?")
Expand All @@ -68,9 +66,9 @@ drone.on(event, callback)
# Code example

```js
const tello = require("tello-drone");
const Tello = require("tello-drone");

const drone = tello.connect();
const drone = new Tello();

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": "3.0.5",
"version": "3.0.6",
"description": "An independent package that provides a simple, easy to use interface between node.js and a tello drone",
"main": "lib/drone.js",
"scripts": {
Expand Down

0 comments on commit 73173bb

Please sign in to comment.