Sunteți pe pagina 1din 29

Entire node.

js code used inside terminal


Last login: Tue May 24 09:47:31 on ttys000
Annabels-MacBook-Air-2:~ annabelhughes$ npm install git://github.com/felixge/node-ar-drone.git
ar-drone@0.3.3 node_modules/ar-drone
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
^C
Annabels-MacBook-Air-2:~ annabelhughes$
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.clockwise(0.5);
0.5
drone> client.stop();
true
drone> client.counterclockwise(0.5);
TypeError: client.counterclockwise is not a function
at repl:1:8
at REPLServer.defaultEval (repl.js:264:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:77:13)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
drone> client.up(2);
2
drone> client.left(0.5);
0.5
drone> client.stop();
true
drone>
(To exit, press ^C again or type .exit)
drone> client.land();
true
drone> client.takeoff();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.,stop();

...
drone> client.animate('yawShake',1000);
undefined
drone> client.animate('flipBehind",1000)'
SyntaxError: missing ) after argument list
at Object.exports.createScript (vm.js:24:10)
at REPLServer.defaultEval (repl.js:235:25)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:77:13)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
drone>
(To exit, press ^C again or type .exit)
drone> client.animate('flipBehind', 1000);
undefined
drone> client.animate('flipLeft', 1000);
undefined
drone> client.animate('flipLeft', 1000);
undefined
drone> client.animate('flipBehind', 1000);
undefined
drone> client.stop();
true
drone> client.animate('flipBehind', 1000);
undefined
drone> client.stop();
true
drone> control.pcmd({
... front: 0.5, // fly forward with 50% speed
... up: 0.3, // and also fly up with 30% speed
... });
ReferenceError: control is not defined
at repl:1:1
at REPLServer.defaultEval (repl.js:264:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:77:13)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)

at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
drone> control.pcmd([
... front: 0.5,
... up: 0.3,
... })
...
drone> client.up(5);
5
drone> client.down(3);
3
drone> client.up(2);
2
drone> client.animate('flipLeft', 2000);
undefined
drone> client.animate('flipLeft', 1000);
undefined
drone>
(To exit, press ^C again or type .exit)
drone> client.stop();
true
drone> client.animate('flipLeft', 1000);
undefined
drone>
(To exit, press ^C again or type .exit)
drone> client.animate('flipLeft', 1000);
undefined
drone> client.down(1);
1
drone> client.land();
true
drone> client.takeoff();
true
drone>
(To exit, press ^C again or type .exit)
drone> client.takeoff();
true
drone> client.up(2);
2
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js

drone> client.takeoff();
true
drone> client.calibrate(0);
undefined
drone> client.takeoff();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> takeoff();
true
drone> client.up(2);
2
drone> client.down(1);
1
drone> client.stop();
true
drone> client.land();
true
drone> client.takeoff();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.stop();
true
drone> client.up(4);
4
drone> client.animate('flipLeft', 1000);
undefined
drone> client.animate('thetaDance', 1000);
undefined
drone> client.animate('flipLeft', 1000);
undefined
drone> client.animate('flipRight', 2000);
undefined
drone> client.takeoff();
true
drone> client.takeoff();
true
drone> client.takeoff();
true
drone>

(To exit, press ^C again or type .exit)


drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.takeoff();
true
drone> client.takeoff();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.animate('flipRight', 1000);
undefined
drone> client.up(3);
3
drone> client.animate('flipBehind', 1000);
undefined
drone> client.stop();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.animate('wave', 2000);
undefined
drone> client.animate('flipLeft', 1000);
undefined
drone>
(To exit, press ^C again or type .exit)
drone>
^C

Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js


