Skip to content

Commit

Permalink
Disable previous focus curve when new values appear
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Feb 19, 2022
1 parent 26bd684 commit aa0ad53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/views/focus_monitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function FocusMonitorView() {
gfa5: undefined,
gfa6: undefined
});
const [focusCurve, setFocusCurve] = React.useState<number[][] | undefined>(undefined);
const [focusCurve, setFocusCurve] = React.useState<number[][]>([]);
const [offset, setOffset] = React.useState<number | undefined>(undefined);

const [currentExp, setCurrentExp] = React.useState<number>(-999);
Expand All @@ -52,6 +52,7 @@ export default function FocusMonitorView() {
gfa6: undefined
});
setCurrentExp(fwhm_camera.values[1]);
setFocusCurve([]);
}
setFwhm((f) => ({ ...f, [fwhm_camera.values[0]]: fwhm_camera.values[2] }));
}
Expand Down

0 comments on commit aa0ad53

Please sign in to comment.