-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCockatoo.java
63 lines (51 loc) · 1.57 KB
/
Cockatoo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* Cockatoo.java
* ~~~~~~~~~~~~~
* Please do not remove the following notices.
* Copyright (c) 2010 by Geekscape Pty. Ltd.
* License: GPLv3. http://geekscape.org/static/parrot_license.html
* Version: 0.0
*
* Description
* ~~~~~~~~~~~
* ARDrone Parrot (quadcopter) GUI and proxy-server.
*
* To Do
* ~~~~~
* - Create parrot_license.html.
* - Create readme.markdown, using notes.txt.
*
* - Logging slowing down responsiveness, use separate thread ?
*
* - Set-up Aiko-Gateway (Lua).
*
* - Create flight macros, can also be used by proxy-server.
* - Support MobSenDat board input (over ZigBee, including GPS).
* - Waypoint recording and playback.
* - Fly predetermined course from a specified point.
*
* - Support Pebble board input / output (over ZigBee).
*/
import java.net.*;
public class Cockatoo {
private Display display = null;
private ParrotCommunication parrotCommunication = null;
private Server server = null;
public Cockatoo(
InetAddress parrotAddress) {
parrotCommunication = new ParrotCommunication(parrotAddress);
display = new Display(new KeyboardInput(parrotCommunication));
server = new Server(parrotCommunication);
}
public static void main(
String args[]) {
String parrotHostname = (args.length == 1) ?
args[0] : ParrotCommunication.DEFAULT_PARROT_HOSTNAME;
try {
Cockatoo cockatoo = new Cockatoo(InetAddress.getByName(parrotHostname));
}
catch (UnknownHostException unknownHostException) {
System.err.println("Unknown host: " + parrotHostname);
System.exit(-1);
}
}
}