sovgvd / nodetello Goto Github PK
View Code? Open in Web Editor NEWRyze Tello drone Node.JS
License: MIT License
Ryze Tello drone Node.JS
License: MIT License
Hi @SovGVD
I've been combing through your repo trying to get something in JS to use the low-level packet API.
I had a question about this bit in your code:
// TODO... this string manipulation is soooo slow!
var tmp_roll = "00000000000"+(parseInt(1024 + 660 * this.stickData.roll) & 0x07ff).toString(2); tmp_roll=tmp_roll.substr(-11);
var tmp_pitch = "00000000000"+(parseInt(1024 + 660 * this.stickData.pitch) & 0x07ff).toString(2); tmp_pitch=tmp_pitch.substr(-11);
var tmp_throttle = "00000000000"+(parseInt(1024 + 660 * this.stickData.throttle) & 0x07ff).toString(2); tmp_throttle=tmp_throttle.substr(-11);
var tmp_yaw = "00000000000"+(parseInt(1024 + 660 * this.stickData.yaw) & 0x07ff).toString(2); tmp_yaw=tmp_yaw.substr(-11);
//var tmp_boost = "00000000000"+(parseInt(1024 + 660 * 0)).toString(2);
Why are you adding 11 0
's and then substr'ing them right off immediately after?
I realise this is code ported from go & python and whatever else is out there, but I'm a bit confused about the stick position packets and that's the bit I need to get working :)
Cheers
Hi, when I ran node app.js
on a Mac, I got:
Error: spawn mplayer ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:238:19)
...
I solved this by installing mplayer
(with brew install mplayer
). Perhaps it might be worth mentioning this in the README in case others might come across it too?
The following code
Lines 408 to 410 in 66ae74e
is considered potentially dangerous because:
double
1, which means you can only have integers in the range [โ253, +253],(fast << 44) | (yaw << 33)
will not work as expected. (Actually, you can try 1 << 32
and see how it goes)Since this code is used to control the drone, IMO it's really dangerous and may hurt users. How do you think?
Refs:
when I try to start the app.js
with node app.js
the following error happens:
(node:25512) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
tello_control listening 0.0.0.0:51615
events.js:167
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'D:\nodetello\video\1535987841691.video.h264'
Emitted 'error' event at:
at lazyFs.open (internal/fs/streams.js:273:12)
at FSReqWrap.oncomplete (fs.js:139:20)
Hope to know if I am having an issue or not, any way to fix that? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.