PlanktoScope / PlanktoScope

Open and Affordable Quantitative Imaging Platform
https://www.planktoscope.org
Creative Commons Attribution Share Alike 4.0 International
55 stars 23 forks source link

Show dialog on homepage when `config.json`'s hw version is null #432

Closed ethanjli closed 1 week ago

ethanjli commented 2 weeks ago

This PR is part of a prototype for a discussion in the 2024-06-13 software meeting about not setting a default hardware version for the planktoscopehat build of the PlanktoScope OS (reverting a change made in #385) and instead showing a first-time setup dialog on the Node-RED dashboard's homepage prompting the user to select a hardware version; this setup dialog replaces the homepage's buttons (but does not disable the navigation sidebar). The adafruithat build of the PlanktoScope OS will continue to have v2.1 as the default hardware version and thus will not have this dialog.

As part of that change, this PR also makes the planktoscopehat version of the Node-RED dashboard restart the Python hardware controller whenever the hardware version is changed, whether from the homepage or from the Hardware Settings page. TODO: make this change to the adafruithat version of the Node-RED dashboard, for consistency.

If this PR is combined with #430, then the fairscope-latest OS image added by #430 will bypass the dialog added by this PR. Note: if this PR is combined with #430, then the hardware version in the planktoscopehat-latest.config.json file should be set to null (as done by this PR) instead of PlanktoScope v2.5 (as done by #430).

ethanjli commented 1 week ago

This PR was approved for merging in the 2024-06-20 software meeting, but with a revision to update the Hardware Settings page's dropdown menu for selecting hardware version after selecting the hardware version from the home page.