mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-08 23:21:58 +02:00
external-spool extruder routing (#1257) X2D with 0 AMS units and two external spools (Ext-L feeding left extruder, Ext-R feeding right) showed "Required filament type not found in printer" even when the matching filament was physically loaded. Cause: useFilamentMapping derived dual-nozzle status from ams_extruder_map being non-empty -- that map is populated from AMS info bits, so dual-nozzle printers without AMS got an empty map and hasDualNozzle=false. External spools then fell through to extruderId=undefined, and the nozzle-aware filter rejected every candidate because undefined !== 0/1. Prefer the hardware-reported printerStatus.nozzles array length as the dual-nozzle signal -- populated regardless of AMS configuration -- and keep the ams_extruder_map branch as fallback for older firmware that might not surface nozzles. Affects all dual-nozzle printers running without AMS: X2D, H2D, X2 Pro. Regression test pins both layers the bug straddled -- buildLoadedFilaments extruderId assignment per external spool, and computeAmsMapping picking the correct external for a per-nozzle requirement -- so a future change that re-breaks either fails CI.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])