Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation warning update #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions bin/Makerverse.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Makerverse
Comment=Makerverse UI (web browser)
Icon=/home/pi/makerverse/logo.png
Exec=/home/pi/makerverse/bin/kiosk
Terminal=false
Categories=Internet;
30 changes: 24 additions & 6 deletions bin/kiosk
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
#!/bin/bash
path=${1:-/}

# Figure out where the git checkout directory lives, if any:
if [[ -z "$MAKERVERSE_SRC_DIR" ]]; then
# Otherwise, the parent directory of this script should (hopefully) work.
MAKERVERSE_SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd)"
fi

fn="${MAKERVERSE_SRC_DIR}/kiosk.log"
echo "Launching Makerverse kiosk..." > $fn
printenv | grep "MAKERVERSE" >> $fn

MAKERVERSE_PROTOCOL="${MAKERVERSE_PROTOCOL:-http}"
MAKERVERSE_HOST="${MAKERVERSE_HOST:-localhost}"
MAKERVERSE_PORT="${MAKERVERSE_PORT:-8000}"
MAKERVERSE_KIOSK_SCALE="${MAKERVERSE_KIOSK_SCALE:-1.0}"
url="${MAKERVERSE_PROTOCOL}://${MAKERVERSE_HOST}:${MAKERVERSE_PORT}${path}"
MAKERVERSE_PATH="${MAKERVERSE_PATH:-/}"
url="${MAKERVERSE_PROTOCOL}://${MAKERVERSE_HOST}:${MAKERVERSE_PORT}${MAKERVERSE_PATH}"
flags=""

if [[ ! -z "$MAKERVERSE_SCALE" ]]; then
flags="${flags} --force-device-scale-factor=${MAKERVERSE_SCALE}"
fi

if [[ ! -z "$MAKERVERSE_KIOSK" ]]; then
flags="${flags} --noerrdialogs --disable-infobars --kiosk"
fi

while [[ ! $(curl -s $url) ]]; do
echo "Waiting for $url"
echo "Waiting for $url" >> $fn
sleep 1;
done

bash ${MAKERVERSE_SRC_DIR}/scripts/kiosk.sh "$url" \
-f "--noerrdialogs --disable-infobars --ignore-certificate-errors --force-device-scale-factor=${MAKERVERSE_KIOSK_SCALE}"
echo "Ready to launch: ${flags}" >> $fn

if [[ ! -z "${flags}" ]]; then
bash ${MAKERVERSE_SRC_DIR}/scripts/kiosk.sh "$url" -f "${flags}"
else
bash ${MAKERVERSE_SRC_DIR}/scripts/kiosk.sh "$url"
fi
6 changes: 4 additions & 2 deletions ci/raspbian-desktop.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
["mkdir", "$MOUNTPOINT/home/pi/makerverse/commands"],
["mkdir", "$MOUNTPOINT/home/pi/makerverse/events"],
["mkdir", "$MOUNTPOINT/home/pi/makerverse/widgets"],
["cp", "/build/docs/assets/logo.png", "$MOUNTPOINT/home/pi/makerverse/logo.png"],
["cp", "/build/bin/Makerverse.desktop", "$MOUNTPOINT/usr/share/applications/Makerverse.desktop"],
["cp", "/build/.makerverse.docker", "$MOUNTPOINT/home/pi/.makerverse"],
["cp", "/build/scripts/gpio.sh", "$MOUNTPOINT/home/pi/makerverse/commands/gpio.sh"],
["cp", "-r", "/build/bin", "$MOUNTPOINT/home/pi/makerverse/"],
Expand Down Expand Up @@ -86,8 +88,8 @@
"sudo usermod -aG docker pi",
"sudo systemctl enable docker",
"sudo systemctl start docker",
"cd /home/pi/makerverse && bash bin/build-service.sh install pi \"export MAKERVERSE_PORT=80\"",
"echo \"export MAKERVERSE_PORT=80\" >> /home/pi/.bashrc"
"echo \"MAKERVERSE_PORT=80\" >> /etc/environment",
"cd /home/pi/makerverse && bash bin/build-service.sh install pi \"export MAKERVERSE_PORT=80\""
]
}
]
Expand Down
1 change: 1 addition & 0 deletions ci/raspbian-lite.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"sudo usermod -aG docker pi",
"sudo systemctl enable docker",
"sudo systemctl start docker",
"echo \"MAKERVERSE_PORT=80\" >> /etc/environment",
"cd /home/pi/makerverse && bash bin/build-service.sh install pi \"export MAKERVERSE_PORT=80\""
]
}
Expand Down
2 changes: 1 addition & 1 deletion docs/features/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ nav_order: 4
## Creating an Event

- Go to Settings -> Events and press "+ Add"
- To run scripts, use a "system" trigger and follow the [commands](/features/commands/) instructions.
- To run scripts, use a "system" trigger and follow the [commands](/features/commands/) instructions. The event scripts reside in the events folder under the base makerverse folder and regardless of the makerverse folder name, the path to get to the event is ~/makerverse/events/scriptname.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: please use backticks to indicate code: ~/makerverse/events/scriptname.

