Commit Graph

1215 Commits

Author SHA1 Message Date
Claude
23f22105a8 UI: align W axis marker/home buttons with the X/Y/Z columns
The xyzabc rows have three actions (set-position cog, zero marker, home),
W only has two. Without a placeholder the W buttons render in the left two
slots of the actions cell, leaving the home button unaligned with the home
column above. Added a hidden disabled cog button so the marker and home
buttons sit under the same columns as the rest.
2026-04-30 17:23:55 +02:00
Claude
4f74e75d44 UI: render W (aux) axis row in the main DRO
Adds the auxcnc W axis to the front-page Position table:

- axis-vars.js exposes a 'w' computed property fed by state.aux_pos /
  aux_enabled / aux_homed / aux_present (set by AuxAxis on the host).
  No motor mapping, no soft-limit warnings - the aux controller does
  its own bounds.
- control-view.pug adds a W row after the xyzabc loop. The Set/Zero
  button calls /api/aux/set-zero {mm:0} and the Home button calls
  /api/aux/home, which hit the new endpoints exposed by Web.py.
- control-view.js: aux_home(), aux_set_zero(), and aux_jog() helpers.

When aux_enabled is false (no aux.json or aux.json has enabled=false)
the row stays hidden, matching the existing axis-row behavior.
2026-04-30 17:10:00 +02:00
Claude
c7cf9483b3 Add W axis integration via auxcnc ESP32 over /dev/ttyUSB0
Rather than rebuild gplan + the AVR firmware to add a true 7th axis,
we treat W as a synchronous out-of-band axis that moves between G-code
blocks. The pipeline:

  upload -> AuxPreprocessor rewrites W tokens into (MSG,HOOK:aux:N)
  comments -> planner sees only XYZ + messages -> Hooks fires the
  registered internal handler -> AuxAxis sends STEPS/HOME over serial
  to the ESP and blocks the planner until done.

New files:
  src/py/bbctrl/AuxAxis.py       serial worker + RPC layer
  src/py/bbctrl/AuxPreprocessor.py  G-code rewriter
  docs/AUX_W_AXIS.md             design + ops notes

