Skip to content

Commit d885ee1

Browse files
committed
Merge branch 'main' of https://github.com/quick007/tellojs
2 parents 153f5fc + 9dfdab6 commit d885ee1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tellojs!
2-
The easy-to-use javascript (uses ts) library for tello drones.
2+
The easy-to-use javascript (uses ts) library for tello drones. If this repository helps you in any way, please consider starring it.
33

44
## Quick Start
55

@@ -9,7 +9,7 @@ If you have the vscode extension, open the command palette and run `> Deno: init
99

1010
Next, create a file called mod.ts like this:
1111

12-
Replace insert version with the version when you go [here](https://deno.land/x/tellojs@latest). (i.e. v1.0.3)
12+
Replace insert version with the version when you go [here](https://deno.land/x/tellojs). (i.e. v1.1.0, it'll say in the url and on the sidebar)
1313
```ts
1414
// mod.ts
1515
import DroneController from "https://deno.land/x/tellojs@INSERT_VERSION/mod.ts";
@@ -25,7 +25,7 @@ await drone.disconnect();
2525

2626
Run the file with `deno run -A --unstable mod.ts`
2727

28-
By default, it'll connect to the drone based on these [options](https://github.com/quick007/tellojs/blob/v1.0.2/src/defaultoptions.json). You can pass different connection ports and whatnot in JSON to the drone controller. The code itself is pretty self-explanatory- it connects to the drone, queues the takeoff command, then lands and disconnects the drone via `drone.disconnect()`.
28+
By default, it'll connect to the drone based on these [options](https://github.com/quick007/tellojs/blob/v1.1.0/src/defaultoptions.json). You can pass different connection ports and whatnot in JSON to the drone controller. The code itself is pretty self-explanatory- it connects to the drone, queues the takeoff command, then lands and disconnects the drone via `drone.disconnect()`.
2929

3030
The enqueue command is pretty important, as it ensures that commands are running once the previous command has been ran, rather than relying on time. You can even stack multiple enqueue commands, or abstract it out into a file or loop. That being said, time isn't out of the question. For example:
3131

src/defaultoptions.json renamed to src/defaultoptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
export const defaultOptions = {
22
"telloIP": "192.168.10.1",
33
"telloPort": 8889,
44
"webserver": 3000,

src/mod.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import {
1313
yMovement,
1414
zMovement,
1515
} from "./cmds/mod.ts";
16+
import { defaultOptions } from "./defaultoptions.ts";
1617
import { dgram } from "./deps.ts";
1718
import { decode, encode } from "./lib/text.ts";
18-
import defaultOptions from "./defaultOptions.json" assert { type: "json" };
1919

2020
export default class DroneController {
2121
public takeOff = takeOff;

0 commit comments

Comments
 (0)