Commit Graph

41 Commits

Author SHA1 Message Date
muehe
41d720c1d0 kiosk: pi-friendly compact mode + chromium 72 fallbacks
- Detect kiosk mode (localhost / ?kiosk=1) and add html.kiosk-mode
- Suppress 3D path-viewer in kiosk mode (Pi 3B too slow)
- Compact 1366x768 layout: 56px header, smaller jog grid, 4-col macros
  2-col status, 540px jog column
- Flex-gap fallbacks for Chromium 72 (header tabs, sys-btn, state-badge,
  ktab, sp-row, etc.) using "> * + *" margin-* rules
- Path-viewer: opaque WebGL canvas, ResizeObserver-gated render loop,
  no first-frame size flash
- Path-viewer renderer cleared properly on component teardown
- W axis row: W- | W+ | Probe XYZ | Probe Z (was W-|HomeW|W+|Probe)
- Running panel only for actual program execution (not jogging)
- Settings sectioned (Display+Units / Probing / G-code+Motion)
- Routed component now keep-alive across tab swaps
- FA4 -> FA6 webfonts
2026-05-01 11:05:39 +02:00
3d73e6c59d install.sh: mask sysstat, replace dphys-swapfile with fstab entry
Round-3 cold-boot trims:
- mask sysstat.service (sadc CPU/IO logger; nothing reads it).
- mask dphys-swapfile.service and add /var/swap to /etc/fstab so swap
  is brought up by systemd at local-fs.target instead of by an LSB
  wrapper that re-checks the swap file size on every boot.

Both are reversible: `systemctl unmask <unit>` and remove the fstab
line. Before doing the dphys swap, install.sh verifies /var/swap
exists; on a fresh image where the file hasn't been created yet,
nothing is changed and dphys-swapfile keeps running normally.

Userspace boot 11.5s -> 10.7-11.4s on clean runs; bbctrl listen
unchanged at boot+10.4s (the saving moves to chromium/multi-user).
2026-05-01 10:31:40 +02:00
860ca30aba install.sh: ship cold-boot optimisations with firmware updates
Persist the cold-boot wins (was: only manually deployed via
tmp/20260501_restart_timing/deploy-fast.sh, would silently revert on
the next prod firmware update).

- Install bbserial-rebind.service alongside bbctrl.service and enable
  it. Eliminates the rc.local bbserial reload mid-boot.
- Prefer scripts/rc.local.fast over scripts/rc.local when present.
  Legacy rc.local left as a fallback for old firmware tarballs.
- Mask plymouth-read-write, plymouth-quit-wait, and raspi-config.
  Together these were ~6s of userspace startup that bought nothing
  on a deployed Onefinity Pi.

Cumulative: bbctrl listening at boot+10.6s (was 20.6s), userspace
boot 11.5s (was ~13s), bbctrl.service @2.9s in critical-chain (was
@6.5s after the first optimisation pass).
2026-05-01 10:15:35 +02:00
8e3b7a29e5 Cold-boot: 4 optimisations cutting bbctrl listen by ~8s on the Pi
Measured on onefinity.local (Pi 3, Raspbian Stretch, bbctrl 1.6.7).

Before -> after:
  bbctrl listen           boot+20.6s  ->  boot+12.4s   (-8.2s)
  host -> /api/config/load    28.2s   ->     22.5s    (-5.7s)

The 4 changes (each independently revertable):

1. scripts/bbserial-rebind.service: do the bbserial unbind + reload
   in a dedicated unit ordered Before=bbctrl.service, instead of in
   rc.local AFTER bbctrl is already listening on the serial port.
   Eliminates a full bbctrl restart mid-boot.

2. scripts/bbctrl.service: drop "After=network.target". bbctrl talks
   to the AVR on a local serial port and to the LCD on I2C; it does
   not need DHCP / network-online to come up. Also adds explicit
   ordering after the new bbserial-rebind unit.

3. scripts/rc.local.fast: trimmed rc.local that no longer touches
   bbserial and backgrounds 'startx' so chromium launches in
   parallel with bbctrl rather than after rc.local finishes.

4. src/py/bbctrl/Planner.py: lazy-import camotics.gplan. Costs ~130ms
   on cold cache, deferred from import-time to ctrl.mach init.

5. (bonus) src/py/bbctrl/Log.py: tolerate FileNotFoundError in
   _rotate(). The improved boot path exposed a pre-existing log
   rotator bug that crashed bbctrl on first start when bbctrl.log.16
   was missing.
2026-05-01 10:07:23 +02:00
561d2fd7ea Restart timing: bbctrl.Trace, /api/diag/timing, UI marks
Add a lightweight, self-contained phase tracer for measuring end-to-end
bbctrl restart and Pi boot time. Disabled by setting BBCTRL_TRACE=0.

- src/py/bbctrl/Trace.py: monotonic-anchored event log + sd_notify helper.
- bbctrl/__init__.py: marks for imports, args parsed, ioloop, web init,
  listen, and an sd_notify READY=1 once HTTP is bound.
- bbctrl/Ctrl.py: spans around each subsystem (avr, i2c, lcd, mach,
  preplanner, jog, pwr, hooks, aux, mach.connect).
- bbctrl/Comm.py: avr.firmware_rebooted mark.
- bbctrl/Web.py: TimingHandler (GET /api/diag/timing) and
  UITimingHandler (PUT /api/diag/timing/ui), plus a ws.first_open mark.
- src/js/restart-timing.js + app.js: UI-side performance.now() marks
  (script.load, ws.open, ws.first_msg, ui.first_state, window.load),
  posted once to the controller.
- scripts/bbctrl.service: stdout/stderr -> journal so TRACE lines are
  visible via journalctl -u bbctrl. (Was StandardOutput=null.)

Revert: git revert this commit. To disable at runtime without
reverting, set BBCTRL_TRACE=0 in the bbctrl service environment.
2026-05-01 09:48:10 +02:00
ea23f94b87 Settings rail: add W Axis entry; deploy scripts (local/hardware/prod)
UX
- The V09 redesign already exposed the W axis in the Control jog grid
  (row 4 when w.enabled) and as a row in the DRO table. The Settings
  shell now also surfaces a dedicated 'W Axis' rail entry that smooth-
  scrolls to the W Axis (auxcnc) section of the main settings page.
  The rail item is marked active only while the user is on Display &
  Units AND the W Axis link was the most recent click.
- The W Axis section in src/svelte-components/src/components/Settings
  View.svelte gets an id="w-axis" anchor so the scroll lands cleanly.

Tested live against onefinity.local. Aux status reports
{enabled: true, present: true, pos_mm: 43.96, homed: false}; the W
axis row appears in the DRO with the right purple styling, and the
jog row 4 shows W- / Home W / W+ / Probe.

Deploy scripts
- deploy.sh dispatches to scripts/deploy/{local,hardware,prod}.sh
  with shorthand wrappers (deploy-local.sh / deploy-hardware.sh /
  deploy-prod.sh).
- local: builds the UI bundle and serves build/http/ via
  python3 -m http.server 8770 in a tmux session 'onefin-local'.
  Useful for visual iteration on macOS — chrome only, no controller.
- hardware: rsyncs the freshly built build/http/ tree onto the Pi at
  onefinity.local and restarts bbctrl. Stages to /tmp on the Pi and
  uses sudo to install into the running egg's bbctrl/http directory,
  so iteration time is ~5 seconds.
- prod: requires a clean working tree, then runs 'make pkg' followed
  by 'make update HOST=onefinity.local PASSWORD=onefinity'.

