From 7c35ff8d9a626f69a8a8b7de3d73dc9d73de9dd7 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期六, 13 九月 2025 10:51:32 +0800
Subject: [PATCH] 1. 解决读取报警文件错误的问题,提高兼容性(可能文件是在MacOS编辑的,导致换行符不一样)
---
SourceCode/Bond/Servo/ServoDlg.cpp | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 646641d..0924c6c 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -217,6 +217,20 @@
m_pMyStatusbar->setBackgroundColor(STATUSBAR_BK_ALARM);
m_pMyStatusbar->setForegroundColor(RGB(0, 0, 0));
m_pMyStatusbar->setRunTimeText("启动失败.");
+ m_pTopToolbar->GetBtn(IDC_BUTTON_ALARM)->EnableWindow(TRUE);
+ }
+ else if (state == SERVO::MASTERSTATE::ATHERERROR) {
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN)->EnableWindow(TRUE);
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN_BATCH)->EnableWindow(TRUE);
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN_CT)->EnableWindow(TRUE);
+ m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+ m_pMyStatusbar->setBackgroundColor(STATUSBAR_BK_ALARM);
+ m_pMyStatusbar->setForegroundColor(RGB(0, 0, 0));
+ m_pMyStatusbar->setRunTimeText(theApp.m_model.getMaster().getLastErrorText().c_str());
+ if (theApp.m_model.getMaster().getLastError() == ER_CODE_AOI_NG) {
+ AfxMessageBox(_T("AOI检测失败,请操作员介入解决问题!"));
+ }
+ m_pTopToolbar->GetBtn(IDC_BUTTON_ALARM)->EnableWindow(TRUE);
}
else if (state == SERVO::MASTERSTATE::RUNNING || state == SERVO::MASTERSTATE::RUNNING_CONTINUOUS_TRANSFER
|| state == SERVO::MASTERSTATE::RUNNING_BATCH) {
@@ -645,6 +659,7 @@
void CServoDlg::OnMenuHelpAbout()
{
+ theApp.m_model.getMaster().test();
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
--
Gitblit v1.9.3