增加回滚和应用时检查dsp_enable
This commit is contained in:
@@ -694,12 +694,15 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {})
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleApplyToggle = useCallback(
|
const handleApplyToggle = useCallback(
|
||||||
(msg: OptimizeUIMessage) => {
|
async (msg: OptimizeUIMessage) => {
|
||||||
if (!api) {
|
if (!api) {
|
||||||
toast.error(aiText.deviceDisconnected);
|
toast.error(aiText.deviceDisconnected);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((deviceState?.peqEnable ?? 0) !== 1) {
|
const deviceState = await api.getDeviceState();
|
||||||
|
console.log("deviceState.dsp_enable", deviceState?.dsp_enable);
|
||||||
|
if ((deviceState?.dsp_enable ?? 0) !== 1) {
|
||||||
|
console.log("dsp_enable is not enabled");
|
||||||
setPendingApplyMsg(msg);
|
setPendingApplyMsg(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user