|
|
@ -251,7 +251,6 @@ Cigarette::Cigarette(QWidget *parent)
|
|
|
|
sThread.sendData("ReStartOk", g_sys_conf.FeedbackPort);
|
|
|
|
sThread.sendData("ReStartOk", g_sys_conf.FeedbackPort);
|
|
|
|
sThread.sendData("DebugDis", g_sys_conf.FeedbackPort);
|
|
|
|
sThread.sendData("DebugDis", g_sys_conf.FeedbackPort);
|
|
|
|
sThread.sendData("LockOk", g_sys_conf.FeedbackPort);
|
|
|
|
sThread.sendData("LockOk", g_sys_conf.FeedbackPort);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __ExportData
|
|
|
|
#ifdef __ExportData
|
|
|
@ -602,7 +601,7 @@ void Cigarette::on_btn_start_released()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_op_time = OP_TIME;
|
|
|
|
g_op_time = OP_TIME;
|
|
|
|
ui.checkBox_debug->setEnabled(true); //ʹÄÜÏà»úµ÷ÊÔcheckBox
|
|
|
|
//ui.checkBox_debug->setEnabled(true); //ʹÄÜÏà»úµ÷ÊÔcheckBox
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Cigarette::pause_work()
|
|
|
|
void Cigarette::pause_work()
|
|
|
@ -872,56 +871,25 @@ void Cigarette::sendLatestData() {
|
|
|
|
for (int i = 0; i < NumberOfSupportedCameras; i++)
|
|
|
|
for (int i = 0; i < NumberOfSupportedCameras; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
UDPSendInfo.index = i;
|
|
|
|
UDPSendInfo.index = i;
|
|
|
|
|
|
|
|
|
|
|
|
UDPSendInfo.FrameID = ok_frame;
|
|
|
|
UDPSendInfo.FrameID = ok_frame;
|
|
|
|
UDPSendInfo.ok[i] = ok[i];
|
|
|
|
UDPSendInfo.ok[i] = ok[i];
|
|
|
|
//sThread.sendData("4_999", dataport + UDPSendInfo.index);
|
|
|
|
#ifdef __UDPSend
|
|
|
|
sThread.sendData(("4_" + to_string(ok[i])).c_str(), dataport + UDPSendInfo.index);
|
|
|
|
//sThread.sendData(("4_" + to_string(ok[i])).c_str(), dataport + UDPSendInfo.index);
|
|
|
|
//std::cout << "ok[" << i << "] is " << to_string(ok[i]) << std::endl;
|
|
|
|
UDP_Info_queue->put(UDPSendInfo);
|
|
|
|
//std::cout << ("4_" + to_string(ok[i])).c_str() << std::endl;
|
|
|
|
#endif
|
|
|
|
//UDP_Info_queue->put(UDPSendInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UDPSendInfo.FrameID = ng_frame;
|
|
|
|
UDPSendInfo.FrameID = ng_frame;
|
|
|
|
UDPSendInfo.ng[i] = ng[i];
|
|
|
|
UDPSendInfo.ng[i] = ng[i];
|
|
|
|
sThread.sendData(("5_" + to_string(ng[i])).c_str(), dataport + UDPSendInfo.index);
|
|
|
|
#ifdef __UDPSend
|
|
|
|
|
|
|
|
//sThread.sendData(("5_" + to_string(ng[i])).c_str(), dataport + UDPSendInfo.index);
|
|
|
|
|
|
|
|
UDP_Info_queue->put(UDPSendInfo);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
UDPSendInfo.FrameID = total_frame;
|
|
|
|
UDPSendInfo.FrameID = total_frame;
|
|
|
|
UDPSendInfo.Total = production_number[i];
|
|
|
|
UDPSendInfo.Total = production_number[i];
|
|
|
|
sThread.sendData(("7_" + to_string(production_number[i])).c_str(), dataport + UDPSendInfo.index);
|
|
|
|
#ifdef __UDPSend
|
|
|
|
}
|
|
|
|
//sThread.sendData(("7_" + to_string(production_number[i])).c_str(), dataport + UDPSendInfo.index);
|
|
|
|
|
|
|
|
UDP_Info_queue->put(UDPSendInfo);
|
|
|
|
//while (isLoop) {
|
|
|
|
#endif
|
|
|
|
//switch (UDPSendInfo.FrameID) {
|
|
|
|
}
|
|
|
|
// case info_frame: {
|
|
|
|
|
|
|
|
// sThread.sendData(&UDPSendInfo, dataport);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// case speed_frame: {
|
|
|
|
|
|
|
|
// sThread.sendSpeed(&UDPSendInfo, dataport);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// case kick_frame: {
|
|
|
|
|
|
|
|
// sThread.sendKick(&UDPSendInfo, dataport);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// case ok_frame: {
|
|
|
|
|
|
|
|
// sThread.sendOK(&UDPSendInfo, dataport);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// case ng_frame: {
|
|
|
|
|
|
|
|
// sThread.sendNG(&UDPSendInfo, dataport);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// case total_frame: {
|
|
|
|
|
|
|
|
// sThread.sendTotal(&UDPSendInfo, dataport);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// case image_frame: {
|
|
|
|
|
|
|
|
// //sThread.sendImage(&UDPSendInfo, imageport);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Cigarette::OnRotateReleasedHub(int Num)//旋转按钮
|
|
|
|
void Cigarette::OnRotateReleasedHub(int Num)//旋转按钮
|
|
|
@ -1396,7 +1364,7 @@ void Cigarette::on_checkBox_debug_clicked(bool checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QMessageBox::information(NULL, QStringLiteral("操作顺序检查 "), QStringLiteral("请先点击‘停止工作’按钮,才能进入调试模式"), QMessageBox::Ok);
|
|
|
|
QMessageBox::information(NULL, QStringLiteral("操作顺序检查 "), QStringLiteral("请先点击‘停止工作’按钮,才能进入调试模式"), QMessageBox::Ok);
|
|
|
|
ui.checkBox_debug->setChecked(false);
|
|
|
|
ui.checkBox_debug->setChecked(false);
|
|
|
|
return;
|
|
|
|
//return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1414,7 +1382,7 @@ void Cigarette::on_checkBox_debug_clicked(bool checked)
|
|
|
|
DisableDebugMode();
|
|
|
|
DisableDebugMode();
|
|
|
|
//on_pushButton_clear_released(); //换班
|
|
|
|
//on_pushButton_clear_released(); //换班
|
|
|
|
ui.checkBox_debug->setChecked(false);
|
|
|
|
ui.checkBox_debug->setChecked(false);
|
|
|
|
ui.checkBox_debug->setEnabled(true);
|
|
|
|
//ui.checkBox_debug->setEnabled(true);
|
|
|
|
#ifdef __UDPSend
|
|
|
|
#ifdef __UDPSend
|
|
|
|
sThread.sendData("DebugDis", g_sys_conf.FeedbackPort);
|
|
|
|
sThread.sendData("DebugDis", g_sys_conf.FeedbackPort);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|