-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAction.cpp
119 lines (95 loc) · 1.97 KB
/
Action.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// Action.cpp : implementation file
//
#include "stdafx.h"
#include "Virtual Robot.h"
#include "Action.h"
#include <iostream>
#include "mmath.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAction
IMPLEMENT_DYNCREATE(CAction, CWinThread)
CAction::CAction()
{
this->m_ExecuterID =-1;
InChargeOf=NULL;
}
CAction::~CAction()
{
}
BOOL CAction::InitInstance()
{
return TRUE;
}
int CAction::ExitInstance()
{
// TODO: perform any per-thread cleanup here
return CWinThread::ExitInstance();
}
BEGIN_MESSAGE_MAP(CAction, CWinThread)
//{{AFX_MSG_MAP(CAction)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAction message handlers
//CWinThread
//DEL int CAction::Run()
//DEL {
//DEL TRACE0("STARTED THREAD\r\n");
//DEL AfxMessageBox("Unable to load the file ",MB_OK |MB_ICONERROR);
//DEL TRACE0("ENDED THREAD\r\n");
//DEL return CWinThread::Run();
//DEL }
int CAction::Run()
{
if(InChargeOf)
{
int i = 0;
for( i=0;i<50;i=i+3)
{
//InChargeOf->rotval=0;
InChargeOf->rotval1=0;
InChargeOf->rotval3=0;
InChargeOf->rotval2=0;
InChargeOf->rotval=1*(PI/180);
InChargeOf->Refresh();
}
for( i=0;i<50;i=i+3)
{
InChargeOf->rotval=0;
InChargeOf->rotval1=0;
InChargeOf->rotval3=0;
//InChargeOf->rotval2=0;
InChargeOf->rotval2=1*(PI/180);
InChargeOf->Refresh();
}
for(i=0;i<50;i=i+3)
{
InChargeOf->rotval=0;
//InChargeOf->rotval1=0;
InChargeOf->rotval3=0;
InChargeOf->rotval2=0;
InChargeOf->rotval1=1*(PI/180);
InChargeOf->Refresh();
}
for( i=0;i<50;i=i+3)
{
InChargeOf->rotval=0;
InChargeOf->rotval1=0;
//InChargeOf->rotval3=0;
InChargeOf->rotval2=0;
InChargeOf->rotval3=1*(PI/180);
InChargeOf->Refresh();
}
InChargeOf->rotval=0;
InChargeOf->rotval1=0;
InChargeOf->rotval3=0;
InChargeOf->rotval2=0;
}
return CWinThread::Run();
}