diff --git a/PhotonVision/photon.sqlite b/PhotonVision/photon.sqlite new file mode 100644 index 0000000..9e69319 Binary files /dev/null and b/PhotonVision/photon.sqlite differ diff --git a/PhotonVision/readme.md b/PhotonVision/readme.md index 965bf5f..1d5375d 100644 --- a/PhotonVision/readme.md +++ b/PhotonVision/readme.md @@ -4,21 +4,31 @@ # Getting Started +Download the latest [preconfigured SnakeEyes Image](https://github.com/PlayingWithFusion/SnakeEyesDocs/releases). + +Flash it onto an SD card [using the same process as recommended by PhotonVision](https://docs.photonvision.org/en/latest/docs/getting-started/installation/sw_install/raspberry-pi.html) + +The reset of the [PhotonVision docs](https://docs.photonvision.org/en/latest/index.html) should apply as normal. + +# Technical Details + +The only modification to PhotonVision required to use SnakeEyes is to ensure the [`hardwareConfig.json`](hardwareConfig.json) file is updated to enable dimmable LED support on pin 13. + +In 2024, PhotonVision migrated to using an SQLite database to store settings. Its contents is functionally the same as the `hardwareConfig.json` file. The SnakeEyes preconfigured image includes a small database with the LED's configured, but no cameras or pipelines configured. On PhotonVision's first launch, it will fill out the rest of the details for your model of Pi and camera config. + +# Legacy Update Process + +While still functional for the 2024 season, this method may be removed in the future. + First, download the hardware config file, `hardwareConfig.json`. [Click this link](https://raw.githubusercontent.com/PlayingWithFusion/SnakeEyesDocs/master/PhotonVision/hardwareConfig.json), then save the file. [Follow the instructions for installing PhotonVision.](https://docs.photonvision.org/en/latest/docs/getting-started/installation/coprocessor-image.html#raspberry-pi-installation) Go to `http://photonvision.local:5800/settings.html`, select Import Settings, and upload `hardwareConfig.json`. -All the reset of the [PhotonVision docs](https://docs.photonvision.org/en/latest/index.html) should apply as normal. - Successful configuration should allow you to see and control the LED brightness from the PhotonVision Settings page: ![hardware config](/img/pv_hwcfg.png) ![LED slider](/img/pv_leds.png) -# Technical Details - -The only modification to PhotonVision required to use SnakeEyes is to ensure the [`hardwareConfig.json`](hardwareConfig.json) file is updated to enable dimmable LED support on pin 13. - diff --git a/generatePiImage.sh b/generatePiImage.sh index 8193ec1..86ee1d7 100644 --- a/generatePiImage.sh +++ b/generatePiImage.sh @@ -20,7 +20,7 @@ curl -v -sk https://api.github.com/repos/photonvision/photon-pi-gen/releases/tag IMG_FILE_NAME=$(realpath $(ls | grep image_*.xz)) # Config files should be in this repo -HW_CFG_FILE_NAME=$(realpath $(find PhotonVision -name hardwareConfig.json)) +HW_CFG_FILE_NAME=$(realpath $(find PhotonVision -name photon.sqlite)) # Unzip and mount the image to be updated echo "Unzipping and mounting pi image..." @@ -59,10 +59,11 @@ popd # Copy in custom hardware configuration sudo mkdir photonvision_config cd photonvision_config -sudo cp ${HW_CFG_FILE_NAME} hardwareConfig.json +sudo cp ${HW_CFG_FILE_NAME} photon.sqlite # Update hardware configuration in place to indicate what release this was -sudo sed -i 's/VENDOR_RELEASE/'"${VENDOR_RELEASE}"'/g' hardwareConfig.json +# TODO - I can't sql yet +# sudo sed -i 's/VENDOR_RELEASE/'"${VENDOR_RELEASE}"'/g' hardwareConfig.json # Cleanup echo "Re-zipping updated image..."