fix: 修复 CH9329 健康检测错误和切换错误 #251 #255 #265

This commit is contained in:
mofeng-git
2026-06-13 16:47:21 +08:00
parent 5de7ecd4c5
commit da61644dbc
9 changed files with 199 additions and 91 deletions

View File

@@ -319,6 +319,7 @@ function hidErrorHint(errorCode?: string | null, backend?: string | null, reason
case 'io_error':
case 'write_failed':
case 'read_failed':
case 'device_unavailable':
if (backend === 'otg') return t('hid.errorHints.otgIoError')
if (backend === 'ch9329') return t('hid.errorHints.ch9329IoError')
return t('hid.errorHints.ioError')

View File

@@ -1286,10 +1286,10 @@ async function saveConfig() {
hidUpdate.otg_functions = { ...config.value.hid_otg_functions }
hidUpdate.otg_keyboard_leds = config.value.hid_otg_keyboard_leds
}
await configStore.updateMsd({
enabled: config.value.msd_enabled,
})
await configStore.updateHid(hidUpdate)
await configStore.updateMsd({
enabled: config.value.hid_backend === 'otg' && config.value.msd_enabled,
})
}
if (activeSection.value === 'msd') {