This commit is contained in:
Lucas
2026-09-29 16:59:54 +02:00
parent d5a2afdea5
commit 6511d9d007
7 changed files with 57 additions and 36 deletions
+7 -5
View File
@@ -3,10 +3,9 @@ import {
DSPMode,
DSP408OutputMeters,
DSP408InputMeters,
ConnectionStatus,
} from './features/dsp408/types';
export type DSPStatus = 'connected' | 'connecting' | 'disconnected';
export type NotificationType = 'success' | 'error' | 'warning';
export type Notification = {
id: number;
@@ -39,12 +38,15 @@ interface DSPBase {
mode: DSPMode;
passwordRequired?: boolean;
status: DSPStatus;
isConnecting: boolean;
pollingPaused: boolean;
}
export function isConnected(dsp: DSP): boolean {
return dsp.type === 'DSP408'
&& dsp.state.connection === ConnectionStatus.Connected;
}
export type DSP408 = DSPBase & {
type: 'DSP408';
state: DSP408State;