Skip to content

Commit

Permalink
Add measurements to channel info
Browse files Browse the repository at this point in the history
See also: #10
  • Loading branch information
BECATRUE committed Dec 4, 2024
1 parent 541ef9f commit 5b82423
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wlm-ui/src/store/slices/channel/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ export interface SettingType {
period: number;
};

export interface MeasurementType {
frequency?: number;
error?: string;
measuredAt: string;
};

export interface ChannelInfo {
channel: ChannelType;
inUse: boolean;
setting: SettingType;
measurements: MeasurementType[];
};

export interface ChannelListInfo {
Expand Down Expand Up @@ -97,6 +104,7 @@ export const channelListSlice = createSlice({
channel: { channel: ch.channel, name: ch.name },
inUse: ch.inUse,
setting: info?.setting ?? { exposure: 0, period: 0 },
measurements: info?.measurements ?? [],
} as ChannelInfo;
}).sort((a, b) => a.channel.channel - b.channel.channel);
})
Expand Down

0 comments on commit 5b82423

Please sign in to comment.