Skip to content

Commit

Permalink
Add Bug report template to reduce asking for additional details
Browse files Browse the repository at this point in the history
  • Loading branch information
makermelissa committed Nov 30, 2022
1 parent 2ebeece commit de02991
Show file tree
Hide file tree
Showing 14 changed files with 501 additions and 7 deletions.
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
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.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
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.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
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... 🙂 -->
8 changes: 5 additions & 3 deletions adafruit-pitft-mipi.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
"""
Adafruit PiTFT Installer Script
Adafruit PiTFT MIPI Display Installer Script
(C) Adafruit Industries, Creative Commons 3.0 - Attribution Share Alike
Written by Melissa LeBlanc-Williams for Adafruit Industries
"""

import time
import os
try:
import click
except ImportError:
raise RuntimeError("The library 'Click' was not found. To install, try typing: sudo pip3 install Click")
raise RuntimeError("The library 'Click' was not found. To install, try typing: sudo pip3 install --upgrade click")
try:
from adafruit_shell import Shell
except ImportError:
Expand Down Expand Up @@ -352,7 +354,7 @@ def update_pointercal():

def install_mipi():
global mipi_data

if "mipi_data" in pitft_config:
mipi_data.update(pitft_config['mipi_data'])
if not compile_display_fw():
Expand Down
2 changes: 2 additions & 0 deletions adafruit-pitft.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""
Adafruit PiTFT Installer Script
(C) Adafruit Industries, Creative Commons 3.0 - Attribution Share Alike
Written in Python by Melissa LeBlanc-Williams for Adafruit Industries
"""

import time
Expand Down
7 changes: 7 additions & 0 deletions adafruit_fanservice.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""
Adafruit Raspberry Pi Fan Service Setup Script
(C) Adafruit Industries, Creative Commons 3.0 - Attribution Share Alike
Converted to Python by Melissa LeBlanc-Williams for Adafruit Industries
"""

import os

try:
Expand Down
9 changes: 8 additions & 1 deletion joy-bonnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""
Adafruit Raspberry Pi Joy Bonnet Setup Script
(C) Adafruit Industries, Creative Commons 3.0 - Attribution Share Alike
Converted to Python by Melissa LeBlanc-Williams for Adafruit Industries
"""

try:
from adafruit_shell import Shell
except ImportError:
Expand Down Expand Up @@ -107,7 +114,7 @@ def main():
Settings take effect on next boot.
""")
shell.prompt_reboot()

# Main function
if __name__ == "__main__":
shell.require_root()
Expand Down
2 changes: 1 addition & 1 deletion libgpiod.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
try:
import click
except ImportError:
raise RuntimeError("The library 'Click' was not found. To install, try typing: sudo pip3 install Click==7.0")
raise RuntimeError("The library 'Click' was not found. To install, try typing: sudo pip3 install --upgrade click")
try:
from adafruit_shell import Shell
except ImportError:
Expand Down
127 changes: 127 additions & 0 deletions pi-touch-cam.py
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()
2 changes: 2 additions & 0 deletions raspi-blinka.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""
Adafruit Raspberry Pi Blinka Setup Script
(C) Adafruit Industries, Creative Commons 3.0 - Attribution Share Alike
Written by Melissa LeBlanc-Williams for Adafruit Industries
"""

try:
Expand Down
3 changes: 1 addition & 2 deletions raspi-spi-reassign.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
try:
import click
except ImportError:
raise RuntimeError("The library 'Click' was not found. To install, try typing: sudo pip3 install Click")
raise RuntimeError("The library 'Click' was not found. To install, try typing: sudo pip3 install --upgrade click")
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="SPI Reassign"
Expand Down
Loading

0 comments on commit de02991

Please sign in to comment.