Defaults can be overridden with environment variables (HOST, PASSWORD,
REMOTE_USER for the hardware path).
2026-04-30 21:45:17 +02:00
saifullah-N
f0c4579b61 This patch adds support for pwncnc 2023-02-12 14:01:05 +05:30
Sathish Kumar
d6c12d095f Update chroot 2023-02-07 07:28:15 +08:00
Sathish Kumar
3b7ca29033 File mode Change 2023-02-07 07:16:43 +08:00
saifullah-N
842c331eff Merge branch '1.2.1' into v.1.2.1 2023-02-06 12:16:33 +05:30
saifullah-N
aa3a359473 Fix SSL certificate issue with mirror 2023-02-06 12:13:41 +05:30
saifullah-N
8115ceac45 Fix SSL certificate issue with mirror 2023-02-06 11:09:37 +05:30
David A. Carley
eced4c7d6f Update install.sh
Force chromium to restart to see cookie changes
2021-12-08 10:26:30 -08:00
David A. Carley
1a2613677d Update delete-cookies.py
Neglected to commit the changes to the DB.
2021-12-08 10:04:36 -08:00
David Carley
5b1702c62a Changed default speeds on PWM to 6000/24000, and clean up old cookies 2021-12-07 19:15:13 -08:00
David Carley
78fce9e9da Fix for laser zeroing - only honor "dynamic power" when running a gcode program. 2021-10-05 23:09:06 -07:00
David Carley
e63d8db595 Fixed issues with fusion gcode motion control 2021-03-30 11:34:48 -07:00
David Carley
f6e6d13276 Silence warnings about unsupported G61, G61.1, G64 2021-03-12 07:03:32 -08:00
David Carley
d095b2c739 Don't clean the drive so aggressively 2021-03-10 14:40:50 -08:00
OneFinityCNC
2e166e95e9 Merge pull request #34 from dacarley/revert-resolution-change
Revert the resolution change for now
2021-03-10 13:15:56 -05:00
OneFinityCNC
bad0c7e05c Merge branch '1.0.7-devel' into fix-offline-install 2021-03-10 13:14:13 -05:00
David Carley
f6f6e1c6b9 Revert the resolution change for now 2021-03-10 07:43:27 -08:00
David Carley
937f30d844 Run logrotate at boot 2021-03-09 23:48:03 -08:00
David Carley
5544e79913 Missed a binding for the terminal 2021-03-09 23:27:32 -08:00
David Carley
4571fe10e8 Fixed offline installs, with local copy of py libs 2021-03-09 22:59:43 -08:00
David Carley
851ec31b0c Added drive cleanup to the upgrade process 2021-03-07 23:57:24 -08:00
David Carley
ae9e13ecad Removed debugging statement 2021-03-07 21:22:23 -08:00
David Carley
55c0ec844e Automatically resize the root filesystem if needed 2021-03-07 21:21:35 -08:00
OneFinityCNC
1f8a743f65 Merge pull request #24 from dacarley/watch-for-uploaded-files
Added a filesystem watcher for uploaded files
2021-03-06 14:51:52 -05:00
David Carley
814d1cdd80 Added the watchdog python lib to the installer 2021-03-06 10:40:43 -08:00
OneFinityCNC
55e1fe93ba Merge pull request #21 from dacarley/use-native-screen-resolution
Use the native screen resolution
2021-03-06 13:05:18 -05:00
OneFinityCNC
8596533a74 Merge pull request #26 from dacarley/use-native-display-resolution
Allow rPi to use full screen resolution
2021-03-06 13:02:43 -05:00
David Carley
f49649b020 Fixed a bug, added the ratpoison config file 2021-03-06 09:25:14 -08:00
David Carley
9ef4444648 Allow rPi to use full screen resolution 2021-03-06 09:16:48 -08:00
David Carley
1feef69ff8 Disable G61, G61.1, G64 2021-03-06 08:53:04 -08:00
David Carley
e05b7d4f5f Use the native screen resolution 2021-03-05 21:36:03 -08:00
David Carley
5d52a06322 "parallel build" flag for cbang/camotics builds 2021-03-02 08:11:21 -08:00
OneFinityCNC
a0ae0a4e30 1.0.6 Firmware release. More Github cleanup. 2021-02-28 00:58:19 -05:00
OneFinityCNC
7320e5e4e5 GitHub cleanup 2021-02-26 18:55:10 -05:00
OneFinityCNC
47af000045 Verison 1.0.5 2020-10-15 23:17:21 -04:00
OneFinityCNC
24dfa6c64d Verison 1.0.3 Release
Based on Buildbotics 0.4.14
2020-08-27 23:20:27 -04:00