Files
onefinity-firmware/.devcontainer/install_tools.sh
Henrik Muehe 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

48 lines
708 B
Bash
Executable File

#!/usr/bin/env -S bash -e
APT_PACKAGES=(
"build-essential"
"git"
"wget"
"binfmt-support"
"qemu"
"gcc-9"
"parted"
"udev"
"zerofree"
"gcc-avr"
"avr-libc"
"avrdude"
"python3"
"python3-pip"
"python3-tornado"
"inetutils-ping"
"curl"
"unzip"
"python3-setuptools"
"gcc-arm-linux-gnueabihf"
"bc"
"vim"
"locate"
"sudo"
"sshpass"
)
apt-get update
apt-get upgrade -y
apt-get install -y "${APT_PACKAGES[@]}"
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
/usr/bin/python3 -m pip install -U yapf
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
mkdir -p /root/.ssh
cat > /root/.ssh/config <<- END
Host onefinity
User bbmc
END