為各個(gè)按鈕添加進(jìn)行云臺控制的方法。代碼如下:
void CCaptureDlg::OnUp() //向上移動
{
MoveCapture(0);
}
void CCaptureDlg::OnReset() //停止移動
{
MoveCapture(12);
}
void CCaptureDlg::OnDown() //向下移動
{
MoveCapture(1);
}
void CCaptureDlg::OnLeft() //向左移動
{
MoveCapture(2);
}
void CCaptureDlg::OnRight() //向右移動
{
MoveCapture(3);
}
void CCaptureDlg::OnInFoci() //增加聚焦
{
MoveCapture(5);
}
void CCaptureDlg::OnReFoci() //減小聚焦
{
MoveCapture(4);
}
void CCaptureDlg::OnInLen() //對焦增
{
MoveCapture(7);
}
void CCaptureDlg::OnReLen() //對焦減
{
MoveCapture(6);
}
void CCaptureDlg::OnReAperture() //光圈減
{
MoveCapture(8);
}
void CCaptureDlg::OnInAperture() //光圈增
{
MoveCapture(9);
}
void CCaptureDlg::OnReBrush() //畫筆減
{
MoveCapture(10);
}
void CCaptureDlg::OnInBrush() //畫筆增
{
MoveCapture(11);
}