Name it Gyre - Sand Art Table
README, build guide, software README, web page header and title, jog page, desktop alerts and the start-up message now say Gyre. The repo, the Python package and its commands keep their names (sandTable, python3 -m sandtable), so links and setups keep working. New web page screenshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e7a4f67a96
commit
97ebae93b2
9 files changed
+22
-22
No files matched your search
@@ -251,17 +251,17 @@ class Player:
|
||||
self.p.homed = False
|
||||
self.message = f'Stopped: {e}. Check the arm, belt and carriage, then play again (it homes first).'
|
||||
log('ERROR ' + self.message + f' | status {c.status.state} pins={c.status.pins!r} wpos={c.status.wpos}')
|
||||
self.alert('Sand table stopped: home switch pressed', self.message)
|
||||
self.alert('Gyre stopped: home switch pressed', self.message)
|
||||
except OSError as e: # the USB cable came out: the panel reconnects
|
||||
self.p.lost(e)
|
||||
self.message = 'Stopped: the USB connection to the Uno was lost. Plug it back in; the page reconnects by itself.'
|
||||
log(f'ERROR USB lost: {e!r}')
|
||||
self.alert('Sand table: USB connection lost', self.message)
|
||||
self.alert('Gyre: USB connection lost', self.message)
|
||||
except GrblError as e:
|
||||
self.p.homed = False
|
||||
self.message = f'Stopped: {e}'
|
||||
log('ERROR ' + self.message + f' | status {c.status.state} wpos={c.status.wpos} errors={c.errors[-3:]}')
|
||||
self.alert('Sand table stopped', self.message)
|
||||
self.alert('Gyre stopped', self.message)
|
||||
except Exception as e: # a bug: stop safely and say so
|
||||
import traceback
|
||||
self.p.homed = False
|
||||
@@ -271,7 +271,7 @@ class Player:
|
||||
c.stop()
|
||||
except Exception:
|
||||
pass
|
||||
self.alert('Sand table stopped', self.message)
|
||||
self.alert('Gyre stopped', self.message)
|
||||
finally:
|
||||
c.guard = None
|
||||
c.abort = False
|
||||
@@ -324,7 +324,7 @@ class Player:
|
||||
# ---------------------------------------------------------------- page
|
||||
PAGE = r"""<!doctype html>
|
||||
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Sand Table</title>
|
||||
<title>Gyre - Sand Art Table</title>
|
||||
<style>
|
||||
:root{--bg:#f4f1ea;--card:#fffdf8;--ink:#2a2622;--mute:#6f675d;--line:#e2dbcf;--acc:#2f6f5e;--acc-ink:#fff;--stop:#c0392b;--bar:#e9e2d4}
|
||||
@media (prefers-color-scheme:dark){:root{--bg:#18191b;--card:#232528;--ink:#ece8e1;--mute:#a59e94;--line:#36393d;--acc:#5fb49c;--acc-ink:#0d1f1a;--bar:#2e3135}}
|
||||
@@ -369,7 +369,7 @@ a{color:var(--acc)}
|
||||
@media (max-width:560px){#now img{width:72px;height:72px} #now .info{flex-basis:150px} #now .row{width:100%} #now .row button{flex:1} h1{font-size:18px}}
|
||||
</style></head><body><main>
|
||||
<header>
|
||||
<h1>Sand Table</h1>
|
||||
<h1>Gyre <span style="font-weight:400;color:var(--mute);font-size:15px">sand art table</span></h1>
|
||||
<span class="pill" id="mach">connecting…</span>
|
||||
<button id="homeBtn" onclick="post('home')">Home</button>
|
||||
<button class="stop" onclick="post('stop')">STOP</button>
|
||||
@@ -511,8 +511,8 @@ def serve(ctrl, cfg, host='127.0.0.1', port=8765, open_browser=True, open_path='
|
||||
lib = library or Library(cfg)
|
||||
player = Player(panel, cfg, lib, alert=alert)
|
||||
threading.Thread(target=lib.warm, daemon=True).start()
|
||||
jog_page = JOG_PAGE.replace('<h1>Sand table: jog & calibrate</h1>',
|
||||
'<p><a href="/">← Library</a></p><h1>Sand table: jog & calibrate</h1>')
|
||||
jog_page = JOG_PAGE.replace('<h1>Gyre: jog & calibrate</h1>',
|
||||
'<p><a href="/">← Library</a></p><h1>Gyre: jog & calibrate</h1>')
|
||||
|
||||
def busy():
|
||||
if not panel.connected:
|
||||
@@ -614,7 +614,7 @@ def serve(ctrl, cfg, host='127.0.0.1', port=8765, open_browser=True, open_path='
|
||||
srv = ThreadingHTTPServer((host, port), H)
|
||||
srv.daemon_threads = True
|
||||
url = f'http://{"127.0.0.1" if host in ("0.0.0.0", "") else host}:{port}'
|
||||
print(f'Sand table page at {url}{open_path} (Ctrl-C here to quit)', flush=True)
|
||||
print(f'Gyre page at {url}{open_path} (Ctrl-C here to quit)', flush=True)
|
||||
if host in ('0.0.0.0', ''):
|
||||
print(' Also open to other devices on your network, with no password: anyone on it can drive the table.')
|
||||
if open_browser:
|
||||
|
||||
Reference in new issue
Block a user