Add URL to wiki if firmware out of date

This commit is contained in:
jaknapper 2026-02-17 13:42:11 +00:00
parent 79e8230ac5
commit 143bbdfea1
2 changed files with 6 additions and 4 deletions

View file

@ -17,6 +17,7 @@ from . import BaseStage
REQUIRED_VERSION = semver.Version.parse("1.0.0")
RECOMMENDED_VERSION = semver.Version.parse("1.0.4")
WIKI_URL = "https://openflexure.miraheze.org/wiki/Sangaboard"
class SangaboardThing(BaseStage):
@ -108,14 +109,14 @@ class SangaboardThing(BaseStage):
if version < REQUIRED_VERSION:
raise RuntimeError(
f"Sangaboard firmware version {version} is below the required "
f"{REQUIRED_VERSION}."
f"{REQUIRED_VERSION}. Visit {WIKI_URL} for instructions on updating."
)
# Warn if version is below recommended
if version < RECOMMENDED_VERSION:
self.logger.warning(
f"Sangaboard firmware version {version} is below the recommended "
f"{RECOMMENDED_VERSION}."
f"{RECOMMENDED_VERSION}. Visit {WIKI_URL} for instructions on updating."
)
def _hardware_move_relative(