Changed:
  Hooks.py        register_internal(); fix the (MSG,HOOK:...) listener
                  to read the 'messages' state list (was broken before)
  Ctrl.py         instantiate AuxAxis, register aux/aux_rel/aux_home/
                  aux_setzero hooks
  FileHandler.py  rewrite uploads in place when they use W
  Mach.py         rewrite W tokens in MDI input the same way
  Web.py          REST endpoints under /api/aux/*

The ESP firmware in ../auxcnc was extended in lockstep: HOME, HOMECFG
(NVS-persisted), WPOS, HOMED?, LIMIT?, abortable STEPS with
limit-aware abort, trapezoidal ramps, deterministic [topic] reply
tokens, [boot] banner.

Real-time decisions (limit switch, step pulses) live on the ESP. The
host owns mm units, soft limits, and aux_homed bookkeeping. ESP
reboot mid-job clears aux_homed and surfaces a message; per design
manual jogs are still allowed without homing.
2026-04-30 16:51:24 +02:00
54a15f9d12 Rewrite BUILD.md: clean up, add quick start, remove dead weight
- Quick start section at the top (3 commands)
- Removed inline Bullseye build recipe (moved to 'why not' appendix)
- Added build time estimates
- Cleaner table formatting
- gplan.so contents documented (cbang + camotics)
2026-04-30 16:39:57 +02:00
704bc8d35c gplan.so: build from source using Raspbian Stretch Docker
Use balenalib/raspberry-pi-debian:stretch with legacy.raspbian.org repos.
Exact match: GCC 6.3, Python 3.5, GLIBC 2.24 — identical to the Pi.
First build ~25min (QEMU), subsequent builds ~1sec (cached image).

Replaces the broken Bullseye approach that had GLIBC/GLIBCXX mismatches.
2026-04-30 16:33:20 +02:00
4d2d5fd88c Update BUILD.md: gplan.so can't be built from source on Bullseye
Document GLIBC/GLIBCXX version constraints and Python 3.5 compat notes.
Recommend using official release gplan.so instead.
2026-04-30 15:57:31 +02:00
eab204b7be Fix Python 3.5 compat: capture_output and text= not available
Use stdout=PIPE/stderr=PIPE and manual .decode() instead.
Use official 1.6.6 gplan.so (built with Stretch-era GCC, no GLIBC_2.29 dep).
2026-04-30 15:56:42 +02:00
e3c059eb9b Add cached gplan.so build: 30min first time, 3sec after
- Dockerfile.gplan: pre-built armv7 image with cbang + camotics objects
- build-gplan.sh: relinks against Python 3.5m in ~3sec
- Pi Python 3.5 headers cached in .pi/pi-python35.tar.gz (gitignored)
2026-04-30 14:43:05 +02:00
7306464440 Document gplan.so build-from-source procedure
Build in armv7 QEMU Docker, compile with Python 3.9 SCons,
relink final .so against Python 3.5m from the Pi.
2026-04-30 13:52:58 +02:00
1625b768d8 Add build/flash/backup documentation for Pi firmware 2026-04-30 12:09:12 +02:00
5be7515a92 Fix gplan.so: use armv7 binary from official 1.6.6 release
The gplan.so (CAMotics G-code planner) must be a 32-bit ARM binary
matching the Pi's Python 3.5. Source it from the official release
package rather than cross-compiling (SCons ignores CC/CXX overrides).

Also revert install.sh gplan.so preservation logic — simpler to just
ship the correct binary in the package.
2026-04-30 11:36:09 +02:00
b10a6d537e Add SD card backup/restore script
Streams raw dd from Pi over SSH, compresses locally with gzip.
Supports backup, restore (local SD card or remote Pi), and verify.
2026-04-30 11:17:03 +02:00
7d0755c55b Hooks v2: block unpause until hook completes
- Blocking hooks (block_unpause: true, default for tool-change) run
  in a background thread and gate Mach.unpause() via can_unpause()
- Machine stays in HOLDING state while hook runs — AVR steppers idle,
  spindle state preserved, position locked
- auto_resume option to unpause automatically after hook completes
- E-stop cancels any running hook immediately
- Hook status pushed to frontend via state (hook_busy, hook_event)
- GET /api/hooks/status endpoint for polling
- Non-blocking hooks (program-start, program-end, etc.) fire-and-forget
2026-04-21 08:10:07 +02:00
7f8fd23615 Add hooks system for external triggers during G-code execution
- New Hooks module (src/py/bbctrl/Hooks.py) that watches controller state
  and fires webhooks or scripts on events:
  - tool-change (M6), program-start, program-end, pause, estop,
    homing-start, homing-end, custom (via MSG comments)
- API endpoints:
  - GET /api/hooks - get current hook config
  - PUT /api/hooks/save - save hook config
  - PUT /api/hooks/fire/<event> - manually fire a hook (for testing)
- Hook config stored in hooks.json with two types:
  - webhook: HTTP POST/PUT to external URL with JSON context
  - script: run local command with env vars (HOOK_OLD_TOOL, etc.)
- Fix tornado.web.asynchronous deprecation in Camera.py
- Wired into Ctrl initialization and state listener system
2026-04-20 17:43:02 +02:00
sanjayk03-dev
44b85bad5a v1.6.7 2025-09-21 01:57:17 +05:30
sanjayk03-dev
f092c0c5d0 UI change 2025-09-21 01:52:42 +05:30
sanjayk03-dev
fda579d765 making easy-adapter reactive 2025-09-21 01:45:20 +05:30
sanjayk03-dev
9b72d7c5cc debuging with logs 2025-09-21 01:37:52 +05:30
sanjayk03-dev
6eb2739426 Merge branch 'v1.6.0' of https://github.com/sanjayk03-dev/onefinity-firmware into v1.6.0 2025-09-21 01:31:59 +05:30
sanjayk03-dev
31fae30546 made label reactive 2025-09-21 01:31:55 +05:30
bsaravanan783
7fd8d32680 Merge branch 'v1.6.0' of https://github.com/sanjayk03-dev/onefinity-firmware into v1.6.0 2025-09-21 01:26:36 +05:30
bsaravanan783
4fe84412d4 easy- adapter style chagne 2025-09-21 01:26:28 +05:30
sanjayk03-dev
6f881e1eae changed to 90 seconds modal 2025-09-21 01:22:44 +05:30
sanjayk03-dev
363f3a770e UI changes 2025-09-21 01:21:55 +05:30
sanjayk03-dev
4ef4943ce9 fixed modal opening on each refresh 2025-09-21 01:06:42 +05:30
bsaravanan783
104cbbf5da styles 2025-09-21 01:05:41 +05:30
bsaravanan783
a0ebced79a changed easy adapter to true 2025-09-21 00:53:01 +05:30
sanjayk03-dev
763fb3a763 testing with 5 secs 2025-09-21 00:27:47 +05:30
sanjayk03-dev
02c01bcc08 added title for easy adapter in settings 2025-09-21 00:23:53 +05:30
sanjayk03-dev
5c15385d0f consumed easyadapter dialog and added timer 2025-09-21 00:21:48 +05:30
sanjayk03-dev
1b18f2e4ba fixed cond 2025-09-21 00:02:29 +05:30
sanjayk03-dev
9a347e3406 easy adapter dialogs 2025-09-20 23:55:46 +05:30
sanjayk03-dev
6889828e7a easy adapter UI 2025-09-20 23:47:42 +05:30
sanjayk03-dev
668a116de7 added easy adapter in settings 2025-09-20 23:36:33 +05:30
sanjayk03-dev
6192afd532 added metadata 2025-09-20 23:02:36 +05:30
sanjayk03-dev
344b3ff259 removed unused logs 2025-09-20 18:08:48 +05:30
bsaravanan783
8d7c23cfd7 moved the toolList down the unsupported 2025-09-17 22:46:33 +05:30
sanjayk03-dev
f68f2e5c88 making component reactive 2025-09-07 00:53:51 +05:30
sanjayk03-dev
0cc48eb845 added more loggers 2025-09-07 00:46:25 +05:30
sanjayk03-dev
b20ab8bdd6 updated sync function 2025-09-07 00:40:02 +05:30
sanjayk03-dev
e18b0089fa added logs 2025-09-07 00:29:02 +05:30
sanjayk03-dev
5c46806c05 bugfix for v1.6.0 2025-09-07 00:14:57 +05:30
sanjayk03-dev
28e6b29ed6 v1.6.6 2025-08-31 18:48:26 +05:30
sanjayk03-dev
25897f0a67 added state handler 2025-08-31 18:21:35 +05:30
sanjayk03-dev
91f8860320 removed logs 2025-08-31 17:53:08 +05:30
sanjayk03-dev
243b23827e removed f strings 2025-08-31 17:42:28 +05:30
sanjayk03-dev
7e0739eea3 trying to fix microsteps fix 2025-08-31 17:35:38 +05:30
sanjayk03-dev
6b151d1fc6 added attached to refresh settings page on each visit 2025-08-31 17:12:03 +05:30
sanjayk03-dev
4a9bd07fa7 Merge branch 'v1.6.0' of https://github.com/sanjayk03-dev/onefinity-firmware into v1.6.0 2025-08-31 16:50:10 +05:30
sanjayk03-dev
961a54bf65 fixed state notify 2025-08-31 16:50:00 +05:30