diff --git a/.github/workflows/build-os-bookworm.yml b/.github/workflows/build-os-bookworm.yml index b8472a71d..06b725e93 100644 --- a/.github/workflows/build-os-bookworm.yml +++ b/.github/workflows/build-os-bookworm.yml @@ -31,15 +31,6 @@ concurrency: jobs: build: name: build - strategy: - fail-fast: false - matrix: - variant: - - adafruithat - - planktoscopehat - - fairscope-latest - base_variant_name: - - lite permissions: contents: read packages: write @@ -49,8 +40,7 @@ jobs: with: name: planktoscope base_release_name: bookworm - base_image_variant: ${{ matrix.base_variant_name }} + base_image_variant: lite base_release_date: 2025-05-13 base_file_release_date: 2025-05-13 arch: arm64 - variant: ${{ matrix.variant }} diff --git a/.github/workflows/build-os.yml b/.github/workflows/build-os.yml index 982b980d9..40568d116 100644 --- a/.github/workflows/build-os.yml +++ b/.github/workflows/build-os.yml @@ -26,10 +26,6 @@ on: description: 'The CPU architecture of the OS (armhf, arm64)' required: true type: string - variant: - description: 'The name of the RPi OS base image variant (none, segmenter-only, adafruithat, planktoscopehat)' - required: true - type: string jobs: build-os-image: @@ -153,7 +149,7 @@ jobs: ACTUAL_SHA="$(printf "%.7s" "${{ env.ACTUAL_SHA }}")" /run/os-setup/os/ci-record-version.sh \ "github.com/${{ env.REPO }}" "$ACTUAL_SHA" "hash" \ - "${{ inputs.variant }}" "/run/os-setup" + "/run/os-setup" echo "installer-config.yml:" cat /usr/share/planktoscope/installer-config.yml echo "installer-versioning.yml:" @@ -276,7 +272,7 @@ jobs: run: | echo "Running setup scripts..." export DEBIAN_FRONTEND=noninteractive - /run/os-setup/os/setup.sh ${{ inputs.variant }} + /run/os-setup/os/setup.sh echo "Done!" - name: Prepare for a headless first boot on bare metal @@ -330,9 +326,10 @@ jobs: else version="$(printf "%.7s" "${{ github.sha }}")" fi - variant="${{ inputs.variant }}" + + variant="" if [[ "${{ inputs.base_release_name }}" != "bookworm" ]]; then - variant="$variant.${{ inputs.base_release_name }}" + variant="${{ inputs.base_release_name }}" fi if [[ "${{ inputs.arch }}" != "arm64" ]]; then variant="$variant.${{ inputs.arch }}" @@ -342,7 +339,10 @@ jobs: fi # Assemble the image name - output_name="${{ inputs.name }}-$version+$variant" + output_name="${{ inputs.name }}-$version" + if [[ $variant != "" ]]; then + output_name="$output_name.$variant" + fi echo "OUTPUT_IMAGE_NAME=$output_name" >> $GITHUB_ENV - name: Shrink the OS image diff --git a/documentation/docs/setup/software/config.md b/documentation/docs/setup/software/config.md index f26388f9f..62ce6ac28 100644 --- a/documentation/docs/setup/software/config.md +++ b/documentation/docs/setup/software/config.md @@ -6,10 +6,6 @@ Currently, all post-installation configuration is performed in the PlanktoScope ## Hardware Version -!!! info - - This step is only required if you are using a `planktoscopehat` SD card image; it is not needed on the `adafruithat` and `fairscope-latest` SD card images. - The first time you start the PlanktoScope, you will need to select the hardware version of your PlanktoScope for the PlanktoScope software to match the actual configuration of your PlanktoScope hardware. To do this, open the Node-RED dashboard. You should see a homepage with a drop-down menu to select your PlanktoScope hardware version. You should select the correct version for your PlanktoScope. After you select a hardware version, the PlanktoScope will show the Node-RED dashboard's normal homepage navigation buttons; you should also wait several seconds for the PlanktoScope software to restart and load the updated hardware settings. ## Next steps diff --git a/documentation/docs/setup/software/index.md b/documentation/docs/setup/software/index.md index 43e294426..7cbf12369 100644 --- a/documentation/docs/setup/software/index.md +++ b/documentation/docs/setup/software/index.md @@ -8,10 +8,6 @@ If you are building your own PlanktoScope from your own hardware kit, you will n In order to install the PlanktoScope software, you will first need to choose an SD card image file to use for installation, and then you will install that SD card image and perform some configuration of the software. -## Choosing an SD card image - -PlanktoScope SD card image files are identified with a version number as well as a hardware configuration tag - for example, the SD card image file named `planktoscope-v2024.0.0+planktoscopehat.img.xz` is for v2020.0.0 of the PlanktoScope OS, configured to work with versions of the PlanktoScope hardware based on the custom PlanktoScope HAT (rather than the Adafruit Stepper Motor HAT). Thus, you will need to choose both a version number (e.g. v2023.9.0) and a hardware configuration (e.g. `planktoscopehat`). - ### PlanktoScope OS versions Because the PlanktoScope project aims to release occasional updates to the PlanktoScope OS in order to fix various software problems and make various improvements to the software, multiple versions of the PlanktoScope OS exist, and new versions will be released in the future. In general, each version of the PlanktoScope OS will be compatible with all previous officially-released versions of the PlanktoScope hardware (which are all versions listed in the [hardware changelog](../../reference/hardware/changelog.md) without the description of a "prototype"). The PlanktoScope documentation describes the latest stable release of the PlanktoScope OS, and you should always use the latest stable release on your PlanktoScopes. @@ -26,18 +22,6 @@ PlanktoScope OS versions are independent of hardware versions, and (starting in - v2024.1.0: this version will be the second release of the PlanktoScope OS in 2024. -### Hardware configurations - -Currently, each version of the PlanktoScope OS is provided as three SD card images which support the two different types of hardware configurations supported by the PlanktoScope software: - -- `adafruithat`: this configuration of the PlanktoScope OS is compatible with v2.1 of the PlanktoScope hardware, which uses the [Adafruit Stepper Motor HAT](https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi/overview). - -- `planktoscopehat`: this configuration of the PlanktoScope OS is compatible with all versions of the PlanktoScope hardware starting with hardware v2.3; those hardware versions use the [PlanktoScope HAT](../../reference/hardware/hat.md) instead of the Adafruit Stepper Motor HAT. This configuration requires you to select the hardware version of your PlanktoScope in the [post-installation configuration](config.md) process. - -- `fairscope-latest`: this configuration of the PlanktoScope OS is identical to the `planktoscopehat` configuration, except that this one sets the default settings to be for hardware version v2.6 so that you won't need to select the hardware version of your PlanktoScope in the post-installation configuration process. - -If you have a PlanktoScope from FairScope, you should probably use the `fairscope-latest` SD card image; otherwise, if you have a non-FairScope PlanktoScope with hardware version v2.3 or later, you should probably use the `planktoscopehat` SD card image; otherwise, if you have a v2.1 PlanktoScope, you should probably use an `adafruithat` SD card image. - ## Installation After you have chosen a PlanktoScope OS SD card image for the desired OS version and hardware configuration, you should follow our [standard installation](standard-install.md) guide in order to install that SD card image into your PlanktoScope. diff --git a/node-red/nodes/package-lock.json b/node-red/nodes/package-lock.json index a102459a2..2e357b51c 100644 --- a/node-red/nodes/package-lock.json +++ b/node-red/nodes/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "nodes", "dependencies": { "csv-parse": "^5.6.0", "mime": "^4.0.7" diff --git a/node-red/projects/adafruithat/flows.json b/node-red/projects/adafruithat/flows.json index b14a8e021..16dd3e19a 100644 --- a/node-red/projects/adafruithat/flows.json +++ b/node-red/projects/adafruithat/flows.json @@ -6924,7 +6924,9 @@ "x": 800, "y": 420, "wires": [ - [], + [ + "154753a6a39b04b8" + ], [], [] ] @@ -7158,6 +7160,26 @@ "y": 460, "wires": [] }, + { + "id": "154753a6a39b04b8", + "type": "exec", + "z": "9daf9e2b.019fc", + "command": "sudo systemctl restart nodered.service", + "addpay": false, + "append": "", + "useSpawn": "false", + "timer": "", + "winHide": false, + "oldrc": false, + "name": "Restart Node Red", + "x": 1070, + "y": 420, + "wires": [ + [], + [], + [] + ] + }, { "id": "ddcbbfa5.cd158", "type": "exec", @@ -8455,6 +8477,11 @@ "label": "", "value": "PlanktoScope v2.6", "type": "str" + }, + { + "label": "", + "value": "PlanktoScope v3.0", + "type": "str" } ], "payload": "", diff --git a/node-red/projects/planktoscopehat/flows.json b/node-red/projects/planktoscopehat/flows.json index ef49e2429..6e8dbffc3 100644 --- a/node-red/projects/planktoscopehat/flows.json +++ b/node-red/projects/planktoscopehat/flows.json @@ -156,6 +156,29 @@ "meta": {}, "color": "#DDAA99" }, + { + "id": "37fd90bb2f83eddc", + "type": "group", + "z": "1eaf21c8.f7a21e", + "style": { + "stroke": "#999999", + "stroke-opacity": "1", + "fill": "none", + "fill-opacity": "1", + "label": true, + "label-position": "nw", + "color": "#a4a4a4" + }, + "nodes": [ + "427c312.fc5e65", + "c00c6732b9f36adb", + "e1d81baf6ae9ac67" + ], + "x": 34, + "y": 19, + "w": 392, + "h": 142 + }, { "id": "3a6bb13f.c9703e", "type": "ui_tab", @@ -1548,6 +1571,11 @@ "passthru": false, "multiple": false, "options": [ + { + "label": "", + "value": "PlanktoScope v2.1", + "type": "str" + }, { "label": "", "value": "PlanktoScope v2.3", @@ -7183,7 +7211,9 @@ "x": 780, "y": 420, "wires": [ - [], + [ + "8cad7139d2a089d9" + ], [], [] ] @@ -7296,6 +7326,26 @@ "y": 460, "wires": [] }, + { + "id": "8cad7139d2a089d9", + "type": "exec", + "z": "9daf9e2b.019fc", + "command": "sudo systemctl restart nodered.service", + "addpay": false, + "append": "", + "useSpawn": "false", + "timer": "", + "winHide": false, + "oldrc": false, + "name": "Restart Node Red", + "x": 1030, + "y": 420, + "wires": [ + [], + [], + [] + ] + }, { "id": "3910d662.fa1f7a", "type": "exec", @@ -8206,8 +8256,8 @@ "randomUnits": "seconds", "drop": false, "outputs": 1, - "x": 1180, - "y": 380, + "x": 1160, + "y": 520, "wires": [ [ "e41870d7.300eb8" @@ -8220,8 +8270,8 @@ "z": "1eaf21c8.f7a21e", "name": "", "env": [], - "x": 1220, - "y": 420, + "x": 1200, + "y": 560, "wires": [] }, { @@ -8243,8 +8293,8 @@ "from": "", "to": "", "reg": false, - "x": 670, - "y": 400, + "x": 650, + "y": 540, "wires": [ [ "ee58b91c.396108" @@ -8269,8 +8319,8 @@ "sendOnBlur": true, "className": "", "topicType": "str", - "x": 940, - "y": 400, + "x": 920, + "y": 540, "wires": [ [ "2068e7f.f4efb18", @@ -8344,8 +8394,8 @@ "topic": "acq_instrument", "topicType": "str", "className": "", - "x": 670, - "y": 160, + "x": 650, + "y": 300, "wires": [ [ "08d177136bd18281", @@ -8359,8 +8409,8 @@ "z": "1eaf21c8.f7a21e", "name": "", "env": [], - "x": 510, - "y": 300, + "x": 490, + "y": 440, "wires": [ [] ] @@ -8376,8 +8426,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 350, - "y": 300, + "x": 330, + "y": 440, "wires": [ [ "1cfadc66.3cde8c" @@ -8388,10 +8438,11 @@ "id": "427c312.fc5e65", "type": "subflow:1c24ad9c.bebec2", "z": "1eaf21c8.f7a21e", + "g": "37fd90bb2f83eddc", "name": "", "env": [], - "x": 170, - "y": 140, + "x": 110, + "y": 60, "wires": [ [ "c00c6732b9f36adb" @@ -8417,8 +8468,8 @@ "from": "", "to": "", "reg": false, - "x": 670, - "y": 480, + "x": 650, + "y": 620, "wires": [ [ "244ca5dd62df2bcd" @@ -8443,8 +8494,8 @@ "sendOnBlur": true, "className": "", "topicType": "str", - "x": 940, - "y": 480, + "x": 920, + "y": 620, "wires": [ [ "8e3b3d3c.955148", @@ -8463,8 +8514,8 @@ "initialize": "", "finalize": "", "libs": [], - "x": 1220, - "y": 480, + "x": 1200, + "y": 620, "wires": [ [ "5d5ad36d2c50dcc2" @@ -8525,8 +8576,8 @@ "payload": "", "topic": "acq_fnumber_objective", "topicType": "str", - "x": 930, - "y": 520, + "x": 910, + "y": 660, "wires": [ [ "a6983d3232b570a7", @@ -8553,8 +8604,8 @@ "from": "", "to": "", "reg": false, - "x": 1260, - "y": 520, + "x": 1240, + "y": 660, "wires": [ [ "5d5ad36d2c50dcc2" @@ -8587,8 +8638,8 @@ "from": "", "to": "", "reg": false, - "x": 680, - "y": 520, + "x": 660, + "y": 660, "wires": [ [ "6146ba22df928516" @@ -8610,8 +8661,8 @@ "className": "", "topic": "Resetting hardware configuration to version-specific default", "name": "", - "x": 370, - "y": 260, + "x": 350, + "y": 400, "wires": [] }, { @@ -8633,8 +8684,8 @@ "from": "", "to": "", "reg": false, - "x": 410, - "y": 220, + "x": 390, + "y": 360, "wires": [ [ "e3ba6ac89221b17b" @@ -8653,8 +8704,8 @@ "winHide": false, "oldrc": false, "name": "Copy default hardware config", - "x": 700, - "y": 220, + "x": 680, + "y": 360, "wires": [ [ "97e582080deae888" @@ -8680,8 +8731,8 @@ "drop": false, "allowrate": false, "outputs": 1, - "x": 930, - "y": 220, + "x": 910, + "y": 360, "wires": [ [ "3973b999ee7b3b1d" @@ -8700,8 +8751,8 @@ "5984b086eddc9311", "a2f2a4c7cbae4446" ], - "x": 1095, - "y": 220, + "x": 1075, + "y": 360, "wires": [] }, { @@ -8709,8 +8760,8 @@ "type": "subflow:b7861ce703215a01", "z": "1eaf21c8.f7a21e", "name": "", - "x": 380, - "y": 440, + "x": 360, + "y": 580, "wires": [ [ "54ba7f16.709ad8", @@ -8742,6 +8793,7 @@ "id": "c00c6732b9f36adb", "type": "change", "z": "1eaf21c8.f7a21e", + "g": "37fd90bb2f83eddc", "name": "Get acq_instrument", "rules": [ { @@ -8764,8 +8816,8 @@ "from": "", "to": "", "reg": false, - "x": 370, - "y": 140, + "x": 310, + "y": 60, "wires": [ [ "a7e5c7f4.644678", @@ -8781,8 +8833,8 @@ "links": [ "3973b999ee7b3b1d" ], - "x": 205, - "y": 420, + "x": 185, + "y": 560, "wires": [ [ "3bcaf757cbc77fbe" @@ -8798,8 +8850,8 @@ "08d177136bd18281", "9f34e4a2f33c4022" ], - "x": 205, - "y": 260, + "x": 185, + "y": 400, "wires": [ [ "68703ef63da2f081", @@ -8818,8 +8870,8 @@ "links": [ "cb9009e8a49e93cc" ], - "x": 875, - "y": 160, + "x": 855, + "y": 300, "wires": [] }, { @@ -8834,5 +8886,48 @@ "x": 875, "y": 120, "wires": [] + }, + { + "id": "e1d81baf6ae9ac67", + "type": "catch", + "z": "1eaf21c8.f7a21e", + "g": "37fd90bb2f83eddc", + "name": "", + "scope": null, + "uncaught": false, + "x": 170, + "y": 120, + "wires": [ + [ + "d88e0266c746ea70" + ] + ] + }, + { + "id": "d88e0266c746ea70", + "type": "change", + "z": "1eaf21c8.f7a21e", + "name": "Set acq_instrument to null", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "null", + "tot": "json" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 410, + "y": 220, + "wires": [ + [ + "56dd3f82c45717f0" + ] + ] } -] +] \ No newline at end of file diff --git a/os/ci-record-version.sh b/os/ci-record-version.sh index 652a9f891..6f7379866 100755 --- a/os/ci-record-version.sh +++ b/os/ci-record-version.sh @@ -5,7 +5,6 @@ # REPO (the repo used for setup, e.g. github.com/PlanktoScope/PlanktoScope) # VERSION_QUERY (the version query, e.g. a commit hash) # QUERY_TYPE (eitiher branch, tag, or hash) -# HARDWARE (either none, adafruithat, or planktoscopehat) # VERSION_QUERY_DIR (the filesystem path of the git repo used for getting version info) # Utilities for user interaction @@ -99,7 +98,6 @@ main() { info "${BOLD}Repo${NO_COLOR}: ${GREEN}${pretty_repo}${NO_COLOR}" info "${BOLD}Version query${NO_COLOR}: ${GREEN}${VERSION_QUERY}${NO_COLOR}" info "${BOLD}Query type${NO_COLOR}: ${GREEN}${QUERY_TYPE}${NO_COLOR}" - info "${BOLD}Hardware${NO_COLOR}: ${GREEN}${HARDWARE}${NO_COLOR}" if [ -n "${VERBOSE-}" ]; then VERBOSE=v info "${BOLD}Tag prefix${NO_COLOR}: $(with_empty_placeholder "${TAG_PREFIX}")" @@ -160,7 +158,6 @@ main() { "repo" "${pretty_repo}" \ "version-query" "${VERSION_QUERY}" \ "query-type" "${QUERY_TYPE}" \ - "hardware" "${HARDWARE}" \ "tag-prefix" "${TAG_PREFIX}" \ "setup-entrypoint" "${SETUP_ENTRYPOINT}" \ | sudo tee --append "${installer_config_file}" > /dev/null @@ -183,8 +180,7 @@ main() { REPO="$1" VERSION_QUERY="$2" QUERY_TYPE="$3" -HARDWARE="$4" -VERSION_QUERY_DIR="$5" +VERSION_QUERY_DIR="$4" # Set default values for the command-line arguments if [ -z "${REPO-}" ]; then @@ -200,11 +196,6 @@ if [ -z "${QUERY_TYPE-}" ]; then error "QUERY_TYPE environment variable was not set!" exit 1 fi -DEFAULT_HARDWARE="planktoscopehat" -if [ -z "${HARDWARE-}" ]; then - error "HARDWARE environment variable was not set!" - exit 1 -fi DEFAULT_TAG_PREFIX="software/" if [ -z "${TAG_PREFIX-}" ]; then TAG_PREFIX="${DEFAULT_TAG_PREFIX}" diff --git a/os/cleanup.sh b/os/cleanup.sh index 7d44389f9..47bfe35e3 100755 --- a/os/cleanup.sh +++ b/os/cleanup.sh @@ -5,10 +5,6 @@ setup_scripts_root=$(dirname $(realpath $BASH_SOURCE)) -# Get command-line args - -hardware_type="$1" # should be either none, adafruithat, or planktoscopehat - # Set up pretty error printing red_fg=31 @@ -35,16 +31,12 @@ function panic { # Run sub-scripts -if [ $hardware_type = "none" ]; then - echo "Warning: skipping PlanktoScope-specific setup because hardware type was specified as: $hardware_type" +description="remove unnecessary artifacts from the PlanktoScope application environment" +report_starting "$description" +if $setup_scripts_root/planktoscope-app-env/cleanup.sh ; then + report_finished "$description" else - description="remove unnecessary artifacts from the PlanktoScope application environment" - report_starting "$description" - if $setup_scripts_root/planktoscope-app-env/cleanup.sh ; then - report_finished "$description" - else - panic "$description" - fi + panic "$description" fi description="remove unnecessary artifacts from the base operating system" diff --git a/os/planktoscope-app-env/node-red-frontend/install.sh b/os/planktoscope-app-env/node-red-frontend/install.sh index 56488084e..94b409c60 100755 --- a/os/planktoscope-app-env/node-red-frontend/install.sh +++ b/os/planktoscope-app-env/node-red-frontend/install.sh @@ -4,14 +4,6 @@ # Determine the base path for copied files config_files_root=$(dirname "$(realpath "$BASH_SOURCE")") -# Get command-line args -hardware_type="$1" # should be either adafruithat, planktoscopehat, or fairscope-latest -default_config="$hardware_type-latest" -if [ "$hardware_type" = "fairscope-latest" ]; then - hardware_type="planktoscopehat" - default_config="fairscope-latest" -fi - # Install dependencies # smbus is needed by some python3 nodes in the Node-RED dashboard for the Adafruit HAT. # Since the Node-RED systemd service runs as the pi user by default (and we don't override that @@ -38,9 +30,6 @@ sudo cp $config_files_root/30-override.conf /etc/systemd/system/nodered.service. sudo systemctl enable nodered.service rm -rf /home/pi/.node-red -cp "$HOME/PlanktoScope/default-configs/$default_config.config.json" \ - "$HOME"/PlanktoScope/config.json - # Configure node-red npm --prefix "$HOME/PlanktoScope/node-red/nodes" install --omit=dev npm --prefix "$HOME/PlanktoScope/node-red" install --omit=dev diff --git a/os/planktoscope-app-env/python-hardware-controller/install.sh b/os/planktoscope-app-env/python-hardware-controller/install.sh index 923fd5880..6bdad71a5 100755 --- a/os/planktoscope-app-env/python-hardware-controller/install.sh +++ b/os/planktoscope-app-env/python-hardware-controller/install.sh @@ -6,16 +6,6 @@ config_files_root="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" distro_setup_files_root="$(dirname "$(dirname "$config_files_root")")" -# Get command-line args -hardware_type="$1" # should be either adafruithat, planktoscopehat, or fairscope-latest -default_config="$hardware_type-latest" -case "$hardware_type" in -"fairscope-latest") - hardware_type="planktoscopehat" - default_config="fairscope-latest" - ;; -esac - ## Install basic tooling sudo -E apt-get install -y -o Dpkg::Progress-Fancy=0 \ git python3-pip python3-venv pipx @@ -37,8 +27,3 @@ poetry --directory "$HOME/PlanktoScope/controller" install \ file="/etc/systemd/system/planktoscope-org.controller.service" sudo cp "$config_files_root$file" "$file" sudo systemctl enable "planktoscope-org.controller.service" - -# Select the enabled hardware controller -mkdir -p "$HOME/PlanktoScope" -cp "$HOME/PlanktoScope/default-configs/$default_config.hardware.json" \ - "$HOME/PlanktoScope/hardware.json" diff --git a/os/planktoscope-app-env/setup.sh b/os/planktoscope-app-env/setup.sh index fe2cf1c4e..e5eb084ac 100755 --- a/os/planktoscope-app-env/setup.sh +++ b/os/planktoscope-app-env/setup.sh @@ -9,10 +9,6 @@ build_scripts_root=$(dirname "$(realpath "$BASH_SOURCE")") -# Get command-line args - -hardware_type="$1" # should be either adafruithat, planktoscopehat, fairscope-latest - # Set up pretty error printing red_fg=31 @@ -47,7 +43,7 @@ fi description="set up Node-RED frontend" report_starting "$description" -if "$build_scripts_root/node-red-frontend/install.sh" "$hardware_type"; then +if "$build_scripts_root/node-red-frontend/install.sh"; then report_finished "$description" else panic "$description" @@ -55,7 +51,7 @@ fi description="set up Python hardware controller" report_starting "$description" -if "$build_scripts_root/python-hardware-controller/install.sh" "$hardware_type"; then +if "$build_scripts_root/python-hardware-controller/install.sh"; then report_finished "$description" else panic "$description" diff --git a/os/setup.sh b/os/setup.sh index 7303c4931..a1b0c960f 100755 --- a/os/setup.sh +++ b/os/setup.sh @@ -9,10 +9,6 @@ setup_scripts_root=$(dirname "$(realpath "$BASH_SOURCE")") -# Get command-line args - -hardware_type="$1" # should be either none, adafruithat, planktoscopehat, or fairscope-latest - # Set up pretty error printing red_fg=31 @@ -50,17 +46,13 @@ else panic "$description" fi -if [ "$hardware_type" = "none" ]; then - echo "Warning: skipping PlanktoScope-specific setup because hardware type was specified as: $hardware_type" +description="set up PlanktoScope application environment" +report_starting "$description" +if "$setup_scripts_root"/planktoscope-app-env/setup.sh; then + report_finished "$description" + source "$setup_scripts_root"/planktoscope-app-env/export-env.sh else - description="set up PlanktoScope application environment" - report_starting "$description" - if "$setup_scripts_root"/planktoscope-app-env/setup.sh "$hardware_type"; then - report_finished "$description" - source "$setup_scripts_root"/planktoscope-app-env/export-env.sh - else - panic "$description" - fi + panic "$description" fi -"$setup_scripts_root"/cleanup.sh "$hardware_type" +"$setup_scripts_root"/cleanup.sh