增加UI配置项

This commit is contained in:
2025-10-16 17:40:00 +08:00
parent eeb5af98eb
commit f88b815723
181 changed files with 718 additions and 465 deletions

View File

@@ -19,8 +19,8 @@ void P13_InsPage::Write32Bit(uint8_t Key ,uint8_t Index,int8_t int8){
if(Index > 3) return;
if(int8 <-127 || int8 > 127) return;
QString NodeId = QString("ns=6;s=::AsGlobalPV:PanelControlKey_%1").arg(Key);
uint32_t OldValue = gOPC_NodeValue[NodeId].toUInt();
QString NodeId = QString("PanelControlKey_%1").arg(Key);
uint32_t OldValue = getNodeValue(NodeId).toUInt();
uint8_t ByteValue = static_cast<uint8_t>(int8); // 先转无符号字节
uint32_t Mask = ~(0xFFu << (Index * 8)); // 构造清除掩码
@@ -41,10 +41,10 @@ void P13_InsPage::Write32Bit(uint8_t Key, uint8_t Index, bool Bit)
if (Index > 31) return; // 0…31 共 32 个 bit
/* 2. 构造 NodeId */
QString NodeId = QString("ns=6;s=::AsGlobalPV:PanelControlKey_%1").arg(Key);
QString NodeId = QString("PanelControlKey_%1").arg(Key);
/* 3. 读当前值(缓存里直接取) */
uint32_t OldValue = gOPC_NodeValue[NodeId].toUInt();
uint32_t OldValue = getNodeValue(NodeId).toUInt();
/* 4. 只改指定 bit其余位不变 */
uint32_t NewValue;