fix: 补齐 ATX 控制器缺失接口并完成全项目 clippy -D warnings 修复

This commit is contained in:
mofeng-git
2026-02-10 21:37:33 +08:00
parent 72eb2c450d
commit 394baca938
64 changed files with 474 additions and 760 deletions

View File

@@ -17,8 +17,10 @@ use crate::utils::LogThrottler;
/// HID health status
#[derive(Debug, Clone, PartialEq)]
#[derive(Default)]
pub enum HidHealthStatus {
/// Device is healthy and operational
#[default]
Healthy,
/// Device has an error, attempting recovery
Error {
@@ -33,11 +35,6 @@ pub enum HidHealthStatus {
Disconnected,
}
impl Default for HidHealthStatus {
fn default() -> Self {
Self::Healthy
}
}
/// HID health monitor configuration
#[derive(Debug, Clone)]
@@ -196,7 +193,7 @@ impl HidHealthMonitor {
let attempt = self.retry_count.load(Ordering::Relaxed);
// Only publish every 5 attempts to avoid event spam
if attempt == 1 || attempt % 5 == 0 {
if attempt == 1 || attempt.is_multiple_of(5) {
debug!("HID {} reconnecting, attempt {}", backend, attempt);
if let Some(ref events) = *self.events.read().await {