Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,20 @@ The number of times that SD boot will be retried after failure before moving to

Default: `0`

[[SD_OVERCURRENT_CHECK]]
==== `SD_OVERCURRENT_CHECK`

Raspberry Pi 4, Raspberry Pi 5 and Raspberry Pi 500 only.

Before booting, the bootloader checks the SD power switch overcurrent signal. The overcurrent signal occurs if the SD card is damaged and has a short circuit which will cause it to get hot.

If an over-current condition is detected, the bootloader switches off power to the SD card and waits five seconds before probing the SD card again. This error is displayed on the diagnostic screen, the UART and the activity LED (1 long, 2 short flashes).

The overcurrent check can be switched from an error to a non-blocking warning by setting `SD_OVERCURRENT_CHECK=0` in the bootloader config.

Default: `1`


[[SD_QUIRKS]]
==== `SD_QUIRKS`

Expand Down
4 changes: 2 additions & 2 deletions documentation/asciidoc/services/connect/troubleshooting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ If you have repeated issues trying to run Connect's required services, run the f
[source,console]
----
$ systemctl --user status rpi-connect-wayvnc.service rpi-connect-wayvnc-watcher.path
$ journalctl --user --follow --unit rpi-connect-wayvnc.service --unit rpi-connect-wayvnc-watcher.path
$ journalctl --follow --user-unit rpi-connect-wayvnc.service --user-unit rpi-connect-wayvnc-watcher.path
----

If the service fails to start or doesn't exist, ensure that your environment meets the following criteria:
Expand Down Expand Up @@ -223,5 +223,5 @@ To view logs for the Connect service and its dedicated WayVNC server, run the fo

