mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-28 21:17:36 +00:00
Feature/135 converge round square dashboards into re (#140)
* fixup(common): pod_size=48 to match deployed icon sizes (ref #135) Module icons were falling back to first-letter placeholders because SquareDashboard/RoundDashboard called paint_pod_cluster(pod_size=40) while load_module_icon only ships sizes 22/48/96/128. Bump pod_size to 48 and radius from 70 to 78 so the pod inner edge (54) stays clear of the central button (44). Confirmed on Pi 4B square hardware: pods now render with full icons. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fixup(square): ship remote-ui/common/assets/icons to /var/www/common/assets (ref #135) The square build script shipped remote-ui/common/python/ but skipped remote-ui/common/assets/. secubox_common.icons.load_module_icon resolves icons at /var/www/common/assets/icons/ — when that path is missing on the deployed image, every module pod falls back to a first-letter placeholder. The round build script already does this at line 925; bringing square to parity. Fails the build (exit 2) if no *-48.png icons land — same shape as the existing python-package guard right above. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fixup(square): install secubox-otg-gadget.sh to /usr/local/sbin (ref #135) The square build script enables secubox-otg-gadget.service but never copies the composer script to /usr/local/sbin/. On boot the service ExecStarts a missing file → fails silently → the Pi 4B's USB-C bus stays unconfigured → MOCHAbin/host see no enumeration (zero dmesg events, xhci setup timeouts). The round build copies it at build-eye-remote-image.sh:618; bringing square to parity. The script itself lives in remote-ui/common/shell/, already shared between the two images. Hardware-confirmed: Pi 4B booted and rendered the dashboard but MOCHAbin got no USB events whatsoever on either a hub-deep port or a direct port, across cable swaps. Root cause was the missing composer, not cabling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: CyberMind-FR <gandalf@Gk2.net> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
355767935c
commit
b0b42e81de
|
|
@ -38,7 +38,10 @@ class SquareDashboard(DashboardCanvas):
|
|||
self.paint_rainbow_ring(dash, self.CENTER, 235, 220)
|
||||
self.paint_concentric_arcs(dash, self.CENTER, MODULES, metrics,
|
||||
self.RING_RADII)
|
||||
self.paint_pod_cluster(dash, MODULES, self.CENTER, radius=70, pod_size=40)
|
||||
# pod_size=48 matches the deployed icon sizes (22/48/96/128); 40 would
|
||||
# miss and fall back to the first-letter placeholder. radius bumped
|
||||
# to 78 so pod inner edge (54) stays clear of the central button (44).
|
||||
self.paint_pod_cluster(dash, MODULES, self.CENTER, radius=78, pod_size=48)
|
||||
self.paint_central_button(dash, self.CENTER, size=44)
|
||||
img.paste(dash, (0, 0))
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,10 @@ class RoundDashboard(DashboardCanvas):
|
|||
self.paint_rainbow_ring(img, self.CENTER, 235, 220)
|
||||
self.paint_concentric_arcs(img, self.CENTER, MODULES, metrics,
|
||||
self.RING_RADII)
|
||||
self.paint_pod_cluster(img, MODULES, self.CENTER, radius=70, pod_size=40)
|
||||
# pod_size=48 matches the deployed icon sizes (22/48/96/128); 40 would
|
||||
# miss and fall back to the first-letter placeholder. radius bumped
|
||||
# to 78 so pod inner edge (54) stays clear of the central button (44).
|
||||
self.paint_pod_cluster(img, MODULES, self.CENTER, radius=78, pod_size=48)
|
||||
self.paint_central_button(img, self.CENTER, size=44)
|
||||
return img
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,17 @@ log "Installing config files (systemd, udev, apparmor, firstboot)..."
|
|||
cp -r "$REPO_ROOT/remote-ui/square/files/." "$ROOT_MNT/"
|
||||
chmod +x "$ROOT_MNT/usr/local/sbin/firstboot.sh"
|
||||
|
||||
# Install the shared OTG gadget composer (round does this at line 618 of
|
||||
# build-eye-remote-image.sh). secubox-otg-gadget.service ExecStarts this path;
|
||||
# without it the gadget never composes and the Pi 4B's USB-C bus stays silent
|
||||
# → MOCHAbin/host enumeration fails (no descriptor events, xhci timeouts).
|
||||
log "Installing OTG gadget composer at /usr/local/sbin/secubox-otg-gadget.sh..."
|
||||
cp "$REPO_ROOT/remote-ui/common/shell/secubox-otg-gadget.sh" \
|
||||
"$ROOT_MNT/usr/local/sbin/secubox-otg-gadget.sh"
|
||||
chmod +x "$ROOT_MNT/usr/local/sbin/secubox-otg-gadget.sh"
|
||||
test -x "$ROOT_MNT/usr/local/sbin/secubox-otg-gadget.sh" || \
|
||||
{ err "secubox-otg-gadget.sh not executable on rootfs"; exit 2; }
|
||||
|
||||
# Ship the shared secubox_common package.
|
||||
log "Embedding remote-ui/common/python at /var/www/common/python/..."
|
||||
mkdir -p "$ROOT_MNT/var/www/common/python"
|
||||
|
|
@ -110,6 +121,17 @@ cp -r "$REPO_ROOT/remote-ui/common/python/." "$ROOT_MNT/var/www/common/python/"
|
|||
test -d "$ROOT_MNT/var/www/common/python/secubox_common" || \
|
||||
{ err "secubox_common not in /var/www/common/python — common/ source incomplete"; exit 2; }
|
||||
|
||||
# Ship the shared icon assets — secubox_common.icons.load_module_icon
|
||||
# resolves at /var/www/common/assets/icons/ first. Without these the pod
|
||||
# cluster falls back to first-letter placeholders.
|
||||
log "Embedding remote-ui/common/assets at /var/www/common/assets/..."
|
||||
mkdir -p "$ROOT_MNT/var/www/common/assets"
|
||||
cp -r "$REPO_ROOT/remote-ui/common/assets/." "$ROOT_MNT/var/www/common/assets/"
|
||||
ICON_COUNT=$(ls "$ROOT_MNT/var/www/common/assets/icons"/*-48.png 2>/dev/null | wc -l)
|
||||
test "$ICON_COUNT" -gt 0 || \
|
||||
{ err "no *-48.png icons in /var/www/common/assets/icons — common/ assets incomplete"; exit 2; }
|
||||
log " → $ICON_COUNT module icons at size 48 shipped"
|
||||
|
||||
log "Installing Python packages..."
|
||||
mkdir -p "$ROOT_MNT/usr/lib/python3/dist-packages"
|
||||
cp -r "$REPO_ROOT/packages/secubox-eye-square/helper/eye_square_helper" \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user