-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmain.cpp
45 lines (30 loc) · 905 Bytes
/
main.cpp
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
#include <iostream>
#include "DJIHardDriverManifold.h"
#include "conboardsdktask.h"
#include "APIThread.h"
#include "maincontrol.h"
using namespace std;
int main(int argc, char *argv[])
{
//! @note replace these two lines below to change to an other hard-driver level.
HardDriverManifold driver("/dev/ttyTHS1", 9600);
// driver.setBaudrate(230400);
driver.setBaudrate(115200);
driver.setDevice("/dev/ttyTHS1");
driver.init();
CoreAPI api(&driver);
ConboardSDKScript sdkScript(&api);
//! @note replace these four lines below to change to an other hard-driver level.
APIThread send(&api, 1);
APIThread read(&api, 2);
send.createThread();
read.createThread();
MainControl MC(&sdkScript,&driver,&api);
MC.Initialize();
MC.Run();
MC.Release();
//!@note ....
// ScriptThread st(&sdkScript);
// st.run();
return 0;
}