From 7ebb8fc87c5fbfa8b572697b0a95203c201a05da Mon Sep 17 00:00:00 2001 From: skiinder Date: Fri, 20 Mar 2026 18:00:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor(hid=5Ftx=5Fmanager):=20=E7=AE=80?= =?UTF-8?q?=E5=8C=96BLE=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除了冗余的active_mode检查,因为vendor dirty标志的处理 不应该依赖于特定的传输模式,提高了代码的通用性。 --- src/modules/hid_tx_manager_module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/hid_tx_manager_module.c b/src/modules/hid_tx_manager_module.c index 842de03..61e1071 100644 --- a/src/modules/hid_tx_manager_module.c +++ b/src/modules/hid_tx_manager_module.c @@ -128,8 +128,7 @@ static void dispatch_next_if_possible(void) return; } - if ((tx.active_mode == MODE_TYPE_BLE) && - atomic_test_bit(&tx.flags, HID_TX_FLAG_VENDOR_DIRTY) && + if (atomic_test_bit(&tx.flags, HID_TX_FLAG_VENDOR_DIRTY) && atomic_test_bit(&tx.flags, HID_TX_FLAG_VENDOR_VALID)) { atomic_clear_bit(&tx.flags, HID_TX_FLAG_VENDOR_DIRTY); (void)hid_tx_dispatch_item(&tx.vendor_state);