drone> client.takeoff();
true
drone> client.up(6);
6
drone> client.animate('flipLeft', 1000);
undefined
drone> client.animate('flipRight', 1000);
undefined
drone> client.up(6);
6
drone> client.animateLeds('blinkRed', 1000);
undefined
drone> client.animate('flipAhead', 1000);
undefined
drone> client.animateLeds('blinkGreen', 5,2,);
...
drone> client.left(1);
1
drone> client.stop();
true
drone> client.right(2);
2
drone> client.stop();
true
drone> client.left(4);
4
drone> client.stop();
true
drone> client.front(1);
1
drone> client.stop();
true
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.takeoff();
true

drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.land();
true
drone> client.takeoff();
true
drone> client.after;
[Function]
drone> client.after(5000,function(){this.clockwise(0.5);})
Client {
domain: null,
_events:
{ hovering: [ [Object], [Object] ],
landed: [ [Object], [Object] ] },
_eventsCount: 2,
_maxListeners: undefined,
_options: {},
_udpControl:
UdpControl {
_sequenceNumber: 5848,
_socket:
Socket {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
_handle: [Object],
_receiving: true,
_bindState: 2,
type: 'udp4',
fd: -42,
_reuseAddr: undefined,
_sendQueue: undefined },
_port: 5556,
_ip: '192.168.1.1',
defaultTimeout: 500,
_cmdCreator: AtCommandCreator {},
_cmds: [],
_blockingCmds: [],

_blocked: { state: 'NOT_BLOCKED', cmd: null, ackTimer: null } },


_udpNavdatasStream:
UdpNavdataStream {
domain: null,
_events: { error: [Function: bound ], data: [Function: bound ] },
_eventsCount: 2,
_maxListeners: undefined,
readable: true,
_socket:
Socket {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
_handle: [Object],
_receiving: true,
_bindState: 2,
type: 'udp4',
fd: -42,
_reuseAddr: undefined,
_sendQueue: undefined },
_port: 5554,
_ip: '192.168.1.1',
_initialized: true,
_parseNavdata:
{ [Function: parseNavdata]
OPTION_PARSERS: [Object],
NAVDATA_HEADER1: 1432778632,
NAVDATA_HEADER2: 1432778633,
DRONE_STATES: [Object],
OPTION_IDS: [Object],
CONTROL_STATES: [Object],
FLY_STATES: [Object] },
_timeout: 100,
_timer:
{ _called: false,
_idleTimeout: 100,
_idlePrev: [Object],
_idleNext: [Object],
_idleStart: 95924,
_onTimeout: [Function: bound ],
_repeat: null },
_sequenceNumber: 1729 },
_pngStream: null,

_tcpVideoStream: null,
_interval:
{ _called: true,
_idleTimeout: 30,
_idlePrev:
Timer {
'0': [Function: listOnTimeout],
_idleNext: [Circular],
_idlePrev: [Circular],
msecs: 30 },
_idleNext:
Timer {
'0': [Function: listOnTimeout],
_idleNext: [Circular],
_idlePrev: [Circular],
msecs: 30 },
_idleStart: 95929,
_onTimeout: [Function: wrapper],
_repeat: [Function: bound ] },
_ref: { emergency: false, fly: true },
_pcmd: {},
_repeaters: [],
_afterOffset: 13000,
_disableEmergency: false,
_lastState: 'CTRL_LANDED',
_lastBattery: 100,
_lastAltitude: 0 }
drone> client.after(3000, funtion(){this.stop();
SyntaxError: missing ) after argument list
at Object.exports.createScript (vm.js:24:10)
at REPLServer.defaultEval (repl.js:235:25)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:77:13)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
drone> this.land();
true
drone> client.takeoff();
true
drone>

(To exit, press ^C again or type .exit)


drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.createRepl();
drone> Repl {
_client:
Client {
domain: null,
_events: { hovering: [Object], landed: [Object] },
_eventsCount: 2,
_maxListeners: undefined,
_options: {},
_udpControl:
UdpControl {
_sequenceNumber: 1288,
_socket: [Object],
_port: 5556,
_ip: '192.168.1.1',
defaultTimeout: 500,
_cmdCreator: AtCommandCreator {},
_cmds: [],
_blockingCmds: [],
_blocked: [Object] },
_udpNavdatasStream:
UdpNavdataStream {
domain: null,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined,
readable: true,
_socket: [Object],
_port: 5554,
_ip: '192.168.1.1',
_initialized: true,

_parseNavdata: [Object],
_timeout: 100,
_timer: [Object],
_sequenceNumber: 4029 },
_pngStream: null,
_tcpVideoStream: null,
_interval:
{ _called: true,
_idleTimeout: 30,
_idlePrev: [Object],
_idleNext: [Object],
_idleStart: 21549,
_onTimeout: [Function: wrapper],
_repeat: [Function: bound ] },
_ref: { fly: false, emergency: false },
_pcmd: {},
_repeaters: [],
_afterOffset: 8000,
_disableEmergency: false,
_lastState: 'CTRL_LANDED',
_lastBattery: 19,
_lastAltitude: 0 },
_repl:
REPLServer {
_domain:
Domain {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
members: [] },
useGlobal: false,
ignoreUndefined: false,
replMode: Symbol(repl-sloppy),
_inTemplateLiteral: false,
rli: [Circular],
eval: { [Function: runBound] domain: [Object] },
inputStream:
ReadStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,

_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: false,
bytesRead: 39,
_bytesDispatched: 0,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
isRaw: true,
isTTY: true,
fd: 0,
read: [Function],
_consuming: true },
outputStream:
WriteStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 113,
_sockname: null,
_writev: null,

_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 80,
rows: 24,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function] },
lines: [ level: [] ],
context:
{ DTRACE_NET_SERVER_CONNECTION: [Function],
DTRACE_NET_STREAM_END: [Function],
DTRACE_HTTP_SERVER_REQUEST: [Function],
DTRACE_HTTP_SERVER_RESPONSE: [Function],
DTRACE_HTTP_CLIENT_REQUEST: [Function],
DTRACE_HTTP_CLIENT_RESPONSE: [Function],
global: [Circular],
process: [Object],
GLOBAL: [Object],
root: [Object],
Buffer: [Object],
clearImmediate: [Function],
clearInterval: [Function],
clearTimeout: [Function],
setImmediate: [Function],
setInterval: [Function],
setTimeout: [Function],
console: [Object],
module: [Object],
require: [Object],
domain: null,
after: [Function: bound ],
createRepl: [Function: bound ],
createPngStream: [Function: bound ],
getPngStream: [Function: bound ],
getVideoStream: [Function: bound ],
resume: [Function: bound ],
disableEmergency: [Function: bound ],
takeoff: [Function: bound ],
land: [Function: bound ],
stop: [Function: bound ],

calibrate: [Function: bound ],


ftrim: [Function: bound ],
config: [Function: bound ],
ctrl: [Function: bound ],
animate: [Function: bound ],
animateLeds: [Function: bound ],
battery: [Function: bound ],
up: [Function: bound ],
down: [Function: bound ],
left: [Function: bound ],
right: [Function: bound ],
front: [Function: bound ],
back: [Function: bound ],
clockwise: [Function: bound ],
counterClockwise: [Function: bound ],
setMaxListeners: [Function: bound setMaxListeners],
getMaxListeners: [Function: bound getMaxListeners],
emit: [Function: bound emit],
addListener: [Function: bound addListener],
on: [Function: bound addListener],
once: [Function: bound once],
removeListener: [Function: bound removeListener],
removeAllListeners: [Function: bound removeAllListeners],
listeners: [Function: bound listeners],
listenerCount: [Function: bound listenerCount],
client: [Object] },
lineParser:
LineParser {
_literal: null,
shouldFail: false,
blockComment: false,
regExpLiteral: false },
bufferedCommand: '',
_sawReturn: false,
domain:
Domain {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
members: [] },
_events:
{ close: [Object],
SIGINT: [Function],

line: [Function],
SIGCONT: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
output:
WriteStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 113,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 80,
rows: 24,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function] },
input:
ReadStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],

