?? xspview.cpp
字號:
SendData(hehe);
}
}
void CXspView::OnFour()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x04;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x97;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x04;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x97;
SendData(hehe);
}
}
void CXspView::OnFive()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x05;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x98;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x05;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x98;
SendData(hehe);
}
}
void CXspView::OnSix()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x06;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x99;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x06;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x99;
SendData(hehe);
}
}
void CXspView::OnSeven()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x07;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x9a;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x07;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x9a;
SendData(hehe);
}
}
void CXspView::OnEight()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x08;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x9b;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x08;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x9b;
SendData(hehe);
}
}
void CXspView::OnNine()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x09;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x9c;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x07;
hehe[2]=0x09;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x9c;
SendData(hehe);
}
}
void CXspView::OnLeft()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
hehe[0]=0xcd;
hehe[1]=0x05;
hehe[2]=0x00;
hehe[3]=0x80;
hehe[4]=movespeed;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
}
void CXspView::OnRight()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
hehe[0]=0xcd;
hehe[1]=0x05;
hehe[2]=0x00;
hehe[3]=0x20;
hehe[4]=movespeed;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x30;
SendData(hehe);
}
void CXspView::OnDown()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
hehe[0]=0xcd;
hehe[1]=0x05;
hehe[2]=0x00;
hehe[3]=0x08;
hehe[4]=movespeed;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x12;
SendData(hehe);
}
void CXspView::OnUp()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
hehe[0]=0xcd;
hehe[1]=0x05;
hehe[2]=0x00;
hehe[3]=0x02;
hehe[4]=movespeed;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x18;
SendData(hehe);
}
void CXspView::OnSpeed()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x05;
hehe[2]=0x80;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0xc3;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
}
}
void CXspView::OnCixiu()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
stepcount=0;
hehe[0]=0xcd;
hehe[1]=0x01;
hehe[2]=10;
hehe[3]=Xstep[0];
hehe[4]=Ystep[0];
hehe[5]=0x80;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
Sleep(5);
stepcount=1;
hehe[0]=0xcd;
hehe[1]=0x01;
hehe[2]=10;
hehe[3]=Xstep[1];
hehe[4]=Ystep[1];
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
Sleep(5);
stepcount=2;
hehe[0]=0xcd;
hehe[1]=0x01;
hehe[2]=10;
hehe[3]=Xstep[2];
hehe[4]=Ystep[2];
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
Sleep(5);
stepcount=3;
hehe[0]=0xcd;
hehe[1]=0x01;
hehe[2]=10;
hehe[3]=Xstep[3];
hehe[4]=Ystep[3];
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
Sleep(5);
stepcount=4;
hehe[0]=0xcd;
hehe[1]=0x01;
hehe[2]=10;
hehe[3]=Xstep[4];
hehe[4]=Ystep[4];
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x90;
SendData(hehe);
}
void CXspView::OnDotrun()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x03;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0xf4;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x03;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0xf4;
SendData(hehe);
}
}
void CXspView::OnStopdown()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x04;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x3d;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x04;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x3d;
SendData(hehe);
}
}
void CXspView::OnBackorg()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x09;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x94;
SendData(hehe);
}
}
void CXspView::OnJianxian()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x06;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0xa0;
SendData(hehe);
}
else if(systemstatus==1)
{
hehe[0]=0xcd;
hehe[1]=0x06;
hehe[2]=0x00;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0xa0;
SendData(hehe);
}
}
void CXspView::OnJxtest()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x08;
hehe[2]=0x01;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x93;
SendData(hehe);
}
}
void CXspView::OnKxtest()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x08;
hehe[2]=0x02;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x94;
SendData(hehe);
}
}
void CXspView::OnGxtest()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x08;
hehe[2]=0x03;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x95;
SendData(hehe);
}
}
void CXspView::OnDxcheck()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x08;
hehe[2]=0x04;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x96;
SendData(hehe);
}
}
void CXspView::OnExitdxcheck()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x08;
hehe[2]=0x05;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x92;
SendData(hehe);
}
}
void CXspView::OnZero()
{
// TODO: Add your control notification handler code here
X=0;
Y=0;
}
void CXspView::OnTestspeed()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x08;
hehe[2]=0x06;
hehe[3]=realspeed/10;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x95;
SendData(hehe);
}
}
void CXspView::OnShake()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0x08;
hehe[2]=0x07;
hehe[3]=0x00;
hehe[4]=0x00;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x92;
SendData(hehe);
}
}
void CXspView::OnChangepara()
{
// TODO: Add your control notification handler code here
unsigned char hehe[8];
UpdateData(TRUE);
if(systemstatus==0)
{
hehe[0]=0xcd;
hehe[1]=0xee;
//hehe[1]=0x02;
hehe[2]=m_paraindex;
hehe[3]=m_paradata>>8;
hehe[4]=m_paradata&0x00ff;
hehe[5]=0x00;
hehe[6]=0x00;
hehe[7]=0x92;
SendData(hehe);
}
}
void CXspView::OnButton2()
{
// TODO: Add your control notification handler code here
if(m_comm.GetPortOpen())
{
m_comm.SetPortOpen(FALSE);
m_runstatus.SetWindowText("串口關閉");
}
}
void CXspView::OnButton3()
{
// TODO: Add your control notification handler code here
if(movespeed==2)
movespeed=20;
else if(movespeed==20)
movespeed=2;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -