From 201046a8b83f34ea099a11043ade28d8457d7af9 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期六, 02 八月 2025 10:47:04 +0800
Subject: [PATCH] 1. 添加计算时间戳宏 2. 重写切割两片玻璃函数 3. 添加分组过滤干扰点的函数

---
 SourceCode/Bond/Servo/Configuration.cpp |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/Configuration.cpp b/SourceCode/Bond/Servo/Configuration.cpp
index 5df0f4b..08fd582 100644
--- a/SourceCode/Bond/Servo/Configuration.cpp
+++ b/SourceCode/Bond/Servo/Configuration.cpp
@@ -136,3 +136,27 @@
 	return TRUE;
 }
 
+BOOL CConfiguration::setPortCassetteType(unsigned int index, int cassetteType)
+{
+	if (index >= 4) return FALSE;
+	if (cassetteType < 1 || 3 < cassetteType) return FALSE;
+
+	static char* pszSection[] = { "Port1", "Port2", "Port3", "Port4" };
+	WritePrivateProfileString(pszSection[index], _T("CassetteType"), std::to_string(cassetteType).c_str(), m_strFilepath);
+	return true;
+}
+
+BOOL CConfiguration::setPortEnable(unsigned int index, BOOL bEnable)
+{
+	if (index >= 4) return FALSE;
+
+	static char* pszSection[] = { "Port1", "Port2", "Port3", "Port4" };
+	WritePrivateProfileString(pszSection[index], _T("Enable"), std::to_string(bEnable ? 1 : 0).c_str(), m_strFilepath);
+	return true;
+}
+
+BOOL CConfiguration::isCompareMapsBeforeProceeding()
+{
+	return GetPrivateProfileInt(_T("Master"), _T("CompareMapsBeforeProceeding"), 0, m_strFilepath);
+}
+

--
Gitblit v1.9.3