readable: true,
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: false,
bytesRead: 39,
_bytesDispatched: 0,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
isRaw: true,
isTTY: true,
fd: 0,
read: [Function],
_consuming: true },
historySize: 30,
completer: [Function: complete],
_initialPrompt: 'drone> ',
_prompt: 'drone> ',
terminal: true,
line: '',
cursor: 0,
history: [],
historyIndex: -1,
commands:
{ break: [Object],
clear: [Object],
exit: [Object],
help: [Object],
save: [Object],
load: [Object] },
writer: [Function],
useColors: true,
prevRows: 0 },
_nodeEval:
{ [Function: runBound]
domain:

Domain {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
members: [] } } }
drone> client.stopp(());;
true
drone>
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C

Last login: Wed Jun 1 21:37:09 on ttys000


Annabels-MacBook-Air-2:~ annabelhughes$
> console.log("Testing 123");
Testing 123
undefined
>
(To exit, press ^C again or type .exit)
Annabels-MacBook-Air-2:~ annabelhughes$
ar-drone.git
ar-drone@0.3.3 node_modules/ar-drone
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$
drone>
(To exit, press ^C again or type .exit)
drone>

node

npm install git://github.com/felixge/node-

node repl.js

node repl.js

node repl.js

^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.up(2);
2
drone> client.down(2);
2
drone> client.stop();
true
drone> client.left(0.5);
0.5
drone> client.stop();
true
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.up(2);
2
drone> client.stop();
true
drone> client.animate('Flipleft, 5000');
undefined
drone> /Users/annabelhughes/node_modules/ardrone/lib/control/AtCommandCreator.js:112
throw new Error('Unknown animation: ' + name);
^
Error: Unknown animation: Flipleft, 5000
at AtCommandCreator.animate (/Users/annabelhughes/node_modules/ardrone/lib/control/AtCommandCreator.js:112:11)
at UdpControl.(anonymous function) [as animate]
(/Users/annabelhughes/node_modules/ar-drone/lib/control/UdpControl.js:42:44)
at Object.method (/Users/annabelhughes/node_modules/ardrone/lib/Client.js:242:22)
at /Users/annabelhughes/node_modules/ar-drone/lib/Client.js:181:14
at Array.forEach (native)
at Client._sendCommands (/Users/annabelhughes/node_modules/ardrone/lib/Client.js:179:6)

at wrapper [as _onTimeout] (timers.js:275:11)


