Motivation
For the v2.3 software release, two separate SD card images were provided - one to provide hardware support for the Adafruit HAT, and the other to provide hardware support for the PlanktoScope HAT. As a result, we had to provide special guidance to users about which SD card image to use. Additionally, the v2.3 version of the Python backend maintained Adafruit HAT support on the main branch of this repo and PlanktoScope HAT support on the pscopehat branch of this repo, which meant the process for building the SD card image for each HAT was slightly different (i.e. the repo had to be downloaded to the SD card from a different URL). This adds complexity to the process for building and releasing SD card images. In particular, after #416 (because the GitHub Actions workflow for building OS images involves a QEMU VM step which occasionally freezes for no good reason), building many SD card images makes our CI workflows flaky.
The Node-RED dashboard already has a menu to select which HAT to use - so we could just use that as the one and only way to select which HAT is used, and simplify away everything else related to which HAT the software uses. However, currently there are actually two different Node-RED dashboards (one version for the Adafruit HAT, and the other for the pscopehat), so until we can merge them back into the same dashboard (which would be a big project in and of itself), we should just have either an external UI to switch the Node-RED dashboard or an internal UI in the Node-RED dashboard which switches the flows.json file and restarts the Node-RED server.
Goals
- Make a single SD card image which can run the Python backend and Node-RED dashboard for either HAT.
- Make an easy way to set and change the supported hardware version.
Steps
Unresolved Questions
Do we need to drop support for the waveshare HAT? Yes, we need to drop support
- How might we unify the codebases of the two Python backends for the two HATs? (this will be saved for future PRs)
- How will we configure which Python backend runs when we package the backend in Forklift? Will we have two different packages, or a single package which receives configuration from Node-RED in some other way? (this will be addressed in a future PR to containerize the Python backends; ideally the adafruithat version's Forklift package or Forklift feature flag would be mutually exclusive with the Forklift package or Forklift feature flag for the pscopehat version of the Python backend, or it would be toggled via a config file rather than via Forklift)
- What work is needed for us to be able to unify the Node-RED dashboards?
Implementation History
Motivation
For the v2.3 software release, two separate SD card images were provided - one to provide hardware support for the Adafruit HAT, and the other to provide hardware support for the PlanktoScope HAT. As a result, we had to provide special guidance to users about which SD card image to use. Additionally, the v2.3 version of the Python backend maintained Adafruit HAT support on the main branch of this repo and PlanktoScope HAT support on the pscopehat branch of this repo, which meant the process for building the SD card image for each HAT was slightly different (i.e. the repo had to be downloaded to the SD card from a different URL). This adds complexity to the process for building and releasing SD card images. In particular, after #416 (because the GitHub Actions workflow for building OS images involves a QEMU VM step which occasionally freezes for no good reason), building many SD card images makes our CI workflows flaky.
The Node-RED dashboard already has a menu to select which HAT to use - so we could just use that as the one and only way to select which HAT is used, and simplify away everything else related to which HAT the software uses. However, currently there are actually two different Node-RED dashboards (one version for the Adafruit HAT, and the other for the pscopehat), so until we can merge them back into the same dashboard (which would be a big project in and of itself), we should just have either an external UI to switch the Node-RED dashboard or an internal UI in the Node-RED dashboard which switches the
flows.jsonfile and restarts the Node-RED server.Goals
Steps
Unresolved Questions
Do we need to drop support for the waveshare HAT?Yes, we need to drop supportImplementation History
config.json's hw version is null #432config.jsonfile #602