Skip to content

Commit

Permalink
Fixed indicators and start stop bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jandegen committed Jan 17, 2023
1 parent 38bb1f1 commit 4eafd0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Apps/frontend/src/components/StartStopButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
let color = LINE_COLORS_RGBA[channel];
const handleStartStop = async () => {
dispatch("startStop", { buttonValue: !$channelConfig[channel].enabled });
dispatch("startStop", { buttonValue: $channelConfig[channel].enabled });
};
</script>

<div class="control-panel--bottom_switch" data-cy="startStopSwitch-{channel}">
<Switch
hideLabel
small
bind:toggled={$channelConfig[channel].enabled}
on:click={handleStartStop}
toggledColor={color}
Expand Down
4 changes: 2 additions & 2 deletions Apps/frontend/src/views/ControlPanelBottom.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
<StartStopButton
channel={index}
on:startStop={async (event) => {
waveElement.startStopChannelI(index, $channelConfig[index].enabled);
waveElement.startStopChannelI(index, !$channelConfig[index].enabled);
indicatorElement.startStopChannelI(
index,
$channelConfig[index].enabled
!$channelConfig[index].enabled
);
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion Apps/frontend/src/views/Indicators.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
let max = Array(NUM_CHANNELS).fill(0.0);
let offsets = Array(NUM_CHANNELS).fill(0.0);
let scalings = Array(NUM_CHANNELS).fill(1.0);
let startStopLine = Array(NUM_CHANNELS).fill(true);
let startStopLine = Array(NUM_CHANNELS).fill(false);
export let scaleY;
Expand Down

0 comments on commit 4eafd0a

Please sign in to comment.