-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Bug report template to reduce asking for additional details
- Loading branch information
1 parent
2ebeece
commit de02991
Showing
14 changed files
with
501 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: 🐞 Bug Report | ||
description: Create a bug report to help us improve | ||
labels: | ||
- bug | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: >- | ||
Thanks! for using the installer scripts. Now that you have encountered a | ||
bug... you can file a report for it. | ||
- type: textarea | ||
id: script | ||
attributes: | ||
label: Script Command | ||
description: >- | ||
Include the exact command you're running with any parameters. There are quite | ||
a handful of scripts and knowing which one is helpful. :) | ||
placeholder: sudo python3 adafruit-pitft.py --display=28r --rotation=90 --install-type=console | ||
render: shell | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: os | ||
attributes: | ||
label: Operating System | ||
description: Which OS was the script running under? Include details such as if it | ||
was 32 or 64-bit, Whether it was the Lite of Full Desktop version. If it's on an older or newer | ||
kernel, include that as well. | ||
placeholder: | | ||
64-bit Raspberry Pi OS Lite with Bullseye | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: hardware | ||
attributes: | ||
label: Hardware | ||
description: This is the board or computer you are running the script on. | ||
placeholder: | | ||
Raspberry Pi 4B | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: behavior | ||
attributes: | ||
label: Behavior | ||
description: What happens when you run the script above? Include error messages (if any). | ||
placeholder: | | ||
An error occurs at line 459 with this message... | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Optionally, describe the bug in more detail. | ||
placeholder: | | ||
- I selected options 1, then 3, then 4... | ||
- Only happens when... | ||
- might be related to #123... | ||
- type: textarea | ||
id: more-info | ||
attributes: | ||
label: Additional information | ||
description: >- | ||
Optionally, add any other information like hardware connection, scope | ||
output etc. If you have already done some debugging, mention it here. | ||
placeholder: Removing [this](url) line resolves the issue. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
contact_links: | ||
- name: 🔗 Adafruit Forum | ||
url: https://forums.adafruit.com/ | ||
about: Official Adafruit technical support forum. Good for getting help on getting a project working. | ||
- name: 🔗 Adafruit Discord | ||
url: https://adafru.it/discord | ||
about: Unofficial chat with many helpful folks and normally prompt replies. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: 🚀 Feature Request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: 'enhancement' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- If you have an idea for any new features and enhancements to any of our scripts 🚀 | ||
and would love ❤ to see what ideas you have for us... 🙂 --> |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
""" | ||
Adafruit Pi Touch Cam Setup Script | ||
(C) Adafruit Industries, Creative Commons 3.0 - Attribution Share Alike | ||
Converted to Python by Melissa LeBlanc-Williams for Adafruit Industries | ||
Note: Currently Untested | ||
""" | ||
|
||
try: | ||
from adafruit_shell import Shell | ||
except ImportError: | ||
raise RuntimeError("The library 'adafruit_shell' was not found. To install, try typing: sudo pip3 install adafruit-python-shell") | ||
import os | ||
|
||
shell = Shell() | ||
shell.group="Retrogame" | ||
|
||
def main(): | ||
shell.clear() | ||
print("""This script will install and/or modify | ||
packages needed for the Adafruit Pi | ||
Camera project. It requires that the | ||
adafruit-pitft.sh installer script (for | ||
PiTFT display support) was run first. | ||
Operations performed include: | ||
- In /boot/config.txt, enable camera | ||
- apt-get update | ||
- Install Python libraries: | ||
picamera, pygame, PIL | ||
- Downgrade SDL library for pygame | ||
touch compatibility | ||
- Download Dropbox Updater and | ||
Adafruit Pi Cam software | ||
Run time 5+ minutes. Reboot required. | ||
""") | ||
|
||
if not shell.prompt("CONTINUE?", default='n'): | ||
print("Canceled.") | ||
shell.exit() | ||
print("Continuing...") | ||
|
||
|
||
if shell.grep("dtoverlay=pitft", "/boot/config.txt"): | ||
shell.bail("PiTFT overlay not in /boot/config.txt.\n" | ||
"Download & run adafruit-pitft.py first.\n" | ||
"Canceling.") | ||
|
||
print("Configuring camera + PiTFT settings...") | ||
|
||
# Set PiTFT speed to 80 MHz, 60 Hz | ||
shell.pattern_replace("/boot/config.txt", "speed=.*,fps=.*", "speed=80000000,fps=60") | ||
|
||
# Check if Pi camera is enabled. If not, add it... | ||
shell.reconfig("/boot/config.txt", "^start_x=.*", "start_x=1") | ||
|
||
# gpu_mem must be >= 128 MB for camera to work | ||
result = shell.pattern_search("/boot/config.txt", "^gpu_mem=", return_match=True) | ||
if not result: | ||
# gpu_mem isn't set. Add to config | ||
shell.write_text_file("/boot/config.txt", "\ngpu_mem=128", append=True) | ||
elif result.group(1) < 128: | ||
# gpu_mem present but too small; increase to 128MB | ||
shell.reconfig("/boot/config.txt", "^gpu_mem=.*", "gpu_mem=128") | ||
|
||
print("Installing prerequisite packages...") | ||
|
||
# Enable Wheezy package sources (for SDL downgrade) | ||
shell.write_text_file("/etc/apt/sources.list.d/wheezy.list", "deb http://archive.raspbian.org/raspbian wheezy main\n", append=True) | ||
|
||
# Set 'stable' as default package source (current OS) | ||
shell.write_text_file("/etc/apt/apt.conf.d/10defaultRelease", "APT::Default-release \"stable\";\n", append=True) | ||
|
||
# Set priority for libsdl from Wheezy higher than current package | ||
shell.write_text_file("/etc/apt/preferences.d/libsdl", ( | ||
"Package: libsdl1.2debian\n" | ||
"Pin: release n=stretch\n" | ||
"Pin-Priority: -10\n" | ||
"Pin: release n=jessie\n" | ||
"Pin-Priority: -10\n" | ||
"Package: libsdl1.2debian\n" | ||
"Pin: release n=wheezy\n" | ||
"Pin-Priority:900\n" | ||
)) | ||
|
||
# Update the APT package index files, install Python libraries | ||
print("Updating System Packages") | ||
if not shell.run_command("sudo apt-get update"): | ||
shell.bail("Apt failed to update indexes!") | ||
print("Installing packages...") | ||
if not shell.run_command("sudo apt-get -y --force-yes install python-picamera python-pygame python-imaging"): | ||
shell.bail("Apt failed to install software!") | ||
|
||
print("Downgrading SDL library...") | ||
|
||
if not shell.run_command("apt-get -y --force-yes install libsdl1.2debian/wheezy"): | ||
shell.bail("Apt failed to downgrade SDL library!") | ||
|
||
print("Downloading Dropbox uploader and") | ||
print("Adafruit Pi Cam to home directory...") | ||
|
||
shell.chdir("~pi") | ||
shell.run_command("wget https://github.com/andreafabrizi/Dropbox-Uploader/archive/master.zip") | ||
shell.run_command("unzip master.zip") | ||
shell.remove("master.zip") | ||
shell.move("Dropbox-Uploader-master", "Dropbox-Uploader") | ||
|
||
shell.run_command("wget https://github.com/adafruit/adafruit-pi-cam/archive/master.zip") | ||
shell.run_command("unzip master.zip") | ||
shell.remove("master.zip") | ||
shell.chown("Dropbox-Uploader", "pi", recursive=True) | ||
shell.chown("adafruit-pi-cam-master", "pi", recursive=True) | ||
|
||
# Add lines to /etc/rc.local (commented out by default): | ||
shell.pattern_replace("/etc/rc.local", "^exit 0", "# Enable this line to run camera at startup:\n# cd /home/pi/adafruit-pi-cam-master ; sudo python cam.py\n\nexit 0") | ||
|
||
# Prompt to reboot! | ||
print("\nCamera and PiTFT settings won't take") | ||
print("effect until next boot.") | ||
shell.prompt_reboot() | ||
|
||
# Main function | ||
if __name__ == "__main__": | ||
shell.require_root() | ||
main() |
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
Oops, something went wrong.