ImperialCollegeLondon / FINESSE

A graphical user interface for controlling and monitoring an interferometer device
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Fix GUI inconsistencies when opening data file fails #562

Closed alexdewar closed 7 months ago

alexdewar commented 7 months ago

Description

Currently if the user attempts to start recording a data file, but the file creation fails for some reason, the GUI is still updated as if it was successful (e.g. the RecordingWidget shows "RECORDING IN PROGRESS").

The problem is caused by the fact that there is only one pubsub message to request that recording starts ("data_file.open"), but there is no way for the frontend to know whether or not this was successful (it is implied to have failed if a "data_file.error" message is sent, but it would be finicky to make use of this information). A better approach is to do what we do for Devices and have a separate message when opening is successful, at which point the GUI can update itself. Implement this with a new "data_file.opened" message.

Fixes #561.

Type of change

Key checklist

Further checks