Skip to content

Commit

Permalink
SL1: The part of the project and related stuff refactoring
Browse files Browse the repository at this point in the history
- new warnings (PERPARTES_NOAVAIL_WARNING, MASK_NOAVAIL_WARNING, OBJECT_TRUNCATED_WARNING)
- new error (PRELOAD_FAILED)
- fix: remote_install.sh
- version bump
  • Loading branch information
tritol committed Sep 29, 2020
1 parent 79db524 commit 167d2cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions prusaerrors/sl1/codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class Sl1Codes(Codes):
),
False,
)
PRELOAD_FAILED = Code(PRINTER, Category.SYSTEM, 3, _("Image preloader did not finish successfully!"), False)
PROJECT_FAILED = Code(PRINTER, Category.SYSTEM, 4, None, False)
CONFIG_EXCEPTION = Code(PRINTER, Category.SYSTEM, 5, _("Failed to read configuration file"), False)
NOT_AVAILABLE_IN_STATE = Code(PRINTER, Category.SYSTEM, 6, None, False)
Expand Down Expand Up @@ -158,6 +159,9 @@ class Sl1Codes(Codes):
PRINTER_MODEL_MISMATCH_WARNING = Code(PRINTER, Category.WARNINGS, 5, None, False)
RESIN_NOT_ENOUGH_WARNING = Code(PRINTER, Category.WARNINGS, 6, None, False)
PROJECT_SETTINGS_MODIFIED_WARNING = Code(PRINTER, Category.WARNINGS, 7, None, False)
PERPARTES_NOAVAIL_WARNING = Code(PRINTER, Category.WARNINGS, 8, None, False)
MASK_NOAVAIL_WARNING = Code(PRINTER, Category.WARNINGS, 9, None, False)
OBJECT_TRUNCATED_WARNING = Code(PRINTER, Category.WARNINGS, 10, None, False)

@classmethod
def get(cls, code: str):
Expand Down
10 changes: 5 additions & 5 deletions remote_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ echo "Target is ${target}"
set -o xtrace

# Create temp root
tmp=$(mktemp --directory --tmpdir=/tmp/ sl1-errors.XXXX)
tmp=$(mktemp --directory --tmpdir=/tmp/ prusa_errors.XXXX)
echo "Local temp is ${tmp}"

echo "Running setup"
python3 setup.py sdist --dist-dir=${tmp}

# Create remote temp
target_tmp=$(ssh root@${target} "mktemp --directory --tmpdir=/tmp/ sl1-errors.XXXX")
target_tmp=$(ssh root@${target} "mktemp --directory --tmpdir=/tmp/ prusa_errors.XXXX")
echo "Remote temp is ${target_tmp}"

echo "Installing on target"
scp -r ${tmp}/* root@${target}:${target_tmp}
ssh root@${target} "\
set -o xtrace; \
cd ${target_tmp}; \
tar xvf sl1-errors*.tar.gz; \
rm sl1-errors*.tar.gz; \
cd sl1-errors-*; \
tar xvf prusa_errors*.tar.gz; \
rm prusa_errors*.tar.gz; \
cd prusa_errors-*; \
pip3 install . ; \
"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="prusa_errors",
version="2020.4.21",
version="2020.9.25",
packages=find_packages(exclude=["tests"]),
url="https://github.com/prusa3d/Prusa-Error-Codes",
license="GNU General Public License v3 or later (GPLv3+)",
Expand Down

0 comments on commit 167d2cb

Please sign in to comment.