-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rid of uStreamer capture device Ansible vars (#1554)
Resolves #1501 Resolves #1267 This change gets rid of the `ustreamer_capture_device` Ansible var (TC358743 vs. HDMI to USB) and the config file where we stored the result. Instead, we'll track capture device based on whether `dtoverlay=tc358743` appears in `/boot/config.txt`. In theory, relying on `/boot/config.txt` will cause incorrect behavior if a user enables the TC358743 overlay even though they're using HDMI to USB. That's unlikely to happen in practice, so I think it's worth the tradeoff, as this assumption eliminates a **lot** of complexity. As a side-effect of eliminating `ustreamer_capture_device`, we can remove a lot of cruft from the bundle install file. ### Background We originally added the "uStreamer settings file" because we needed a way to keep track of whether the device was using a HDMI to USB dongle (like a DIY TinyPilot) or a TC358743-based HDMI to CSI chip (like a Voyager). At the time of the original implementation, the uStreamer Ansible role was independent of TinyPilot, so it couldn't write to TinyPilot settings. So, we created a "uStreamer settings file" at `/home/ustreamer.config.yml` that would essentially persist the setting for whether the system was TC358743-based so that the initiator of the Ansible role wouldn't have to re-specify it every time. ### Implementation notes * I'm broadening the scope a little bit by tackling #1267 at the same time, but I feel like the major cost of both those issues is the testing to make sure everything is correct, so I might as well fix and test both at the same time. * With this change, the Ansible role no longer adds the `dtoverlay=tc358743` line to `/boot/config.txt` because it's now the user's responsibility to do that in advance if they've got a DIY TinyPilot with an HDMI to CSI chip. For Pro, Packer will take responsibility for adding that line. * The Ansible role still adds the `dtoverlay=tc358743-audio` line. * `bundler/bundle/install` used to be responsible for creating `/home/tinypilot/settings.yml` if it didn't already exist, but this change moves that responsibility to `tinypilot.postinst`. * I'm deliberately leaving a `debug` task in the Ansible role because I think it's helpful to have the output in logs. * This change drops the `ustreamer_persistent` var and instead always launches ustreamer with the `--persistent` flag. The setting used to be unofficially configurable via settings, but we're dropping that configurability (see https://github.com/tiny-pilot/tinypilot-pro/issues/972). ### Documentation impact After we merge this, we need to update our [wiki](https://github.com/tiny-pilot/tinypilot/wiki/Installation-Options#example-tc358743-hdmi-to-csi-capture-chip) with the new TC358743 install method, which should simplify down to: ```bash if ! grep --silent '^dtoverlay=tc358743$' /boot/config.txt; then echo 'dtoverlay=tc358743' | sudo tee --append /boot/config.txt fi ``` Corresponding changes in Pro: https://github.com/tiny-pilot/tinypilot-pro/compare/no-capture-pro?expand=1 (difference is just Packer config) ### Manual tests I performed the following manual tests to verify we're not breaking functionality. - [x] Verify TinyPilot Community install with HDMI to USB dongle - [x] Verify TinyPilot Community install with HDMI to CSI bridge - [x] Verify TinyPilot Pro Hobbyist image - [x] Verify TinyPilot Pro Voyager image - [x] Verify installing TinyPilot Pro bundle on top of TinyPilot Pro 2.6.0 Voyager image - [x] Verify installing TinyPilot Pro bundle on top of TinyPilot Pro 2.6.0 Hobbyist image <a data-ca-tag href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1554"><img src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review on CodeApprove" /></a>
- Loading branch information
Showing
13 changed files
with
88 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.