-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmainExecutePath.cpp
More file actions
43 lines (30 loc) · 864 Bytes
/
mainExecutePath.cpp
File metadata and controls
43 lines (30 loc) · 864 Bytes
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
/*
* File: mainExecutePath.cpp
* Author: Jan Dufek
*
* Created on October 16, 2018, 8:28 PM
*/
#include <stdio.h>
#include "Fotokite.hpp"
/**
*
*/
int main(int argc, char *argv[]) {
// Check if the program has 1 argument
if (argc != 1 && argc != 2 ) {
return -1;
}
// Initialize Fotokite interface for OCU server
Fotokite * fotokite = new Fotokite("/tmp/cmds", "127.0.0.1", 8080);
if (argc == 1) {
// Execute waypoint sequence specified on standard input
fotokite->executePath();
} else {
// Execute waypoint file specified by a path in the argument
fotokite->executePath(argv[1]);
}
// Delete Fotokite object (important for stopping remote control mode on Fotokite)
delete fotokite;
// Clean exit
return 0;
}