[source,console]
----
$ journalctl --user --follow --unit rpi-connect --unit rpi-connect-wayvnc
$ journalctl --follow --user-unit rpi-connect --user-unit rpi-connect-wayvnc
----
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/images/placeholder/placeholder_circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/images/placeholder/placeholder_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/images/placeholder/placeholder_triangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion documentation/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
"description": "Supports Arm Serial Wire Debug (SWD), and acts as a UART bridge",
"image": "full-sized/Debug-Probe.png",
"subpath": "debug-probe.adoc"
},
},
{
"title": "MicroPython",
"description": "Getting started with MicroPython",
Expand Down
8 changes: 7 additions & 1 deletion jekyll-assets/_includes/header.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions jekyll-assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
--rptl-header-burger-stroke-color: var(--subtle);
--rptl-header-subnav-background-color: #f7f8fa;
--rptl-header-logo-text-fill: var(--textcolor);
--rptl-header-logo-leaf-fill: #46af4b;
--rptl-header-logo-berry-fill: var(--brand-colour);
--rptl-cookiebanner-background-color: var(--less-subtle);
--rptl-cookiebanner-text-color: var(--bg);
--rptl-footer-background-color: #f5f6f9;
Expand Down Expand Up @@ -67,6 +69,8 @@
--rptl-header-burger-stroke-color: var(--textcolor);
--rptl-header-subnav-background-color: var(--near-bg);
--rptl-header-logo-text-fill: var(--textcolor);
--rptl-header-logo-leaf-fill: var(--bg);
--rptl-header-logo-berry-fill: var(--bg);
--rptl-cookiebanner-background-color: var(--code-bg-colour);
--rptl-cookiebanner-text-color: var(--textcolor);
--rptl-footer-background-color: #13131B;
Expand Down
108 changes: 108 additions & 0 deletions scripts/add_new_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/usr/bin/env python3

# Example usage:
# scripts/add_new_page.py "My new HAT"
# will create documentation/asciidoc/accessories/my-new-hat.adoc and documentation/asciidoc/accessories/my-new-hat/about.adoc
#
# scripts/add_new_page.py -b new-hat "My new HAT"
# will create documentation/asciidoc/accessories/new-hat.adoc and documentation/asciidoc/accessories/new-hat/about.adoc
#
# scripts/add_new_page.py -b new-hat -s intro "My new HAT"
# will create documentation/asciidoc/accessories/new-hat.adoc and documentation/asciidoc/accessories/new-hat/intro.adoc
#
# scripts/add_new_page.py -c services "Some extra Service"
# will create documentation/asciidoc/services/some-extra-service.adoc and documentation/asciidoc/services/some-extra-service/about.adoc
#
# scripts/add_new_page.py -c services -b id -s signing_up "Raspberry Pi ID"
# will create documentation/asciidoc/services/id.adoc and documentation/asciidoc/services/id/signing_up.adoc

import argparse
import json
import os
import random
import re
import shutil
import sys

DOCUMENTATION_DIR = 'documentation'
INDEX_JSON = os.path.join(DOCUMENTATION_DIR, 'index.json')
IMAGES_DIR = os.path.join(DOCUMENTATION_DIR, 'images')
PLACEHOLDER_IMAGES_DIR = os.path.join(IMAGES_DIR, 'placeholder')
PLACEHOLDER_SHAPES = ('circle', 'square', 'triangle')

if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('name')
parser.add_argument('-c', '--category', default='accessories')
parser.add_argument('-b', '--basename')
parser.add_argument('-s', '--subfile', default='about')
args = parser.parse_args()
print(args)

name = args.name
category = args.category
basename = args.basename
if not basename:
basename = re.sub('\W', '-', name.lower())
subfile = f"{args.subfile}.adoc"

# Validate the category
valid_categories = []
with open(INDEX_JSON, 'r') as json_fh:
json_contents = json.load(json_fh)
for tab in json_contents["tabs"]:
if 'from_json' in tab:
continue
valid_categories.append(tab['path'])
if category not in valid_categories:
raise Exception(f"Invalid category {category}. Choose from {valid_categories}")
category_dir = os.path.join(DOCUMENTATION_DIR, 'asciidoc', category)
if not os.path.exists(category_dir):
raise Exception(f"{category_dir} doesn't exist")

# Check the new page hasn't already been added
new_dir = os.path.join(category_dir, basename)
if os.path.isdir(new_dir):
raise Exception(f"{new_dir} already exists")
new_file = f"{new_dir}.adoc"
if os.path.isfile(new_file):
raise Exception(f"{new_file} already exists")
new_subfile = os.path.join(new_dir, subfile)
if os.path.isfile(new_subfile):
raise Exception(f"{new_subfile} already exists")

print(f"Will create {new_file} and {new_subfile}")
# sys.exit(0)
# Create the template AsciiDoc documentation
os.mkdir(new_dir)
with open(new_file, 'w') as fh:
fh.write(f"include::{basename}/{subfile}[]\n")
with open(new_subfile, 'w') as fh:
fh.write(f"== About\n\nAll about {name} and why it's amazing")

# Add the placeholder images
shape = random.choice(PLACEHOLDER_SHAPES)
shutil.copyfile(os.path.join(PLACEHOLDER_IMAGES_DIR, f"placeholder_{shape}-SMALL.png"), os.path.join(IMAGES_DIR, f"{basename}-SMALL.png"))
shutil.copyfile(os.path.join(PLACEHOLDER_IMAGES_DIR, f"placeholder_{shape}.png"), os.path.join(IMAGES_DIR, 'full-sized', f"{basename}.png"))

# And finally update the JSON which ties everything together
with open(INDEX_JSON, 'r+') as json_fh:
json_contents = json.load(json_fh)
found = False
for tab in json_contents["tabs"]:
if tab['path'] == category:
found = True
tab["subitems"].append({
"title": name,
"description": f"Description of {name}",
"image": os.path.join('full-sized', f"{basename}.png"),
"subpath": f"{basename}.adoc",
})
break
if not found: # this shouldn't ever happen, as we already validated the category earlier
raise Exception(f"Couldn't find tab with path {category} in {INDEX_JSON}")
json_fh.seek(0)
json.dump(json_contents, json_fh, indent=4)

print(f"Done. Use 'git status' and 'git diff' to see what has changed, and then add more content to\n {new_subfile}")