- To run Gcode, use a "G-code" trigger and enter any gcode you wish.
16 changes: 11 additions & 5 deletions docs/installation/web-server/raspberry-pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ There are two download options in the [Latest Release](https://github.com/makerm

These are merely customized versions of [the official Raspberry Pi OS images of the same names](https://www.raspberrypi.org/downloads/raspberry-pi-os/) (Lite vs. Desktop). Once you have downloaded the appropriate release file, unzip it and flash the `.img` to your SD card with your preferred application (e.g., Balena Etcher).

_**Note**: the `lite` image means that there is no GUI! It is "command-line only" (headless), so everything will be text based (no desktop)._

Then, just plug the RPi in and power it up!

## Connecting to the RPi
Expand Down Expand Up @@ -79,22 +81,26 @@ However, this UI is not the default UI because it is much less full-featured (it

When running the `makerverse-raspberrypi-os-dekstop.**` (desktop version), you will need to follow on-screen instructions after the first boot to configure your Raspberry Pi. This image is based upon a standard Raspberry Pi OS Desktop installation, so please refer to the official documentation for any help.

You can open a web browser and navigate to Makerverse at `http://localhost`. Or, you can enable Kiosk mode...
You can find the Makerverse "application" in the "Other" section of the start menu. In fact, the "application" really just opens a web browser to `http://localhost`.

### Kiosk Mode

When running the "Desktop" variation, you can enable Kiosk mode:
When running the Desktop variation, you can enable "Kiosk" mode. This turn your Raspberry Pi into a dedicated Makerverse device.

_**Note**: kiosk mode causes Makerverse to run full-screen and effectively disable the Raspberry Pi desktop. It is best suited for scenarios where you only want to use Makerverse on the Raspberry Pi (single-purpose device). It also can fit more on the screen, and doesn't require a keyboard/mouse to use (e.g., touchscreen)._

To enable Kiosk mode, run the following command:

```
echo "@bash /home/pi/makerverse/bin/kiosk /" > /home/pi/.config/lxsession/LXDE-pi/autostart
echo "@bash /home/pi/makerverse/bin/kiosk" > /home/pi/.config/lxsession/LXDE-pi/autostart
```

Once configured, it will automatically launch Chromium in "Kiosk" mode during boot. This will load the Makerverse application in a full-screen web browser. Makerverse is still running as a Web Server in the background, so other clients can also simultaneously connect. In this mode, Chromium takes over the desktop, hiding all menus in order to maximize screen-space.
... and then reboot the Raspberry Pi. Once it has rebooted, you should notice that the normal desktop does not open. Instead, the screen stays black while Makerverse starts. Makerverse is still running as a Web Server in the background, so other clients can also simultaneously connect. In this mode, Chromium takes over the desktop, hiding all menus in order to maximize screen-space.

- If your keyboard/mouse are attached directly to the Pi, use the `Alt + F4` hotkey to close the full-screen web browser, and/or `Ctrl + Alt + T` to open a terminal.
- If you don't have an extra keyboard/mouse, just SSH and use `sudo raspi-config` to turn on the VNC in `Interfacing Options`. Then use an app like VNC Viewer to connect from your computer.

_**Note**: if your screen is smaller than 7" or so, you will likely want your Kiosk to use the Tablet UI specified above. To do so, edit the `/home/pi/.config/lxsession/LXDE-pi/autostart` file to become: `@bash /home/pi/makerverse/bin/kiosk /tablet`._
_**Note**: if your screen is smaller than 7" or so, you will likely want your Kiosk to use the Tablet UI specified above. To do so, use `sudo nano /etc/environment` to add the new line: `MAKERVERSE_PATH=/tablet`._

## Shared Directories

Expand Down
24 changes: 24 additions & 0 deletions docs/machines/cnc/grbl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: default
title: Grbl
grand_parent: Machines
parent: CNC
nav_order: 1
---

# Grbl

Grbl is an extremely common firmware/protocol option for CNC machines.

Many manufacturers simply ship their CNC machines with Grbl, as it is such a well-known open-source (free) piece of Arduino code. If you're not sure what controller your CNC machine uses, chances are pretty good it uses Grbl.

## Grbl Versions

Find all versions on the [Grbl releases page](https://github.com/gnea/grbl/releases).

- Major versions of Grbl are `1.1h`, `1.1g`, etc.
- Minor versions are designated by the date of the release (`20190825` was released on August 25th, 2019).

## Updating Grbl

Please see [the Github README for Grbl](https://github.com/gnea/grbl).
10 changes: 8 additions & 2 deletions docs/machines/cnc/maslow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: default
title: Maslow
grand_parent: Machines
parent: CNC
nav_order: 1
nav_order: 2
---

# Maslow
Expand All @@ -20,7 +20,13 @@ The Maslow requires calibration to correct "chain sag" (catenary effects).

### Before you Start

Do a **pre-flight check**.
!!! WARNING !!!

- If this is the *first* use of your maslow, before you do anything, reset the chains !!! Even if the sled is not exactly in the middle, to establish a baseline location, reset the chains. Once that is complete, the sled should respond to the shuttle commands to move so then you can avoid costly disaster or erratic behavior. As with all new equipment, please make power shutoff to the system accessible in case you must shut it off quickly. In the makerverse, the RESET button will cut power to the motors, so keep that in mind. After calibration, the sled will be properly positioned and allow future chain resets to occur with chain marks to reset back to the middle of the work piece.
Copy link
Contributor

@zaneclaes zaneclaes Oct 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you aware that this is done automatically during the calibration process? When you get to the Chains tab, Makerverse will perform a reset chains implicitly as you complete that flow.

If that's still a concern, I could make the New Machine? modal do this automatically, as well.

My thinking, here, is that this is not the sort of problem which should require documentation. Rather, this sort of problem should be solved by the software. If the user needs to find the docs in order to avoid shooting themselves in the foot, the software is deficient.


!!! WARNING !!!

First, do a **pre-flight check**.

Maslow frames are generally built from hand-cut, imprecise materials. Catching errors early will greatly improve the chances of an easy, successful calibration.

Expand Down
16 changes: 14 additions & 2 deletions scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ DOCKER_REPO="makerverse/core"

echo "Docker '$@' for $BUILD_PLATFORMS"

TAG2=""

if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
if [ "$1" = "build" ]; then
# Master branch has a deploy step. Others use the build as the deploy.
Expand All @@ -19,6 +21,7 @@ if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
TAG="prerelease"
else
TAG="latest"
TAG2="prerelease"
fi
else
if [ "$TRAVIS_BRANCH" = "master" ]; then
Expand All @@ -38,9 +41,18 @@ echo "Logged in to Docker."
# n.b., this ALWAYS pushes the resulting image. This is because the --load flag does not
# support multi-arch. https://github.com/docker/buildx/issues/59
if [[ ! -z "$CI_VERSION" ]]; then
docker buildx build --push "--platform=$BUILD_PLATFORMS" -t "$DOCKER_REPO:$TAG" -t "$DOCKER_REPO:v$CI_VERSION" .
if [[ -z "$TAG2" ]]; then
docker buildx build --push "--platform=$BUILD_PLATFORMS" -t "$DOCKER_REPO:$TAG" -t "$DOCKER_REPO:v$CI_VERSION" .
else
docker buildx build --push "--platform=$BUILD_PLATFORMS" -t "$DOCKER_REPO:$TAG" \
-t "$DOCKER_REPO:$TAG2" -t "$DOCKER_REPO:v$CI_VERSION" .
fi
else
docker buildx build --push "--platform=$BUILD_PLATFORMS" -t "$DOCKER_REPO:$TAG" .
if [[ -z "$TAG2" ]]; then
docker buildx build --push "--platform=$BUILD_PLATFORMS" -t "$DOCKER_REPO:$TAG" .
else
docker buildx build --push "--platform=$BUILD_PLATFORMS" -t "$DOCKER_REPO:$TAG" -t "$DOCKER_REPO:$TAG2" .
fi
fi

if [ $? -eq 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/kiosk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ assign_positional_args 1 "${_positionals[@]}"
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences

# Start chromium
cmd="/usr/bin/chromium-browser $_arg_chromium_flags --kiosk --app=$_arg_kiosk_url"
cmd="/usr/bin/chromium-browser $_arg_chromium_flags --app=$_arg_kiosk_url"
echo "Opening chromium: $cmd"
$cmd &

Expand Down
11 changes: 10 additions & 1 deletion src/app/widgets/Maslow/CalibrationModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,16 @@ class CalibrationModal extends PureComponent {
{curTab === 'welcome' && (
<div className={styles.tabFull}>
<h6>{i18n._('Welcome')}</h6>
If you have not tested your frame before, please run a pre-flight check.
!!! WARNING !!!
<br/>
-- DAMAGE MAY OCCUR --
<br/>
If this is the first use of your system and you have not yet tested sled movement please close this window and reset your chains.
Copy link
Contributor

@zaneclaes zaneclaes Oct 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? This screen already performs a Reset Chains before it ever attempts to move the sled (or, it should do so). It would be redundant to close the modal and do so yourself.

<br />
Please run a pre-flight check before attempting to calibrate.
Copy link
Contributor

@zaneclaes zaneclaes Oct 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a warning about this which you need to click "Okay" for before you can ever see this screen... try opening the calibration modal in version 1.1.2 and you'll see what I mean.

<br />
!!! WARNING !!!
<br />
<br />
For help with this (or any other step), see the Calibration Help at the bottom.
<br />
Expand Down