at Timer.listOnTimeout (timers.js:92:15)
Annabels-MacBook-Air-2:~ annabelhughes$ client.land();
-bash: syntax error near unexpected token `;'
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.up(1);
1
drone> client.stop();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.down(1);
1
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.up(1);
1
drone> client.stop();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.down(1);
1
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>

^C
Annabels-MacBook-Air-2:~ annabelhughes$
drone> client.takeoff();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$
drone> client.takeoff();
true
drone> client.up(1);
1
drone> client.stop();
true
drone> client.animate('flipLeft', 1000);
undefined
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$
module.js:327
throw err;
^

node repl.js

node repl.js

node repl.js

node repljs

Error: Cannot find module '/Users/annabelhughes/repljs'


at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)

drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.clockwise(0.5);
0.5
drone> client.stop();
true
drone> client.right(2);
2
drone> client.stop();
true
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.clockwise(0.5);
0.5
drone> client.stop();
true
drone> client.land();
true
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.takeoff();
true
drone> client.clockwise(0.5);
0.5
drone> client.stop();
true
drone> client.land();
true
drone> client.counterclockwise(0.5);
TypeError: client.counterclockwise is not a function
at repl:1:8
at REPLServer.defaultEval (repl.js:264:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:77:13)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
drone>
(To exit, press ^C again or type .exit)

drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.after(5000,function(){this.clockwise(0.5);})
Client {
domain: null,
_events: { hovering: { [Function: g] listener: [Function] } },
_eventsCount: 1,
_maxListeners: undefined,
_options: {},
_udpControl:
UdpControl {
_sequenceNumber: 84,
_socket:
Socket {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
_handle: [Object],
_receiving: true,
_bindState: 2,
type: 'udp4',
fd: -42,
_reuseAddr: undefined,
_sendQueue: undefined },
_port: 5556,
_ip: '192.168.1.1',
defaultTimeout: 500,
_cmdCreator: AtCommandCreator {},
_cmds: [],
_blockingCmds: [],
_blocked: { state: 'NOT_BLOCKED', cmd: null, ackTimer: null } },
_udpNavdatasStream:
UdpNavdataStream {
domain: null,
_events: { error: [Function: bound ], data: [Function: bound ] },
_eventsCount: 2,
_maxListeners: undefined,
readable: true,
_socket:
Socket {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
_handle: [Object],
_receiving: true,
_bindState: 2,
type: 'udp4',
fd: -42,
_reuseAddr: undefined,
_sendQueue: undefined },
_port: 5554,
_ip: '192.168.1.1',

_initialized: true,
_parseNavdata:
{ [Function: parseNavdata]
OPTION_PARSERS: [Object],
NAVDATA_HEADER1: 1432778632,
NAVDATA_HEADER2: 1432778633,
DRONE_STATES: [Object],
OPTION_IDS: [Object],
CONTROL_STATES: [Object],
FLY_STATES: [Object] },
_timeout: 100,
_timer:
{ _called: false,
_idleTimeout: 100,
_idlePrev: [Object],
_idleNext: [Object],
_idleStart: 1536,
_onTimeout: [Function: bound ],
_repeat: null },
_sequenceNumber: 0 },
_pngStream: null,
_tcpVideoStream: null,
_interval:
{ _called: true,
_idleTimeout: 30,
_idlePrev:
Timer {
'0': [Function: listOnTimeout],
_idleNext: [Circular],
_idlePrev: [Circular],
msecs: 30 },
_idleNext:
Timer {
'0': [Function: listOnTimeout],
_idleNext: [Circular],
_idlePrev: [Circular],
msecs: 30 },
_idleStart: 1601,
_onTimeout: [Function: wrapper],
_repeat: [Function: bound ] },
_ref: { fly: true },
_pcmd: {},
_repeaters: [],
_afterOffset: 27000,
_disableEmergency: true,
_lastState: 'CTRL_LANDED',
_lastBattery: 100,
_lastAltitude: 0 }
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$ node repl.js
drone> client.createRepl();
drone> Repl {

_client:
Client {
domain: null,
_events: { hovering: [Object] },
_eventsCount: 1,
_maxListeners: undefined,
_options: {},
_udpControl:
UdpControl {
_sequenceNumber: 168,
_socket: [Object],
_port: 5556,
_ip: '192.168.1.1',
defaultTimeout: 500,
_cmdCreator: AtCommandCreator {},
_cmds: [],
_blockingCmds: [],
_blocked: [Object] },
_udpNavdatasStream:
UdpNavdataStream {
domain: null,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined,
readable: true,
_socket: [Object],
_port: 5554,
_ip: '192.168.1.1',
_initialized: true,
_parseNavdata: [Object],
_timeout: 100,
_timer: [Object],
_sequenceNumber: 0 },
_pngStream: null,
_tcpVideoStream: null,
_interval:
{ _called: true,
_idleTimeout: 30,
_idlePrev: [Object],
_idleNext: [Object],
_idleStart: 3088,
_onTimeout: [Function: wrapper],
_repeat: [Function: bound ] },
_ref: { fly: true },
_pcmd: {},
_repeaters: [],
_afterOffset: 22000,
_disableEmergency: true,
_lastState: 'CTRL_LANDED',
_lastBattery: 100,
_lastAltitude: 0 },
_repl:
REPLServer {
_domain:
Domain {

domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
members: [] },
useGlobal: false,
ignoreUndefined: false,
replMode: Symbol(repl-sloppy),
_inTemplateLiteral: false,
rli: [Circular],
eval: { [Function: runBound] domain: [Object] },
inputStream:
ReadStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: false,
bytesRead: 21,
_bytesDispatched: 0,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
isRaw: true,
isTTY: true,
fd: 0,
read: [Function],
_consuming: true },
outputStream:
WriteStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
_writableState: [Object],

writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 60,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 103,
rows: 49,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function] },
lines: [ level: [] ],
context:
{ DTRACE_NET_SERVER_CONNECTION: [Function],
DTRACE_NET_STREAM_END: [Function],
DTRACE_HTTP_SERVER_REQUEST: [Function],
DTRACE_HTTP_SERVER_RESPONSE: [Function],
DTRACE_HTTP_CLIENT_REQUEST: [Function],
DTRACE_HTTP_CLIENT_RESPONSE: [Function],
global: [Circular],
process: [Object],
GLOBAL: [Object],
root: [Object],
Buffer: [Object],
clearImmediate: [Function],
clearInterval: [Function],
clearTimeout: [Function],
setImmediate: [Function],
setInterval: [Function],
setTimeout: [Function],
console: [Object],
module: [Object],
require: [Object],
domain: null,
after: [Function: bound ],
createRepl: [Function: bound ],
createPngStream: [Function: bound ],
getPngStream: [Function: bound ],
getVideoStream: [Function: bound ],
resume: [Function: bound ],
disableEmergency: [Function: bound ],
takeoff: [Function: bound ],
land: [Function: bound ],
stop: [Function: bound ],
calibrate: [Function: bound ],
ftrim: [Function: bound ],
config: [Function: bound ],
ctrl: [Function: bound ],

animate: [Function: bound ],


animateLeds: [Function: bound ],
battery: [Function: bound ],
up: [Function: bound ],
down: [Function: bound ],
left: [Function: bound ],
right: [Function: bound ],
front: [Function: bound ],
back: [Function: bound ],
clockwise: [Function: bound ],
counterClockwise: [Function: bound ],
setMaxListeners: [Function: bound setMaxListeners],
getMaxListeners: [Function: bound getMaxListeners],
emit: [Function: bound emit],
addListener: [Function: bound addListener],
on: [Function: bound addListener],
once: [Function: bound once],
removeListener: [Function: bound removeListener],
removeAllListeners: [Function: bound removeAllListeners],
listeners: [Function: bound listeners],
listenerCount: [Function: bound listenerCount],
client: [Object] },
lineParser:
LineParser {
_literal: null,
shouldFail: false,
blockComment: false,
regExpLiteral: false },
bufferedCommand: '',
_sawReturn: false,
domain:
Domain {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
members: [] },
_events:
{ close: [Object],
SIGINT: [Function],
line: [Function],
SIGCONT: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
output:
WriteStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],

_eventsCount: 4,
_maxListeners: undefined,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 60,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 103,
rows: 49,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function] },
input:
ReadStream {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: false,
bytesRead: 21,
_bytesDispatched: 0,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
isRaw: true,
isTTY: true,
fd: 0,
read: [Function],
_consuming: true },
historySize: 30,
completer: [Function: complete],
_initialPrompt: 'drone> ',
_prompt: 'drone> ',

terminal: true,
line: '',
cursor: 0,
history: [],
historyIndex: -1,
commands:
{ break: [Object],
clear: [Object],
exit: [Object],
help: [Object],
save: [Object],
load: [Object] },
writer: [Function],
useColors: true,
prevRows: 0 },
_nodeEval:
{ [Function: runBound]
domain:
Domain {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
members: [] } } }
drone>
(To exit, press ^C again or type .exit)
drone>
(To exit, press ^C again or type .exit)
drone>
^C
Annabels-MacBook-Air-2:~ annabelhughes$

S-ar putea să vă placă și