更新遥控器画面

This commit is contained in:
2025-10-10 17:44:10 +08:00
parent faf921afc7
commit 945dadc8e8
86 changed files with 14150 additions and 2607 deletions

View File

@@ -51,7 +51,6 @@ void P13_InsPage::Write32Bit(uint8_t Key, uint8_t Index, bool Bit)
NewValue = OldValue | (1u << Index); // 置 1
else
NewValue = OldValue & ~(1u << Index); // 清 0
/* 5. 值没变就提前退出 */
if (OldValue == NewValue) return;
@@ -61,7 +60,15 @@ void P13_InsPage::Write32Bit(uint8_t Key, uint8_t Index, bool Bit)
while (!m_OpcUaManager->writeNodeValue(NodeId, NewValue) && Count < 10) {
++Count;
}
qDebug()<<"成功发送节点:"<<NodeId<<""<<NewValue;
Sleep_ms(100);
if(Bit){
NewValue = OldValue & ~(1u << Index); // 清 0
/* 6. 带重试的写操作 */
uint8_t Count = 0;
while (!m_OpcUaManager->writeNodeValue(NodeId, NewValue) && Count < 10) {
++Count;
}
}
}
void P13_InsPage::on_XZK_OperMode_activated(int index) {Write32Bit( 1, 0, static_cast<int8_t>(index));} //
void P13_InsPage::on_XZK_SpeedMode_activated(int index) {Write32Bit( 4, 5, static_cast< bool >(index));} //