unstable
This commit is contained in:
+7
-5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user