From 4b6041302e03b0379629be2329c436113d395363 Mon Sep 17 00:00:00 2001 From: Woody Date: Sat, 9 Nov 2024 21:37:42 +0100 Subject: [PATCH 001/109] fix #4166 --- package-lock.json | 1877 ++++++--------------------------------------- package.json | 2 +- tools/cdata.js | 35 +- 3 files changed, 247 insertions(+), 1667 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f73bff0c..a7beb9c40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,14 +11,15 @@ "dependencies": { "clean-css": "^5.3.3", "html-minifier-terser": "^7.2.0", - "inliner": "^1.13.1", - "nodemon": "^3.0.2" + "nodemon": "^3.1.7", + "web-resource-inliner": "^7.0.0" } }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -32,6 +33,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -40,6 +42,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -48,6 +51,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -56,21 +60,24 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -78,62 +85,20 @@ "node": ">=0.4.0" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", - "dependencies": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "license": "MIT", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -142,70 +107,17 @@ "node": ">= 8" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", - "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==" - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dependencies": { - "tweetnacl": "^0.14.3" - } + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "license": "MIT", "engines": { "node": ">=8" }, @@ -213,15 +125,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -231,6 +139,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -241,89 +150,24 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" }, "node_modules/camel-case": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "license": "MIT", "dependencies": { "pascal-case": "^3.1.2", "tslib": "^2.0.3" } }, - "node_modules/camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - }, - "node_modules/center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", - "dependencies": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/charset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", - "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/cheerio": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.19.0.tgz", - "integrity": "sha512-Fwcm3zkR37STnPC8FepSHeSYJM5Rd596TZOcfDUdojR4Q735aK1Xn+M+ISagNneuCwMjK28w4kX+ETILGNT/UQ==", - "dependencies": { - "css-select": "~1.0.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "~3.8.1", - "lodash": "^3.2.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cheerio/node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -343,21 +187,11 @@ "fsevents": "~2.3.2" } }, - "node_modules/clap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", - "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", - "dependencies": { - "chalk": "^1.1.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/clean-css": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "license": "MIT", "dependencies": { "source-map": "~0.6.0" }, @@ -365,50 +199,11 @@ "node": ">= 10.0" } }, - "node_modules/cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", - "dependencies": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "node_modules/coa": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", - "integrity": "sha512-KAGck/eNAmCL0dcT3BiuYwLbExK6lduR8DxM3C1TyDzaXhZHyZ8ooX5I5+na2e3dPFuibfxrGdorr0/Lr7RYCQ==", - "dependencies": { - "q": "^1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "license": "MIT", "engines": { "node": ">=14" } @@ -416,230 +211,135 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/configstore": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-1.4.0.tgz", - "integrity": "sha512-Zcx2SVdZC06IuRHd2MhkVYFNJBkZBj166LGdsJXRcqNC8Gs5Bwh8mosStNeCBBmtIm4wNii2uarD50qztjKOjw==", - "dependencies": { - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "object-assign": "^4.0.1", - "os-tmpdir": "^1.0.0", - "osenv": "^0.1.0", - "uuid": "^2.0.1", - "write-file-atomic": "^1.1.2", - "xdg-basedir": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/configstore/node_modules/uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha512-FULf7fayPdpASncVy4DLh3xydlXEJJpvIELjYjNeQWYUZ9pclcpvCZSr2gkmN2FrrGcI7G/cJsIEwk5/8vfXpg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details." - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "node_modules/css-select": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.0.0.tgz", - "integrity": "sha512-/xPlD7betkfd7ChGkLGGWx5HWyiHDOSn7aACLzdH0nwucPvB0EAm8hMBm7Xn7vGfAeRRN7KZ8wumGm8NoNcMRw==", - "dependencies": { - "boolbase": "~1.0.0", - "css-what": "1.0", - "domutils": "1.4", - "nth-check": "~1.0.0" - } - }, - "node_modules/css-what": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-1.0.0.tgz", - "integrity": "sha512-60SUMPBreXrLXgvpM8kYpO0AOyMRhdRlXFX5BMQbZq1SIJCyNE56nqFQhmvREQdUJpedbGRYZ5wOyq3/F6q5Zw==", - "engines": { - "node": "*" - } - }, - "node_modules/csso": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-2.0.0.tgz", - "integrity": "sha512-tckZA0LhyEnToPoQDmncCA+TUS3aoIVl/MsSaoipR52Sfa+H83fJvIHRVOHMFn9zW6kIV1L0D7tUDFFjvN28lg==", - "dependencies": { - "clap": "^1.0.9", - "source-map": "^0.5.3" - }, - "bin": { - "csso": "bin/csso" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/csso/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" }, "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "ms": "^2.1.3" + }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "license": "MIT", "dependencies": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/dom-serializer/node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" } }, "node_modules/dom-serializer/node_modules/entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" }, "node_modules/domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", + "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==", + "license": "BSD-2-Clause", "dependencies": { - "domelementtype": "1" + "domelementtype": "^2.0.1" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" } }, "node_modules/domutils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.4.3.tgz", - "integrity": "sha512-ZkVgS/PpxjyJMb+S2iVHHEZjVnOUtjGp0/zstqKGTE9lrZtNHlNQmLwP/lhLMEApYbzc08BKMx9IFpKhaSbW1w==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "license": "BSD-2-Clause", "dependencies": { - "domelementtype": "1" + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/domutils/node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" } }, "node_modules/dot-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" } }, - "node_modules/duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dependencies": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "node_modules/duplexify/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "node_modules/duplexify/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/duplexify/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/duplexify/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, @@ -647,58 +347,23 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/es6-promise": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-2.3.0.tgz", - "integrity": "sha512-oyOjMhyKMLEjOOtvkwg0G4pAzLQ9WdbbeX7WdqKzvYXu+UFgD0Zo/Brq5Q49zNmnGPPzV5rmYvrr0jz1zWx8Iw==" - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/escape-goat": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-3.0.0.tgz", + "integrity": "sha512-w3PwNZJwRxlp47QGzhuEBldEqVHHhh8/tIPcl6ecf2Bou99cdAt0knihBV0Ecc7CGxYduXVBDheH1K2oADRlvw==", + "license": "MIT", "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "node": ">=10" }, - "engines": { - "node": ">=0.10.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -706,32 +371,12 @@ "node": ">=8" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -740,18 +385,11 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -759,75 +397,11 @@ "node": ">= 6" } }, - "node_modules/got": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/got/-/got-3.3.1.tgz", - "integrity": "sha512-7chPlc0pWHjvq7B6dEEXz4GphoDupOvBSSl6AwRsAJX7GPTZ+bturaZiIigX4Dp6KrAP67nvzuKkNc0SLA0DKg==", - "dependencies": { - "duplexify": "^3.2.0", - "infinity-agent": "^2.0.0", - "is-redirect": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "nested-error-stacks": "^1.0.0", - "object-assign": "^3.0.0", - "prepend-http": "^1.0.0", - "read-all-stream": "^3.0.0", - "timed-out": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/got/node_modules/object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha512-jHP15vXVGeVh1HuaA2wY6lxk+whK/x4KBG88VXeRma7CCun7iGD5qPc4eYykQ9sdQvg8jkwFKsSxHln2ybW3xQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", "engines": { "node": ">=4" } @@ -836,6 +410,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", + "license": "MIT", "dependencies": { "camel-case": "^4.1.2", "clean-css": "~5.3.2", @@ -853,117 +428,40 @@ } }, "node_modules/htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-5.0.1.tgz", + "integrity": "sha512-vKZZra6CSe9qsJzh0BjBGXo8dvzNsq/oGvsjfRdOrrryfeD9UOBEEQdeoqCRmKZchF5h2zOBMQ6YuQ0uRUmdbQ==", + "license": "MIT", "dependencies": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - } - }, - "node_modules/htmlparser2/node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" + "domelementtype": "^2.0.1", + "domhandler": "^3.3.0", + "domutils": "^2.4.2", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/fb55/htmlparser2?sponsor=1" } }, "node_modules/htmlparser2/node_modules/entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==" - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/infinity-agent": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/infinity-agent/-/infinity-agent-2.0.3.tgz", - "integrity": "sha512-CnfUJe5o2S9aAQWXGMhDZI4UL39MAJV3guOTfHHIdos4tuVHkl1j/J+1XLQn+CLIvqcpgQR/p+xXYXzcrhCe5w==" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "node_modules/inliner": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/inliner/-/inliner-1.13.1.tgz", - "integrity": "sha512-yoS+56puOu+Ug8FBRtxtTFnEn2NHqFs8BNQgSOvzh3J0ommbwNw8VKiaVNYjWK6fgPuByq95KyV0LC+qV9IwLw==", - "dependencies": { - "ansi-escapes": "^1.4.0", - "ansi-styles": "^2.2.1", - "chalk": "^1.1.3", - "charset": "^1.0.0", - "cheerio": "^0.19.0", - "debug": "^2.2.0", - "es6-promise": "^2.3.0", - "iconv-lite": "^0.4.11", - "jschardet": "^1.3.0", - "lodash.assign": "^3.2.0", - "lodash.defaults": "^3.1.2", - "lodash.foreach": "^3.0.3", - "mime": "^1.3.4", - "minimist": "^1.1.3", - "request": "^2.74.0", - "svgo": "^0.6.6", - "then-fs": "^2.0.0", - "uglify-js": "^2.8.0", - "update-notifier": "^0.5.0" - }, - "bin": { - "inliner": "cli/index.js" - } + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "license": "ISC" }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -971,34 +469,20 @@ "node": ">=8" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1006,310 +490,41 @@ "node": ">=0.10.0" } }, - "node_modules/is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha512-9r39FIr3d+KD9SbX0sfMsHzb5PP3uimOiwr3YupUaUFG4W0l1U57Rx3utpttV7qz5U3jmrO5auUa04LU9pyHsg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } }, - "node_modules/is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha512-cr/SlUEe5zOGmzvj9bUyC4LVvkNVAXu4GytXLNMr1pny+a65MpQ9IJzFHD5vi7FyJgb4qt27+eS3TuQnqB+RQw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "node_modules/js-yaml": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", - "integrity": "sha512-BLv3oxhfET+w5fjPwq3PsAsxzi9i3qzU//HMpWVz0A6KplF86HdR9x2TGnv9DXhSUrO7LO8czUiTd3yb3mLSvg==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^2.6.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, - "node_modules/jschardet": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.6.0.tgz", - "integrity": "sha512-xYuhvQ7I9PDJIGBWev9xm0+SMSed3ZDBAmvVjbFR1ZRLAF+vlXcQu6cRI9uAlj81rzikElRVteehwV7DuX2ZmQ==", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/latest-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-1.0.1.tgz", - "integrity": "sha512-HERbxp4SBlmI380+eM0B0u4nxjfTaPeydIMzl9+9UQ4nSu3xMWKlX9WoT34e4wy7VWe67c53Nv9qPVjS8fHKgg==", - "dependencies": { - "package-json": "^1.0.0" - }, - "bin": { - "latest-version": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha512-9mDDwqVIma6OZX79ZlDACZl8sBm0TEnkf99zV3iMA4GzkIT/9hiqP5mY0HoT1iNLCrKc/R1HByV+yJfRWVJryQ==" - }, - "node_modules/lodash._arrayeach": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz", - "integrity": "sha512-Mn7HidOVcl3mkQtbPsuKR0Fj0N6Q6DQB77CtYncZcJc0bx5qv2q4Gl6a0LC1AN+GSxpnBDNnK3CKEm9XNA4zqQ==" - }, - "node_modules/lodash._baseassign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "integrity": "sha512-t3N26QR2IdSN+gqSy9Ds9pBu/J1EAFEshKlUHpJG3rvyJOYgcELIxcIeKKfZk7sjOz11cFfzJRsyFry/JyabJQ==", - "dependencies": { - "lodash._basecopy": "^3.0.0", - "lodash.keys": "^3.0.0" - } - }, - "node_modules/lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha512-rFR6Vpm4HeCK1WPGvjZSJ+7yik8d8PVUdCJx5rT2pogG4Ve/2ZS7kfmO5l5T2o5V2mqlNIfSF5MZlr1+xOoYQQ==" - }, - "node_modules/lodash._baseeach": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz", - "integrity": "sha512-IqUZ9MQo2UT1XPGuBntInqTOlc+oV+bCo0kMp+yuKGsfvRSNgUW0YjWVZUrG/gs+8z/Eyuc0jkJjOBESt9BXxg==", - "dependencies": { - "lodash.keys": "^3.0.0" - } - }, - "node_modules/lodash._bindcallback": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha512-2wlI0JRAGX8WEf4Gm1p/mv/SZ+jLijpj0jyaE/AXeuQphzCgD8ZQW4oSpoN8JAopujOFGU3KMuq7qfHBWlGpjQ==" - }, - "node_modules/lodash._createassigner": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", - "integrity": "sha512-LziVL7IDnJjQeeV95Wvhw6G28Z8Q6da87LWKOPWmzBLv4u6FAT/x5v00pyGW0u38UoogNF2JnD3bGgZZDaNEBw==", - "dependencies": { - "lodash._bindcallback": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash.restparam": "^3.0.0" - } - }, - "node_modules/lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==" - }, - "node_modules/lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha512-De+ZbrMu6eThFti/CSzhRvTKMgQToLxbij58LMfM8JnYDNSOjkjTCIaa8ixglOeGh2nyPlakbt5bJWJ7gvpYlQ==" - }, - "node_modules/lodash.assign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", - "integrity": "sha512-/VVxzgGBmbphasTg51FrztxQJ/VgAUpol6zmJuSVSGcNg4g7FA4z7rQV8Ovr9V3vFBNWZhvKWHfpAytjTVUfFA==", - "dependencies": { - "lodash._baseassign": "^3.0.0", - "lodash._createassigner": "^3.0.0", - "lodash.keys": "^3.0.0" - } - }, - "node_modules/lodash.defaults": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz", - "integrity": "sha512-X7135IXFQt5JDFnYxOVAzVz+kFvwDn3N8DJYf+nrz/mMWEuSu7+OL6rWqsk3+VR1T4TejFCSu5isBJOLSID2bg==", - "dependencies": { - "lodash.assign": "^3.0.0", - "lodash.restparam": "^3.0.0" - } - }, - "node_modules/lodash.foreach": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-3.0.3.tgz", - "integrity": "sha512-PA7Lp7pe2HMJBoB1vELegEIF3waUFnM0fWDKJVYolwZ4zHh6WTmnq0xmzfQksD66gx2quhDNyBdyaE2T8/DP3Q==", - "dependencies": { - "lodash._arrayeach": "^3.0.0", - "lodash._baseeach": "^3.0.0", - "lodash._bindcallback": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "node_modules/lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==" - }, - "node_modules/lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha512-JwObCrNJuT0Nnbuecmqr5DgtuBppuCvGD9lxjFpAzwnVtdGoDQ1zig+5W8k5/6Gcn0gZ3936HDAlGd28i7sOGQ==" - }, - "node_modules/lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha512-CuBsapFjcubOGMn3VD+24HOAPxM79tH+V6ivJL3CHYjtrawauDJHUk//Yew9Hvc6e9rbCrURGk8z6PC+8WJBfQ==", - "dependencies": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "node_modules/lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==" - }, - "node_modules/longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "license": "MIT", "dependencies": { "tslib": "^2.0.3" } }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "license": "MIT", "bin": { "mime": "cli.js" }, "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" + "node": ">=4.0.0" } }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1317,42 +532,17 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/nested-error-stacks": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-1.0.2.tgz", - "integrity": "sha512-o32anp9JA7oezPOFSfG2BBXSdHepOm5FpJvwxHWDtfJ3Bg3xdi68S6ijPlEOfUg6quxZWyvJM+8fHk1yMDKspA==", - "dependencies": { - "inherits": "~2.0.1" - } + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "license": "MIT", "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" @@ -1362,6 +552,7 @@ "version": "3.1.7", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz", "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==", + "license": "MIT", "dependencies": { "chokidar": "^3.5.2", "debug": "^4", @@ -1385,112 +576,11 @@ "url": "https://opencollective.com/nodemon" } }, - "node_modules/nodemon/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/nodemon/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/nodemon/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dependencies": { - "boolbase": "~1.0.0" - } - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "engines": { - "node": "*" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "deprecated": "This package is no longer supported.", - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "node_modules/package-json": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-1.2.0.tgz", - "integrity": "sha512-knDtirWWqKVJrLY3gEBLflVvueTMpyjbAwX/9j/EKi2DsjNemp5voS8cyKyGh57SNaMJNhNRZbIaWdneOcLU1g==", - "dependencies": { - "got": "^3.2.0", - "registry-url": "^3.0.0" - }, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1499,6 +589,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "license": "MIT", "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -1508,20 +599,17 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -1529,155 +617,17 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "node_modules/promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dependencies": { - "asap": "~2.0.3" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", - "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/read-all-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", - "integrity": "sha512-DI1drPHbmBcUDWrJ7ull/F2Qb8HkwBncVx8/RpKYFSIACYaVRQReISYPdZz/mt1y1+qMCOrfReTopERmaxtP6w==", - "dependencies": { - "pinkie-promise": "^2.0.0", - "readable-stream": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-all-stream/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "node_modules/read-all-stream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/read-all-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/read-all-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -1685,122 +635,20 @@ "node": ">=8.10.0" } }, - "node_modules/registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", - "dependencies": { - "rc": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", + "license": "MIT", "engines": { "node": ">= 0.10" } }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/repeating": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", - "integrity": "sha512-Nh30JLeMHdoI+AsQ5eblhZ7YlTsM9wiJQe/AHIunlK3KWzvXhXb36IJ7K1IOeRjIOtzMjdUHjwXUFxKJoPTSOg==", - "dependencies": { - "is-finite": "^1.0.0" - }, - "bin": { - "repeating": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", - "dependencies": { - "align-text": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -1808,29 +656,11 @@ "node": ">=10" } }, - "node_modules/semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha512-gL8F8L4ORwsS0+iQ34yCYv///jsOq0ZL7WP55d1HnJ32o7tyFYEFQZQA22mrLIacZdU6xecaBBZ+uEiffGNyXw==", - "dependencies": { - "semver": "^5.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -1838,18 +668,11 @@ "node": ">=10" } }, - "node_modules/slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==", - "engines": { - "node": "*" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -1858,113 +681,29 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stream-shift": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==" - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" - }, - "node_modules/string-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", - "integrity": "sha512-MNCACnufWUf3pQ57O5WTBMkKhzYIaKEcUioO0XHrTMafrbBaNk4IyDOLHBv5xbXO0jLLdsYWeFjpjG2hVHRDtw==", - "dependencies": { - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/svgo": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.6.6.tgz", - "integrity": "sha512-C5A1r5SjFesNoKsmc+kWBxmB04iBGH2D/nFy8HJaME9+SyZKcmqcN8QG+GwxIc7D2+JWhaaW7uaM9+XwfplTEQ==", - "deprecated": "This SVGO version is no longer supported. Upgrade to v2.x.x.", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", "dependencies": { - "coa": "~1.0.1", - "colors": "~1.1.2", - "csso": "~2.0.0", - "js-yaml": "~3.6.0", - "mkdirp": "~0.5.1", - "sax": "~1.2.1", - "whet.extend": "~0.9.9" - }, - "bin": { - "svgo": "bin/svgo" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, "node_modules/terser": { - "version": "5.34.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.0.tgz", - "integrity": "sha512-y5NUX+U9HhVsK/zihZwoq4r9dICLyV2jXGOriDAVOeKhq3LKVjgJbGO90FisozXLlJfvjHqgckGmJFBb9KYoWQ==", + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -1981,28 +720,14 @@ "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "node_modules/then-fs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/then-fs/-/then-fs-2.0.0.tgz", - "integrity": "sha512-5ffcBcU+vFUCYDNi/o507IqjqrTkuGsLVZ1Fp50hwgZRY7ufVFa9jFfTy5uZ2QnSKacKigWKeaXkOqLa4DsjLw==", - "dependencies": { - "promise": ">=3.2 <8" - } - }, - "node_modules/timed-out": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-2.0.0.tgz", - "integrity": "sha512-pqqJOi1rF5zNs/ps4vmbE4SFCrM4iR7LW+GHAsHqO/EumqbIWceioevYLM5xZRgQSH6gFgL9J/uB7EcJhQ9niQ==", - "engines": { - "node": ">=0.10.0" - } + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -2014,196 +739,46 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "license": "ISC", "bin": { "nodetouch": "bin/nodetouch.js" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, - "node_modules/uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", - "dependencies": { - "source-map": "~0.5.1", - "yargs": "~3.10.0" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - }, - "optionalDependencies": { - "uglify-to-browserify": "~1.0.0" - } - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", - "optional": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "license": "MIT" }, - "node_modules/update-notifier": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-0.5.0.tgz", - "integrity": "sha512-zOGOlUKDAgDlLHLv7Oiszz3pSj8fKlSJ3i0u49sEakjXUEVJ6DMjo/Mh/B6mg2eOALvRTJkd0kbChcipQoYCng==", + "node_modules/valid-data-url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/valid-data-url/-/valid-data-url-3.0.1.tgz", + "integrity": "sha512-jOWVmzVceKlVVdwjNSenT4PbGghU0SBIizAev8ofZVgivk/TVHXSbNL8LP6M3spZvkR9/QolkyJavGSX5Cs0UA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/web-resource-inliner": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/web-resource-inliner/-/web-resource-inliner-7.0.0.tgz", + "integrity": "sha512-NlfnGF8MY9ZUwFjyq3vOUBx7KwF8bmE+ywR781SB0nWB6MoMxN4BA8gtgP1KGTZo/O/AyWJz7HZpR704eaj4mg==", + "license": "MIT", "dependencies": { - "chalk": "^1.0.0", - "configstore": "^1.0.0", - "is-npm": "^1.0.0", - "latest-version": "^1.0.0", - "repeating": "^1.1.2", - "semver-diff": "^2.0.0", - "string-length": "^1.0.0" + "ansi-colors": "^4.1.1", + "escape-goat": "^3.0.0", + "htmlparser2": "^5.0.0", + "mime": "^2.4.6", + "valid-data-url": "^3.0.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - }, - "node_modules/whet.extend": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", - "integrity": "sha512-mmIPAft2vTgEILgPeZFqE/wWh24SEsR/k+N9fJ3Jxrz44iDFy9aemCxdksfURSHYFCLmvs/d/7Iso5XjPpNfrA==", - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha512-SdrHoC/yVBPpV0Xq/mUZQIpW2sWXAShb/V4pomcJXh92RuaO+f3UTWItiR3Px+pLnV2PvC2/bfn5cwr5X6Vfxw==", - "dependencies": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "node_modules/xdg-basedir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", - "integrity": "sha512-NF1pPn594TaRSUO/HARoB4jK8I+rWgcpVlpQCK6/6o5PHyLUt2CSiDrpUZbQ6rROck+W2EwF8mBJcTs+W98J9w==", - "dependencies": { - "os-homedir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", - "dependencies": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" + "node": ">=10.0.0" } } } diff --git a/package.json b/package.json index 9d095c82c..eb05066ea 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dependencies": { "clean-css": "^5.3.3", "html-minifier-terser": "^7.2.0", - "inliner": "^1.13.1", + "web-resource-inliner": "^7.0.0", "nodemon": "^3.1.7" } } diff --git a/tools/cdata.js b/tools/cdata.js index d65573a8e..014609f0e 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -17,7 +17,7 @@ const fs = require("node:fs"); const path = require("path"); -const inliner = require("inliner"); +const inline = require("web-resource-inliner"); const zlib = require("node:zlib"); const CleanCSS = require("clean-css"); const minifyHtml = require("html-minifier-terser").minify; @@ -127,21 +127,26 @@ async function minify(str, type = "plain") { async function writeHtmlGzipped(sourceFile, resultFile, page) { console.info("Reading " + sourceFile); - new inliner(sourceFile, async function (error, html) { - if (error) throw error; + inline.html({ + fileContent: fs.readFileSync(sourceFile, "utf8"), + relativeTo: path.dirname(sourceFile), + strict: true, + }, + async function (error, html) { + if (error) throw error; - html = adoptVersionAndRepo(html); - const originalLength = html.length; - html = await minify(html, "html-minify"); - const result = zlib.gzipSync(html, { level: zlib.constants.Z_BEST_COMPRESSION }); - console.info("Minified and compressed " + sourceFile + " from " + originalLength + " to " + result.length + " bytes"); - const array = hexdump(result); - let src = singleHeader; - src += `const uint16_t PAGE_${page}_L = ${result.length};\n`; - src += `const uint8_t PAGE_${page}[] PROGMEM = {\n${array}\n};\n\n`; - console.info("Writing " + resultFile); - fs.writeFileSync(resultFile, src); - }); + html = adoptVersionAndRepo(html); + const originalLength = html.length; + html = await minify(html, "html-minify"); + const result = zlib.gzipSync(html, { level: zlib.constants.Z_BEST_COMPRESSION }); + console.info("Minified and compressed " + sourceFile + " from " + originalLength + " to " + result.length + " bytes"); + const array = hexdump(result); + let src = singleHeader; + src += `const uint16_t PAGE_${page}_L = ${result.length};\n`; + src += `const uint8_t PAGE_${page}[] PROGMEM = {\n${array}\n};\n\n`; + console.info("Writing " + resultFile); + fs.writeFileSync(resultFile, src); + }); } async function specToChunk(srcDir, s) { From 4f1965fbaa6690d2de477d4d2de2512f77d10e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sat, 23 Nov 2024 11:24:03 +0100 Subject: [PATCH 002/109] Add ability to configure settings PIN at compile time --- wled00/wled.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wled00/wled.h b/wled00/wled.h index 2b3a77d24..45d9dd5da 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -214,6 +214,10 @@ using PSRAMDynamicJsonDocument = BasicJsonDocument; #define WLED_AP_PASS DEFAULT_AP_PASS #endif +#ifndef WLED_PIN + #define WLED_PIN "" +#endif + #ifndef SPIFFS_EDITOR_AIRCOOOKIE #error You are not using the Aircoookie fork of the ESPAsyncWebserver library.\ Using upstream puts your WiFi password at risk of being served by the filesystem.\ @@ -556,10 +560,10 @@ WLED_GLOBAL byte macroLongPress[WLED_MAX_BUTTONS] _INIT({0}); WLED_GLOBAL byte macroDoublePress[WLED_MAX_BUTTONS] _INIT({0}); // Security CONFIG -WLED_GLOBAL bool otaLock _INIT(false); // prevents OTA firmware updates without password. ALWAYS enable if system exposed to any public networks -WLED_GLOBAL bool wifiLock _INIT(false); // prevents access to WiFi settings when OTA lock is enabled -WLED_GLOBAL bool aOtaEnabled _INIT(true); // ArduinoOTA allows easy updates directly from the IDE. Careful, it does not auto-disable when OTA lock is on -WLED_GLOBAL char settingsPIN[5] _INIT(""); // PIN for settings pages +WLED_GLOBAL bool otaLock _INIT(false); // prevents OTA firmware updates without password. ALWAYS enable if system exposed to any public networks +WLED_GLOBAL bool wifiLock _INIT(false); // prevents access to WiFi settings when OTA lock is enabled +WLED_GLOBAL bool aOtaEnabled _INIT(true); // ArduinoOTA allows easy updates directly from the IDE. Careful, it does not auto-disable when OTA lock is on +WLED_GLOBAL char settingsPIN[5] _INIT(WLED_PIN); // PIN for settings pages WLED_GLOBAL bool correctPIN _INIT(true); WLED_GLOBAL unsigned long lastEditTime _INIT(0); From 855e6061631df03ee297eba900d60230bbbc6e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sun, 24 Nov 2024 17:17:17 +0100 Subject: [PATCH 003/109] Fix 1st use --- wled00/wled.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/wled.h b/wled00/wled.h index 45d9dd5da..62c3a3f09 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -564,7 +564,7 @@ WLED_GLOBAL bool otaLock _INIT(false); // prevents OTA firmware updat WLED_GLOBAL bool wifiLock _INIT(false); // prevents access to WiFi settings when OTA lock is enabled WLED_GLOBAL bool aOtaEnabled _INIT(true); // ArduinoOTA allows easy updates directly from the IDE. Careful, it does not auto-disable when OTA lock is on WLED_GLOBAL char settingsPIN[5] _INIT(WLED_PIN); // PIN for settings pages -WLED_GLOBAL bool correctPIN _INIT(true); +WLED_GLOBAL bool correctPIN _INIT(!strlen(settingsPIN)); WLED_GLOBAL unsigned long lastEditTime _INIT(0); WLED_GLOBAL uint16_t userVar0 _INIT(0), userVar1 _INIT(0); //available for use in usermod From 2c583c3071926a15411efa1349e1a3916e6572fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Mon, 25 Nov 2024 22:56:22 +0100 Subject: [PATCH 004/109] Allow editing WiFi settings --- wled00/wled_server.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index e8cbb41ae..6dac16ab4 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -567,13 +567,14 @@ void serveSettings(AsyncWebServerRequest* request, bool post) { //else if (url.indexOf("/edit") >= 0) subPage = 10; else subPage = SUBPAGE_WELCOME; - if (!correctPIN && strlen(settingsPIN) > 0 && (subPage > 0 && subPage < 11)) { + bool pinRequired = !correctPIN && strlen(settingsPIN) > 0 && (subPage > (WLED_WIFI_CONFIGURED ? SUBPAGE_MENU : SUBPAGE_WIFI) && subPage < SUBPAGE_LOCK); + if (pinRequired) { originalSubPage = subPage; subPage = SUBPAGE_PINREQ; // require PIN } // if OTA locked or too frequent PIN entry requests fail hard - if ((subPage == SUBPAGE_WIFI && wifiLock && otaLock) || (post && !correctPIN && millis()-lastEditTime < PIN_RETRY_COOLDOWN)) + if ((subPage == SUBPAGE_WIFI && wifiLock && otaLock) || (post && pinRequired && millis()-lastEditTime < PIN_RETRY_COOLDOWN)) { serveMessage(request, 401, FPSTR(s_accessdenied), FPSTR(s_unlock_ota), 254); return; } @@ -609,7 +610,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) { if (!s2[0]) strcpy_P(s2, s_redirecting); bool redirectAfter9s = (subPage == SUBPAGE_WIFI || ((subPage == SUBPAGE_SEC || subPage == SUBPAGE_UM) && doReboot)); - serveMessage(request, (correctPIN ? 200 : 401), s, s2, redirectAfter9s ? 129 : (correctPIN ? 1 : 3)); + serveMessage(request, (!pinRequired ? 200 : 401), s, s2, redirectAfter9s ? 129 : (!pinRequired ? 1 : 3)); return; } } From 7236589037a9c987cf75874398507cdcb2f2050e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Mon, 25 Nov 2024 22:57:21 +0100 Subject: [PATCH 005/109] Allow pre-compiled OTA password --- wled00/wled.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wled00/wled.h b/wled00/wled.h index 62c3a3f09..74719a6f2 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -278,7 +278,11 @@ WLED_GLOBAL char releaseString[] _INIT(TOSTRING(WLED_RELEASE_NAME)); // somehow // AP and OTA default passwords (for maximum security change them!) WLED_GLOBAL char apPass[65] _INIT(WLED_AP_PASS); +#ifdef WLED_OTA_PASS +WLED_GLOBAL char otaPass[33] _INIT(WLED_OTA_PASS); +#else WLED_GLOBAL char otaPass[33] _INIT(DEFAULT_OTA_PASS); +#endif // Hardware and pin config #ifndef BTNPIN @@ -560,7 +564,11 @@ WLED_GLOBAL byte macroLongPress[WLED_MAX_BUTTONS] _INIT({0}); WLED_GLOBAL byte macroDoublePress[WLED_MAX_BUTTONS] _INIT({0}); // Security CONFIG +#ifdef WLED_OTA_PASS +WLED_GLOBAL bool otaLock _INIT(true); // prevents OTA firmware updates without password. ALWAYS enable if system exposed to any public networks +#else WLED_GLOBAL bool otaLock _INIT(false); // prevents OTA firmware updates without password. ALWAYS enable if system exposed to any public networks +#endif WLED_GLOBAL bool wifiLock _INIT(false); // prevents access to WiFi settings when OTA lock is enabled WLED_GLOBAL bool aOtaEnabled _INIT(true); // ArduinoOTA allows easy updates directly from the IDE. Careful, it does not auto-disable when OTA lock is on WLED_GLOBAL char settingsPIN[5] _INIT(WLED_PIN); // PIN for settings pages From b8685f2c39b78286dddd1ad03e19284c9978dde4 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sat, 14 Sep 2024 15:09:47 -0400 Subject: [PATCH 006/109] Convert usermods to static libraries Redesign the usermod system so that usermods are implemented as PlatformIO libraries instead of headers. This permits them to call for dependencies, and eliminates the compiler flags for enabling each one, allowing the build cache to behave better. The usermod list is built using some linker magic to construct a static list in ROM memory. This eliminates the need for wasting SRAM on something fixed at build time. --- pio-scripts/load_usermods.py | 9 + platformio.ini | 35 +- .../{audio_reactive.h => audio_reactive.cpp} | 4 +- usermods/audioreactive/library.json | 17 + usermods/usermod_v2_auto_save/library.json | 8 + ...2_auto_save.h => usermod_v2_auto_save.cpp} | 3 + wled00/fcn_declare.h | 11 +- wled00/um_manager.cpp | 72 +-- wled00/usermod_v2_empty.h | 18 - wled00/usermods_list.cpp | 482 ------------------ wled00/wled.cpp | 3 - 11 files changed, 100 insertions(+), 562 deletions(-) create mode 100644 pio-scripts/load_usermods.py rename usermods/audioreactive/{audio_reactive.h => audio_reactive.cpp} (99%) create mode 100644 usermods/audioreactive/library.json create mode 100644 usermods/usermod_v2_auto_save/library.json rename usermods/usermod_v2_auto_save/{usermod_v2_auto_save.h => usermod_v2_auto_save.cpp} (99%) delete mode 100644 wled00/usermod_v2_empty.h delete mode 100644 wled00/usermods_list.cpp diff --git a/pio-scripts/load_usermods.py b/pio-scripts/load_usermods.py new file mode 100644 index 000000000..ac7611319 --- /dev/null +++ b/pio-scripts/load_usermods.py @@ -0,0 +1,9 @@ +Import('env') +usermods = env.GetProjectOption("custom_usermods","") +if usermods: + proj = env.GetProjectConfig() + deps = env.GetProjectOption('lib_deps') + src_dir = proj.get("platformio", "src_dir") + src_dir = src_dir.replace('\\','/') + usermods = [f"{mod} = symlink://{src_dir}/../usermods/{mod}" for mod in usermods.split(" ")] + proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) diff --git a/platformio.ini b/platformio.ini index 0870cde9d..1597343db 100644 --- a/platformio.ini +++ b/platformio.ini @@ -114,6 +114,7 @@ extra_scripts = post:pio-scripts/output_bins.py post:pio-scripts/strip-floats.py pre:pio-scripts/user_config_copy.py + pre:pio-scripts/load_usermods.py pre:pio-scripts/build_ui.py ; post:pio-scripts/obj-dump.py ;; convenience script to create a disassembly dump of the firmware (hardcore debugging) @@ -170,8 +171,6 @@ lib_deps = ;https://github.com/netmindz/animartrix.git#18bf17389e57c69f11bc8d04ebe1d215422c7fb7 # SHT85 ;robtillaart/SHT85@~0.3.3 - # Audioreactive usermod - ;kosme/arduinoFFT @ 2.0.1 extra_scripts = ${scripts_defaults.extra_scripts} @@ -261,11 +260,11 @@ lib_deps = https://github.com/lorol/LITTLEFS.git https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ${env.lib_deps} -# additional build flags for audioreactive -AR_build_flags = -D USERMOD_AUDIOREACTIVE - -D sqrt_internal=sqrtf ;; -fsingle-precision-constant ;; forces ArduinoFFT to use float math (2x faster) -AR_lib_deps = kosme/arduinoFFT @ 2.0.1 board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs +# additional build flags for audioreactive - must be applied globally +AR_build_flags = -D sqrt_internal=sqrtf ;; -fsingle-precision-constant ;; forces ArduinoFFT to use float math (2x faster) +AR_lib_deps = kosme/arduinoFFT @ 2.0.1 ;; for pre-usermod-library platformio_override compatibility + [esp32_idf_V4] ;; experimental build environment for ESP32 using ESP-IDF 4.4.x / arduino-esp32 v2.0.5 @@ -424,11 +423,11 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME= board = esp32dev platform = ${esp32.platform} platform_packages = ${esp32.platform_packages} +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32\" #-D WLED_DISABLE_BROWNOUT_DET ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} - ${esp32.AR_lib_deps} monitor_filters = esp32_exception_decoder board_build.partitions = ${esp32.default_partitions} @@ -436,11 +435,11 @@ board_build.partitions = ${esp32.default_partitions} board = esp32dev platform = ${esp32_idf_V4.platform} platform_packages = ${esp32_idf_V4.platform_packages} +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_8M\" #-D WLED_DISABLE_BROWNOUT_DET ${esp32.AR_build_flags} lib_deps = ${esp32_idf_V4.lib_deps} - ${esp32.AR_lib_deps} monitor_filters = esp32_exception_decoder board_build.partitions = ${esp32.large_partitions} board_upload.flash_size = 8MB @@ -452,11 +451,11 @@ board_upload.maximum_size = 8388608 board = esp32dev platform = ${esp32_idf_V4.platform} platform_packages = ${esp32_idf_V4.platform_packages} +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_16M\" #-D WLED_DISABLE_BROWNOUT_DET ${esp32.AR_build_flags} lib_deps = ${esp32_idf_V4.lib_deps} - ${esp32.AR_lib_deps} monitor_filters = esp32_exception_decoder board_build.partitions = ${esp32.extreme_partitions} board_upload.flash_size = 16MB @@ -468,11 +467,11 @@ board_build.flash_mode = dio ;board = esp32dev ;platform = ${esp32.platform} ;platform_packages = ${esp32.platform_packages} +;custom_usermods = audioreactive ;build_unflags = ${common.build_unflags} ;build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_audioreactive\" #-D WLED_DISABLE_BROWNOUT_DET ; ${esp32.AR_build_flags} ;lib_deps = ${esp32.lib_deps} -; ${esp32.AR_lib_deps} ;monitor_filters = esp32_exception_decoder ;board_build.partitions = ${esp32.default_partitions} ;; board_build.f_flash = 80000000L @@ -483,12 +482,12 @@ board = esp32-poe platform = ${esp32.platform} platform_packages = ${esp32.platform_packages} upload_speed = 921600 +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_Ethernet\" -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 ; -D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} - ${esp32.AR_lib_deps} board_build.partitions = ${esp32.default_partitions} [env:esp32_wrover] @@ -499,14 +498,14 @@ board = ttgo-t7-v14-mini32 board_build.f_flash = 80000000L board_build.flash_mode = qio board_build.partitions = ${esp32.extended_partitions} +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_WROVER\" -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue ;; Older ESP32 (rev.<3) need a PSRAM fix (increases static RAM used) https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/external-ram.html -D DATA_PINS=25 ${esp32.AR_build_flags} lib_deps = ${esp32_idf_V4.lib_deps} - ${esp32.AR_lib_deps} - + [env:esp32c3dev] extends = esp32c3 platform = ${esp32c3.platform} @@ -530,6 +529,7 @@ board_build.arduino.memory_type = qio_opi ;; use with PSRAM: 8MB or 16MB platform = ${esp32s3.platform} platform_packages = ${esp32s3.platform_packages} upload_speed = 921600 +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_16MB_opi\" -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 @@ -538,7 +538,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= -DBOARD_HAS_PSRAM ${esp32.AR_build_flags} lib_deps = ${esp32s3.lib_deps} - ${esp32.AR_lib_deps} board_build.partitions = ${esp32.extreme_partitions} board_upload.flash_size = 16MB board_upload.maximum_size = 16777216 @@ -553,6 +552,7 @@ board_build.arduino.memory_type = qio_opi ;; use with PSRAM: 8MB or 16MB platform = ${esp32s3.platform} platform_packages = ${esp32s3.platform_packages} upload_speed = 921600 +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_8MB_opi\" -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 @@ -561,7 +561,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= -DBOARD_HAS_PSRAM ${esp32.AR_build_flags} lib_deps = ${esp32s3.lib_deps} - ${esp32.AR_lib_deps} board_build.partitions = ${esp32.large_partitions} board_build.f_flash = 80000000L board_build.flash_mode = qio @@ -575,6 +574,7 @@ platform_packages = ${esp32s3.platform_packages} board = esp32s3camlcd ;; this is the only standard board with "opi_opi" board_build.arduino.memory_type = opi_opi upload_speed = 921600 +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_WROOM-2\" -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 @@ -587,7 +587,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= ${esp32.AR_build_flags} -D SR_DMTYPE=1 -D I2S_SDPIN=13 -D I2S_CKPIN=14 -D I2S_WSPIN=15 -D MCLK_PIN=4 ;; I2S mic lib_deps = ${esp32s3.lib_deps} - ${esp32.AR_lib_deps} board_build.partitions = ${esp32.extreme_partitions} board_upload.flash_size = 16MB @@ -600,6 +599,7 @@ board = lolin_s3_mini ;; -S3 mini, 4MB flash 2MB PSRAM platform = ${esp32s3.platform} platform_packages = ${esp32s3.platform_packages} upload_speed = 921600 +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S3_4M_qspi\" -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") @@ -608,7 +608,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= -D WLED_WATCHDOG_TIMEOUT=0 ${esp32.AR_build_flags} lib_deps = ${esp32s3.lib_deps} - ${esp32.AR_lib_deps} board_build.partitions = ${esp32.default_partitions} board_build.f_flash = 80000000L board_build.flash_mode = qio @@ -621,6 +620,7 @@ board = lolin_s2_mini board_build.partitions = ${esp32.default_partitions} board_build.flash_mode = qio board_build.f_flash = 80000000L +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s2.build_flags} -D WLED_RELEASE_NAME=\"ESP32-S2\" -DARDUINO_USB_CDC_ON_BOOT=1 @@ -639,4 +639,3 @@ build_flags = ${common.build_flags} ${esp32s2.build_flags} -D WLED_RELEASE_NAME= ; -D STATUSLED=15 ${esp32.AR_build_flags} lib_deps = ${esp32s2.lib_deps} - ${esp32.AR_lib_deps} diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.cpp similarity index 99% rename from usermods/audioreactive/audio_reactive.h rename to usermods/audioreactive/audio_reactive.cpp index 9c463e0a1..a5bf782ad 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.cpp @@ -1,4 +1,3 @@ -#pragma once #include "wled.h" @@ -2064,3 +2063,6 @@ const char AudioReactive::_digitalmic[] PROGMEM = "digitalmic"; const char AudioReactive::_addPalettes[] PROGMEM = "add-palettes"; const char AudioReactive::UDP_SYNC_HEADER[] PROGMEM = "00002"; // new sync header version, as format no longer compatible with previous structure const char AudioReactive::UDP_SYNC_HEADER_v1[] PROGMEM = "00001"; // old sync header version - need to add backwards-compatibility feature + +static AudioReactive ar_module; +REGISTER_USERMOD(ar_module); diff --git a/usermods/audioreactive/library.json b/usermods/audioreactive/library.json new file mode 100644 index 000000000..658bf9432 --- /dev/null +++ b/usermods/audioreactive/library.json @@ -0,0 +1,17 @@ +{ + "name": "audioreactive", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + }, + "dependencies": [ + { + "owner": "kosme", + "name": "arduinoFFT", + "version": "2.0.1", + "platforms": "espressif32" + } + ] +} \ No newline at end of file diff --git a/usermods/usermod_v2_auto_save/library.json b/usermods/usermod_v2_auto_save/library.json new file mode 100644 index 000000000..40676ed55 --- /dev/null +++ b/usermods/usermod_v2_auto_save/library.json @@ -0,0 +1,8 @@ +{ + "name": "auto_save", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+" + } +} \ No newline at end of file diff --git a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp similarity index 99% rename from usermods/usermod_v2_auto_save/usermod_v2_auto_save.h rename to usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp index a257413b4..2dae867da 100644 --- a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h +++ b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp @@ -275,3 +275,6 @@ const char AutoSaveUsermod::_autoSaveEnabled[] PROGMEM = "enabled"; const char AutoSaveUsermod::_autoSaveAfterSec[] PROGMEM = "autoSaveAfterSec"; const char AutoSaveUsermod::_autoSavePreset[] PROGMEM = "autoSavePreset"; const char AutoSaveUsermod::_autoSaveApplyOnBoot[] PROGMEM = "autoSaveApplyOnBoot"; + +static AutoSaveUsermod autosave; +REGISTER_USERMOD(autosave); diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index cb21e8c2e..cfb18c25b 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -381,7 +381,7 @@ class Usermod { protected: um_data_t *um_data; // um_data should be allocated using new in (derived) Usermod's setup() or constructor public: - Usermod() { um_data = nullptr; } + Usermod() : um_data(nullptr) {}; virtual ~Usermod() { if (um_data) delete um_data; } virtual void setup() = 0; // pure virtual, has to be overriden virtual void loop() = 0; // pure virtual, has to be overriden @@ -418,8 +418,6 @@ class Usermod { }; namespace UsermodManager { - extern byte numMods; - void loop(); void handleOverlayDraw(); bool handleButton(uint8_t b); @@ -441,13 +439,12 @@ namespace UsermodManager { #endif void onUpdateBegin(bool); void onStateChange(uint8_t); - bool add(Usermod* um); Usermod* lookup(uint16_t mod_id); - inline byte getModCount() {return numMods;}; + size_t getModCount(); }; -//usermods_list.cpp -void registerUsermods(); +// Register usermods by building a static list via a linker section +#define REGISTER_USERMOD(x) Usermod* const um_##x __attribute__((__section__(".dtors.tbl.usermods.1"), used)) = &x //usermod.cpp void userSetup(); diff --git a/wled00/um_manager.cpp b/wled00/um_manager.cpp index 1fdb6d688..9bfb7e737 100644 --- a/wled00/um_manager.cpp +++ b/wled00/um_manager.cpp @@ -3,75 +3,81 @@ * Registration and management utility for v2 usermods */ -static Usermod* ums[WLED_MAX_USERMODS] = {nullptr}; -byte UsermodManager::numMods = 0; +// Global usermod instance list +// Table begin and end references +// Zero-length arrays -- so they'll get assigned addresses, but consume no flash +// The numeric suffix ensures they're put in the right place; the linker script will sort them +// We stick them in the '.dtors' segment because it's always included by the linker scripts +// even though it never gets called. Who calls exit() in an embedded program anyways? +// If someone ever does, though, it'll explode as these aren't function pointers. +static Usermod * const _usermod_table_begin[0] __attribute__((__section__(".dtors.tbl.usermods.0"), unused)) = {}; +static Usermod * const _usermod_table_end[0] __attribute__((__section__(".dtors.tbl.usermods.99"), unused)) = {}; + +static size_t getCount() { + return &_usermod_table_end[0] - &_usermod_table_begin[0]; +} + //Usermod Manager internals -void UsermodManager::setup() { for (unsigned i = 0; i < numMods; i++) ums[i]->setup(); } -void UsermodManager::connected() { for (unsigned i = 0; i < numMods; i++) ums[i]->connected(); } -void UsermodManager::loop() { for (unsigned i = 0; i < numMods; i++) ums[i]->loop(); } -void UsermodManager::handleOverlayDraw() { for (unsigned i = 0; i < numMods; i++) ums[i]->handleOverlayDraw(); } -void UsermodManager::appendConfigData(Print& dest) { for (unsigned i = 0; i < numMods; i++) ums[i]->appendConfigData(dest); } +void UsermodManager::setup() { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->setup(); } +void UsermodManager::connected() { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->connected(); } +void UsermodManager::loop() { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->loop(); } +void UsermodManager::handleOverlayDraw() { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->handleOverlayDraw(); } +void UsermodManager::appendConfigData(Print& dest) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->appendConfigData(dest); } bool UsermodManager::handleButton(uint8_t b) { bool overrideIO = false; - for (unsigned i = 0; i < numMods; i++) { - if (ums[i]->handleButton(b)) overrideIO = true; + for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) { + if ((*mod)->handleButton(b)) overrideIO = true; } return overrideIO; } bool UsermodManager::getUMData(um_data_t **data, uint8_t mod_id) { - for (unsigned i = 0; i < numMods; i++) { - if (mod_id > 0 && ums[i]->getId() != mod_id) continue; // only get data form requested usermod if provided - if (ums[i]->getUMData(data)) return true; // if usermod does provide data return immediately (only one usermod can provide data at one time) + for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) { + if (mod_id > 0 && (*mod)->getId() != mod_id) continue; // only get data form requested usermod if provided + if ((*mod)->getUMData(data)) return true; // if usermod does provide data return immediately (only one usermod can provide data at one time) } return false; } -void UsermodManager::addToJsonState(JsonObject& obj) { for (unsigned i = 0; i < numMods; i++) ums[i]->addToJsonState(obj); } -void UsermodManager::addToJsonInfo(JsonObject& obj) { for (unsigned i = 0; i < numMods; i++) ums[i]->addToJsonInfo(obj); } -void UsermodManager::readFromJsonState(JsonObject& obj) { for (unsigned i = 0; i < numMods; i++) ums[i]->readFromJsonState(obj); } -void UsermodManager::addToConfig(JsonObject& obj) { for (unsigned i = 0; i < numMods; i++) ums[i]->addToConfig(obj); } +void UsermodManager::addToJsonState(JsonObject& obj) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->addToJsonState(obj); } +void UsermodManager::addToJsonInfo(JsonObject& obj) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->addToJsonInfo(obj); } +void UsermodManager::readFromJsonState(JsonObject& obj) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->readFromJsonState(obj); } +void UsermodManager::addToConfig(JsonObject& obj) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->addToConfig(obj); } bool UsermodManager::readFromConfig(JsonObject& obj) { bool allComplete = true; - for (unsigned i = 0; i < numMods; i++) { - if (!ums[i]->readFromConfig(obj)) allComplete = false; + for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) { + if (!(*mod)->readFromConfig(obj)) allComplete = false; } return allComplete; } #ifndef WLED_DISABLE_MQTT -void UsermodManager::onMqttConnect(bool sessionPresent) { for (unsigned i = 0; i < numMods; i++) ums[i]->onMqttConnect(sessionPresent); } +void UsermodManager::onMqttConnect(bool sessionPresent) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->onMqttConnect(sessionPresent); } bool UsermodManager::onMqttMessage(char* topic, char* payload) { - for (unsigned i = 0; i < numMods; i++) if (ums[i]->onMqttMessage(topic, payload)) return true; + for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) if ((*mod)->onMqttMessage(topic, payload)) return true; return false; } #endif #ifndef WLED_DISABLE_ESPNOW bool UsermodManager::onEspNowMessage(uint8_t* sender, uint8_t* payload, uint8_t len) { - for (unsigned i = 0; i < numMods; i++) if (ums[i]->onEspNowMessage(sender, payload, len)) return true; + for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) if ((*mod)->onEspNowMessage(sender, payload, len)) return true; return false; } #endif -void UsermodManager::onUpdateBegin(bool init) { for (unsigned i = 0; i < numMods; i++) ums[i]->onUpdateBegin(init); } // notify usermods that update is to begin -void UsermodManager::onStateChange(uint8_t mode) { for (unsigned i = 0; i < numMods; i++) ums[i]->onStateChange(mode); } // notify usermods that WLED state changed +void UsermodManager::onUpdateBegin(bool init) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->onUpdateBegin(init); } // notify usermods that update is to begin +void UsermodManager::onStateChange(uint8_t mode) { for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) (*mod)->onStateChange(mode); } // notify usermods that WLED state changed /* * Enables usermods to lookup another Usermod. */ Usermod* UsermodManager::lookup(uint16_t mod_id) { - for (unsigned i = 0; i < numMods; i++) { - if (ums[i]->getId() == mod_id) { - return ums[i]; + for (auto mod = _usermod_table_begin; mod < _usermod_table_end; ++mod) { + if ((*mod)->getId() == mod_id) { + return *mod; } } return nullptr; } -bool UsermodManager::add(Usermod* um) -{ - if (numMods >= WLED_MAX_USERMODS || um == nullptr) return false; - ums[numMods++] = um; - return true; -} - +size_t UsermodManager::getModCount() { return getCount(); }; /* Usermod v2 interface shim for oappend */ Print* Usermod::oappend_shim = nullptr; diff --git a/wled00/usermod_v2_empty.h b/wled00/usermod_v2_empty.h deleted file mode 100644 index 6537b56bc..000000000 --- a/wled00/usermod_v2_empty.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "wled.h" - -//This is an empty v2 usermod template. Please see the file usermod_v2_example.h in the EXAMPLE_v2 usermod folder for documentation on the functions you can use! - -class UsermodRenameMe : public Usermod { - private: - - public: - void setup() { - - } - - void loop() { - - } -}; \ No newline at end of file diff --git a/wled00/usermods_list.cpp b/wled00/usermods_list.cpp deleted file mode 100644 index 627fa6308..000000000 --- a/wled00/usermods_list.cpp +++ /dev/null @@ -1,482 +0,0 @@ -#include "wled.h" -/* - * Register your v2 usermods here! - * (for v1 usermods using just usermod.cpp, you can ignore this file) - */ - -/* - * Add/uncomment your usermod filename here (and once more below) - * || || || - * \/ \/ \/ - */ -//#include "../usermods/EXAMPLE_v2/usermod_v2_example.h" - -#ifdef USERMOD_BATTERY - #include "../usermods/Battery/usermod_v2_Battery.h" -#endif - -#ifdef USERMOD_DALLASTEMPERATURE - #include "../usermods/Temperature/usermod_temperature.h" -#endif - -#ifdef USERMOD_SHT -#include "../usermods/sht/usermod_sht.h" -#endif - -#ifdef USERMOD_SN_PHOTORESISTOR - #include "../usermods/SN_Photoresistor/usermod_sn_photoresistor.h" -#endif - -#ifdef USERMOD_PWM_FAN - // requires DALLASTEMPERATURE or SHT included before it - #include "../usermods/PWM_fan/usermod_PWM_fan.h" -#endif - -#ifdef USERMOD_BUZZER - #include "../usermods/buzzer/usermod_v2_buzzer.h" -#endif - -#ifdef USERMOD_SENSORSTOMQTT - #include "../usermods/sensors_to_mqtt/usermod_v2_SensorsToMqtt.h" -#endif - -#ifdef USERMOD_PIRSWITCH - #include "../usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h" -#endif - -#ifdef USERMOD_BH1750 - #include "../usermods/BH1750_v2/usermod_bh1750.h" -#endif - -// BME280 v2 usermod. Define "USERMOD_BME280" in my_config.h -#ifdef USERMOD_BME280 - #include "../usermods/BME280_v2/usermod_bme280.h" -#endif - -#ifdef USERMOD_BME68X - #include "../usermods/BME68X_v2/usermod_bme68x.h" -#endif - - -#ifdef USERMOD_FOUR_LINE_DISPLAY - #include "../usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h" -#endif - -#ifdef USERMOD_ROTARY_ENCODER_UI - #include "../usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h" -#endif - -#ifdef USERMOD_AUTO_SAVE - #include "../usermods/usermod_v2_auto_save/usermod_v2_auto_save.h" -#endif - -#ifdef USERMOD_DHT - #include "../usermods/DHT/usermod_dht.h" -#endif - -#ifdef USERMOD_VL53L0X_GESTURES - #include "../usermods/VL53L0X_gestures/usermod_vl53l0x_gestures.h" -#endif - -#ifdef USERMOD_ANIMATED_STAIRCASE - #include "../usermods/Animated_Staircase/Animated_Staircase.h" -#endif - -#ifdef USERMOD_MULTI_RELAY - #include "../usermods/multi_relay/usermod_multi_relay.h" -#endif - -#ifdef USERMOD_RTC - #include "../usermods/RTC/usermod_rtc.h" -#endif - -#ifdef USERMOD_ELEKSTUBE_IPS - #include "../usermods/EleksTube_IPS/usermod_elekstube_ips.h" -#endif - -#ifdef USERMOD_ROTARY_ENCODER_BRIGHTNESS_COLOR - #include "../usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.h" -#endif - -#ifdef RGB_ROTARY_ENCODER - #include "../usermods/rgb-rotary-encoder/rgb-rotary-encoder.h" -#endif - -#ifdef USERMOD_ST7789_DISPLAY - #include "../usermods/ST7789_display/ST7789_Display.h" -#endif - -#ifdef USERMOD_PIXELS_DICE_TRAY - #include "../usermods/pixels_dice_tray/pixels_dice_tray.h" -#endif - -#ifdef USERMOD_SEVEN_SEGMENT - #include "../usermods/seven_segment_display/usermod_v2_seven_segment_display.h" -#endif - -#ifdef USERMOD_SSDR - #include "../usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h" -#endif - -#ifdef USERMOD_CRONIXIE - #include "../usermods/Cronixie/usermod_cronixie.h" -#endif - -#ifdef QUINLED_AN_PENTA - #include "../usermods/quinled-an-penta/quinled-an-penta.h" -#endif - -#ifdef USERMOD_WIZLIGHTS - #include "../usermods/wizlights/wizlights.h" -#endif - -#ifdef USERMOD_WIREGUARD - #include "../usermods/wireguard/wireguard.h" -#endif - -#ifdef USERMOD_WORDCLOCK - #include "../usermods/usermod_v2_word_clock/usermod_v2_word_clock.h" -#endif - -#ifdef USERMOD_MY9291 - #include "../usermods/MY9291/usermode_MY9291.h" -#endif - -#ifdef USERMOD_SI7021_MQTT_HA - #include "../usermods/Si7021_MQTT_HA/usermod_si7021_mqtt_ha.h" -#endif - -#ifdef USERMOD_SMARTNEST - #include "../usermods/smartnest/usermod_smartnest.h" -#endif - -#ifdef USERMOD_AUDIOREACTIVE - #include "../usermods/audioreactive/audio_reactive.h" -#endif - -#ifdef USERMOD_ANALOG_CLOCK - #include "../usermods/Analog_Clock/Analog_Clock.h" -#endif - -#ifdef USERMOD_PING_PONG_CLOCK - #include "../usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.h" -#endif - -#ifdef USERMOD_ADS1115 - #include "../usermods/ADS1115_v2/usermod_ads1115.h" -#endif - -#ifdef USERMOD_KLIPPER_PERCENTAGE - #include "../usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.h" -#endif - -#ifdef USERMOD_BOBLIGHT - #include "../usermods/boblight/boblight.h" -#endif - -#ifdef USERMOD_ANIMARTRIX - #include "../usermods/usermod_v2_animartrix/usermod_v2_animartrix.h" -#endif - -#ifdef USERMOD_INTERNAL_TEMPERATURE - #include "../usermods/Internal_Temperature_v2/usermod_internal_temperature.h" -#endif - -#if defined(WLED_USE_SD_MMC) || defined(WLED_USE_SD_SPI) -// This include of SD.h and SD_MMC.h must happen here, else they won't be -// resolved correctly (when included in mod's header only) - #ifdef WLED_USE_SD_MMC - #include "SD_MMC.h" - #elif defined(WLED_USE_SD_SPI) - #include "SD.h" - #include "SPI.h" - #endif - #include "../usermods/sd_card/usermod_sd_card.h" -#endif - -#ifdef USERMOD_PWM_OUTPUTS - #include "../usermods/pwm_outputs/usermod_pwm_outputs.h" -#endif - -#ifdef USERMOD_HTTP_PULL_LIGHT_CONTROL - #include "../usermods/usermod_v2_HttpPullLightControl/usermod_v2_HttpPullLightControl.h" -#endif - -#ifdef USERMOD_MPU6050_IMU - #include "../usermods/mpu6050_imu/usermod_mpu6050_imu.h" -#endif - -#ifdef USERMOD_MPU6050_IMU - #include "../usermods/mpu6050_imu/usermod_gyro_surge.h" -#endif - -#ifdef USERMOD_LDR_DUSK_DAWN - #include "../usermods/LDR_Dusk_Dawn_v2/usermod_LDR_Dusk_Dawn_v2.h" -#endif - -#ifdef USERMOD_POV_DISPLAY - #include "../usermods/pov_display/usermod_pov_display.h" -#endif - -#ifdef USERMOD_STAIRCASE_WIPE - #include "../usermods/stairway_wipe_basic/stairway-wipe-usermod-v2.h" -#endif - -#ifdef USERMOD_MAX17048 - #include "../usermods/MAX17048_v2/usermod_max17048.h" -#endif - -#ifdef USERMOD_TETRISAI - #include "../usermods/TetrisAI_v2/usermod_v2_tetrisai.h" -#endif - -#ifdef USERMOD_AHT10 - #include "../usermods/AHT10_v2/usermod_aht10.h" -#endif - -#ifdef USERMOD_INA226 - #include "../usermods/INA226_v2/usermod_ina226.h" -#endif - -#ifdef USERMOD_LD2410 -#include "../usermods/LD2410_v2/usermod_ld2410.h" -#endif - - -#ifdef USERMOD_DEEP_SLEEP - #include "../usermods/deep_sleep/usermod_deep_sleep.h" -#endif - -void registerUsermods() -{ -/* - * Add your usermod class name here - * || || || - * \/ \/ \/ - */ - //UsermodManager::add(new MyExampleUsermod()); - - #ifdef USERMOD_BATTERY - UsermodManager::add(new UsermodBattery()); - #endif - - #ifdef USERMOD_DALLASTEMPERATURE - UsermodManager::add(new UsermodTemperature()); - #endif - - #ifdef USERMOD_SN_PHOTORESISTOR - UsermodManager::add(new Usermod_SN_Photoresistor()); - #endif - - #ifdef USERMOD_PWM_FAN - UsermodManager::add(new PWMFanUsermod()); - #endif - - #ifdef USERMOD_BUZZER - UsermodManager::add(new BuzzerUsermod()); - #endif - - #ifdef USERMOD_BH1750 - UsermodManager::add(new Usermod_BH1750()); - #endif - - #ifdef USERMOD_BME280 - UsermodManager::add(new UsermodBME280()); - #endif - - #ifdef USERMOD_BME68X - UsermodManager::add(new UsermodBME68X()); - #endif - - #ifdef USERMOD_SENSORSTOMQTT - UsermodManager::add(new UserMod_SensorsToMQTT()); - #endif - - #ifdef USERMOD_PIRSWITCH - UsermodManager::add(new PIRsensorSwitch()); - #endif - - #ifdef USERMOD_FOUR_LINE_DISPLAY - UsermodManager::add(new FourLineDisplayUsermod()); - #endif - - #ifdef USERMOD_ROTARY_ENCODER_UI - UsermodManager::add(new RotaryEncoderUIUsermod()); // can use USERMOD_FOUR_LINE_DISPLAY - #endif - - #ifdef USERMOD_AUTO_SAVE - UsermodManager::add(new AutoSaveUsermod()); // can use USERMOD_FOUR_LINE_DISPLAY - #endif - - #ifdef USERMOD_DHT - UsermodManager::add(new UsermodDHT()); - #endif - - #ifdef USERMOD_VL53L0X_GESTURES - UsermodManager::add(new UsermodVL53L0XGestures()); - #endif - - #ifdef USERMOD_ANIMATED_STAIRCASE - UsermodManager::add(new Animated_Staircase()); - #endif - - #ifdef USERMOD_MULTI_RELAY - UsermodManager::add(new MultiRelay()); - #endif - - #ifdef USERMOD_RTC - UsermodManager::add(new RTCUsermod()); - #endif - - #ifdef USERMOD_ELEKSTUBE_IPS - UsermodManager::add(new ElekstubeIPSUsermod()); - #endif - - #ifdef USERMOD_ROTARY_ENCODER_BRIGHTNESS_COLOR - UsermodManager::add(new RotaryEncoderBrightnessColor()); - #endif - - #ifdef RGB_ROTARY_ENCODER - UsermodManager::add(new RgbRotaryEncoderUsermod()); - #endif - - #ifdef USERMOD_ST7789_DISPLAY - UsermodManager::add(new St7789DisplayUsermod()); - #endif - - #ifdef USERMOD_PIXELS_DICE_TRAY - UsermodManager::add(new PixelsDiceTrayUsermod()); - #endif - - #ifdef USERMOD_SEVEN_SEGMENT - UsermodManager::add(new SevenSegmentDisplay()); - #endif - - #ifdef USERMOD_SSDR - UsermodManager::add(new UsermodSSDR()); - #endif - - #ifdef USERMOD_CRONIXIE - UsermodManager::add(new UsermodCronixie()); - #endif - - #ifdef QUINLED_AN_PENTA - UsermodManager::add(new QuinLEDAnPentaUsermod()); - #endif - - #ifdef USERMOD_WIZLIGHTS - UsermodManager::add(new WizLightsUsermod()); - #endif - - #ifdef USERMOD_WIREGUARD - UsermodManager::add(new WireguardUsermod()); - #endif - - #ifdef USERMOD_WORDCLOCK - UsermodManager::add(new WordClockUsermod()); - #endif - - #ifdef USERMOD_MY9291 - UsermodManager::add(new MY9291Usermod()); - #endif - - #ifdef USERMOD_SI7021_MQTT_HA - UsermodManager::add(new Si7021_MQTT_HA()); - #endif - - #ifdef USERMOD_SMARTNEST - UsermodManager::add(new Smartnest()); - #endif - - #ifdef USERMOD_AUDIOREACTIVE - UsermodManager::add(new AudioReactive()); - #endif - - #ifdef USERMOD_ANALOG_CLOCK - UsermodManager::add(new AnalogClockUsermod()); - #endif - - #ifdef USERMOD_PING_PONG_CLOCK - UsermodManager::add(new PingPongClockUsermod()); - #endif - - #ifdef USERMOD_ADS1115 - UsermodManager::add(new ADS1115Usermod()); - #endif - - #ifdef USERMOD_KLIPPER_PERCENTAGE - UsermodManager::add(new klipper_percentage()); - #endif - - #ifdef USERMOD_BOBLIGHT - UsermodManager::add(new BobLightUsermod()); - #endif - - #ifdef SD_ADAPTER - UsermodManager::add(new UsermodSdCard()); - #endif - - #ifdef USERMOD_PWM_OUTPUTS - UsermodManager::add(new PwmOutputsUsermod()); - #endif - - #ifdef USERMOD_SHT - UsermodManager::add(new ShtUsermod()); - #endif - - #ifdef USERMOD_ANIMARTRIX - UsermodManager::add(new AnimartrixUsermod("Animartrix", false)); - #endif - - #ifdef USERMOD_INTERNAL_TEMPERATURE - UsermodManager::add(new InternalTemperatureUsermod()); - #endif - - #ifdef USERMOD_HTTP_PULL_LIGHT_CONTROL - UsermodManager::add(new HttpPullLightControl()); - #endif - - #ifdef USERMOD_MPU6050_IMU - static MPU6050Driver mpu6050; UsermodManager::add(&mpu6050); - #endif - - #ifdef USERMOD_GYRO_SURGE - static GyroSurge gyro_surge; UsermodManager::add(&gyro_surge); - #endif - - #ifdef USERMOD_LDR_DUSK_DAWN - UsermodManager::add(new LDR_Dusk_Dawn_v2()); - #endif - - #ifdef USERMOD_STAIRCASE_WIPE - UsermodManager::add(new StairwayWipeUsermod()); - #endif - - #ifdef USERMOD_MAX17048 - UsermodManager::add(new Usermod_MAX17048()); - #endif - - #ifdef USERMOD_TETRISAI - UsermodManager::add(new TetrisAIUsermod()); - #endif - - #ifdef USERMOD_AHT10 - UsermodManager::add(new UsermodAHT10()); - #endif - - #ifdef USERMOD_INA226 - UsermodManager::add(new UsermodINA226()); - #endif - - #ifdef USERMOD_LD2410 - UsermodManager::add(new LD2410Usermod()); - #endif - - #ifdef USERMOD_POV_DISPLAY - UsermodManager::add(new PovDisplayUsermod()); - #endif - - #ifdef USERMOD_DEEP_SLEEP - usermods.add(new DeepSleepUsermod()); - #endif -} diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 1f978a39b..3b8c60095 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -424,9 +424,6 @@ void WLED::setup() PinManager::allocatePin(2, true, PinOwner::DMX); #endif - DEBUG_PRINTLN(F("Registering usermods ...")); - registerUsermods(); - DEBUG_PRINTF_P(PSTR("heap %u\n"), ESP.getFreeHeap()); bool fsinit = false; From 4d5e0ca7a3a1b9914621813f6cb8827dd33a5c32 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sat, 11 Jan 2025 13:31:20 -0500 Subject: [PATCH 007/109] load_usermods: Expand name search Look for 'usermod_v2_x' as well. This could be removed later if we clean up the folder names. --- pio-scripts/load_usermods.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pio-scripts/load_usermods.py b/pio-scripts/load_usermods.py index ac7611319..55b9c4b1b 100644 --- a/pio-scripts/load_usermods.py +++ b/pio-scripts/load_usermods.py @@ -1,9 +1,26 @@ Import('env') +import os + +def find_usermod(mod_dir: str, mod: str): + """Locate this library in the usermods folder. + We do this to avoid needing to rename a bunch of folders; + this could be removed later + """ + # Check name match + mp = f"{mod_dir}/{mod}" + if os.path.exists(mp): + return mp + mp = f"{mod_dir}/usermod_v2_{mod}" + if os.path.exists(mp): + return mp + raise RuntimeError(f"Couldn't locate module {mod} in usermods directory!") + usermods = env.GetProjectOption("custom_usermods","") if usermods: proj = env.GetProjectConfig() deps = env.GetProjectOption('lib_deps') src_dir = proj.get("platformio", "src_dir") src_dir = src_dir.replace('\\','/') - usermods = [f"{mod} = symlink://{src_dir}/../usermods/{mod}" for mod in usermods.split(" ")] + mod_paths = {mod: find_usermod(f"{src_dir}/../usermods", mod) for mod in usermods.split(" ")} + usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()] proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) From 71b0e8e93745bb906d0f1f6eb9d161c4a1499e3d Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sat, 11 Jan 2025 13:32:28 -0500 Subject: [PATCH 008/109] Convert AnimARTrix usermod to library Borrowed library definition from @netmindz's work on #4476. --- platformio.ini | 3 --- usermods/usermod_v2_animartrix/library.json | 12 ++++++++++++ usermods/usermod_v2_animartrix/readme.md | 6 +----- ...mod_v2_animartrix.h => usermod_v2_animartrix.cpp} | 5 ++--- 4 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 usermods/usermod_v2_animartrix/library.json rename usermods/usermod_v2_animartrix/{usermod_v2_animartrix.h => usermod_v2_animartrix.cpp} (99%) diff --git a/platformio.ini b/platformio.ini index 1597343db..4832978a9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -166,9 +166,6 @@ lib_deps = ; https://github.com/adafruit/Adafruit_MAX1704X @ 1.0.2 #For MPU6050 IMU uncomment follwoing ;electroniccats/MPU6050 @1.0.1 - # For -D USERMOD_ANIMARTRIX - # CC BY-NC 3.0 licensed effects by Stefan Petrick, include this usermod only if you accept the terms! - ;https://github.com/netmindz/animartrix.git#18bf17389e57c69f11bc8d04ebe1d215422c7fb7 # SHT85 ;robtillaart/SHT85@~0.3.3 diff --git a/usermods/usermod_v2_animartrix/library.json b/usermods/usermod_v2_animartrix/library.json new file mode 100644 index 000000000..f176e72ed --- /dev/null +++ b/usermods/usermod_v2_animartrix/library.json @@ -0,0 +1,12 @@ +{ + "name": "animartrix", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + }, + "dependencies": { + "Animartrix": "https://github.com/netmindz/animartrix.git#b172586" + } +} diff --git a/usermods/usermod_v2_animartrix/readme.md b/usermods/usermod_v2_animartrix/readme.md index 42d463c50..f0ff60a78 100644 --- a/usermods/usermod_v2_animartrix/readme.md +++ b/usermods/usermod_v2_animartrix/readme.md @@ -6,9 +6,5 @@ CC BY-NC 3.0 licensed effects by Stefan Petrick, include this usermod only if yo ## Installation -Please uncomment the two references to ANIMartRIX in your platform.ini - -lib_dep to a version of https://github.com/netmindz/animartrix.git -and the build_flags -D USERMOD_ANIMARTRIX - +Add 'animartrix' to 'custom_usermods' in your platformio_override.ini. diff --git a/usermods/usermod_v2_animartrix/usermod_v2_animartrix.h b/usermods/usermod_v2_animartrix/usermod_v2_animartrix.cpp similarity index 99% rename from usermods/usermod_v2_animartrix/usermod_v2_animartrix.h rename to usermods/usermod_v2_animartrix/usermod_v2_animartrix.cpp index d91cf6c96..d2968f2fb 100644 --- a/usermods/usermod_v2_animartrix/usermod_v2_animartrix.h +++ b/usermods/usermod_v2_animartrix/usermod_v2_animartrix.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include @@ -452,5 +450,6 @@ class AnimartrixUsermod : public Usermod { }; - +static AnimartrixUsermod animartrix_module("Animartrix", false); +REGISTER_USERMOD(animartrix_module); From 90b18158fc636f420a091893ea71075e86af72e5 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 21:14:20 +0000 Subject: [PATCH 009/109] Convert usermods from header to library --- .../Analog_Clock/{Analog_Clock.h => Analog_Clock.cpp} | 4 ++++ usermods/Analog_Clock/library.json | 9 +++++++++ .../{Animated_Staircase.h => Animated_Staircase.cpp} | 4 ++++ usermods/Animated_Staircase/library.json | 9 +++++++++ usermods/Battery/{usermod_v2_Battery.h => Battery.cpp} | 4 ++++ usermods/Battery/library.json | 9 +++++++++ usermods/Cronixie/{usermod_cronixie.h => Cronixie.cpp} | 5 ++++- usermods/Cronixie/library.json | 9 +++++++++ usermods/DHT/{usermod_dht.h => DHT.cpp} | 4 ++++ usermods/DHT/library.json | 9 +++++++++ .../{usermod_elekstube_ips.h => EleksTube_IPS.cpp} | 4 ++++ usermods/EleksTube_IPS/library.json | 9 +++++++++ .../{usermod_LDR_Dusk_Dawn_v2.h => LDR_Dusk_Dawn_v2.cpp} | 4 ++++ usermods/LDR_Dusk_Dawn_v2/library.json | 9 +++++++++ ...usermod_PIR_sensor_switch.h => PIR_sensor_switch.cpp} | 4 ++++ usermods/PIR_sensor_switch/library.json | 9 +++++++++ usermods/PWM_fan/{usermod_PWM_fan.h => PWM_fan.cpp} | 4 ++++ usermods/PWM_fan/library.json | 9 +++++++++ usermods/RTC/{usermod_rtc.h => RTC.cpp} | 5 ++++- usermods/RTC/library.json | 9 +++++++++ .../{usermod_sn_photoresistor.h => SN_Photoresistor.cpp} | 4 ++++ usermods/SN_Photoresistor/library.json | 9 +++++++++ .../{ST7789_display.h => ST7789_display.cpp} | 5 ++++- usermods/ST7789_display/library.json | 9 +++++++++ .../{usermod_si7021_mqtt_ha.h => Si7021_MQTT_HA.cpp} | 4 ++++ usermods/Si7021_MQTT_HA/library.json | 9 +++++++++ .../{usermod_temperature.h => Temperature.cpp} | 4 ++++ usermods/Temperature/library.json | 9 +++++++++ .../{usermod_vl53l0x_gestures.h => VL53L0X_gestures.cpp} | 5 ++++- usermods/VL53L0X_gestures/library.json | 9 +++++++++ usermods/boblight/{boblight.h => boblight.cpp} | 4 ++++ usermods/boblight/library.json | 9 +++++++++ usermods/buzzer/{usermod_v2_buzzer.h => buzzer.cpp} | 5 ++++- usermods/buzzer/library.json | 9 +++++++++ .../deep_sleep/{usermod_deep_sleep.h => deep_sleep.cpp} | 5 ++++- usermods/deep_sleep/library.json | 9 +++++++++ usermods/mpu6050_imu/library.json | 9 +++++++++ .../{usermod_mpu6050_imu.h => mpu6050_imu.cpp} | 4 ++++ usermods/multi_relay/library.json | 9 +++++++++ .../{usermod_multi_relay.h => multi_relay.cpp} | 4 ++++ usermods/pixels_dice_tray/library.json | 9 +++++++++ .../{pixels_dice_tray.h => pixels_dice_tray.cpp} | 4 ++++ usermods/pov_display/library.json | 9 +++++++++ .../{usermod_pov_display.h => pov_display.cpp} | 4 ++++ usermods/pwm_outputs/library.json | 9 +++++++++ .../{usermod_pwm_outputs.h => pwm_outputs.cpp} | 4 ++++ usermods/quinled-an-penta/library.json | 9 +++++++++ .../{quinled-an-penta.h => quinled-an-penta.cpp} | 5 ++++- usermods/rgb-rotary-encoder/library.json | 9 +++++++++ .../{rgb-rotary-encoder.h => rgb-rotary-encoder.cpp} | 5 ++++- usermods/sd_card/library.json | 9 +++++++++ usermods/sd_card/{usermod_sd_card.h => sd_card.cpp} | 5 ++++- usermods/seven_segment_display/library.json | 9 +++++++++ ...seven_segment_display.h => seven_segment_display.cpp} | 5 ++++- usermods/sht/library.json | 9 +++++++++ usermods/sht/{usermod_sht.h => sht.cpp} | 5 ++++- usermods/smartnest/library.json | 9 +++++++++ .../smartnest/{usermod_smartnest.h => smartnest.cpp} | 4 ++++ usermods/usermod_rotary_brightness_color/library.json | 9 +++++++++ ...tness_color.h => usermod_rotary_brightness_color.cpp} | 4 ++++ usermods/usermod_v2_HttpPullLightControl/library.json | 9 +++++++++ usermods/usermod_v2_four_line_display_ALT/library.json | 9 +++++++++ ...isplay_ALT.h => usermod_v2_four_line_display_ALT.cpp} | 4 ++++ usermods/usermod_v2_klipper_percentage/library.json | 9 +++++++++ ...er_percentage.h => usermod_v2_klipper_percentage.cpp} | 5 ++++- usermods/usermod_v2_ping_pong_clock/library.json | 9 +++++++++ ..._ping_pong_clock.h => usermod_v2_ping_pong_clock.cpp} | 4 ++++ usermods/usermod_v2_rotary_encoder_ui_ALT/library.json | 9 +++++++++ ...der_ui_ALT.h => usermod_v2_rotary_encoder_ui_ALT.cpp} | 4 ++++ usermods/usermod_v2_word_clock/library.json | 9 +++++++++ ...usermod_v2_word_clock.h => usermod_v2_word_clock.cpp} | 5 ++++- usermods/wireguard/library.json | 9 +++++++++ usermods/wireguard/{wireguard.h => wireguard.cpp} | 5 ++++- usermods/wizlights/library.json | 9 +++++++++ usermods/wizlights/{wizlights.h => wizlights.cpp} | 4 ++++ 75 files changed, 490 insertions(+), 14 deletions(-) rename usermods/Analog_Clock/{Analog_Clock.h => Analog_Clock.cpp} (99%) create mode 100644 usermods/Analog_Clock/library.json rename usermods/Animated_Staircase/{Animated_Staircase.h => Animated_Staircase.cpp} (99%) create mode 100644 usermods/Animated_Staircase/library.json rename usermods/Battery/{usermod_v2_Battery.h => Battery.cpp} (99%) create mode 100644 usermods/Battery/library.json rename usermods/Cronixie/{usermod_cronixie.h => Cronixie.cpp} (99%) create mode 100644 usermods/Cronixie/library.json rename usermods/DHT/{usermod_dht.h => DHT.cpp} (99%) create mode 100644 usermods/DHT/library.json rename usermods/EleksTube_IPS/{usermod_elekstube_ips.h => EleksTube_IPS.cpp} (98%) create mode 100644 usermods/EleksTube_IPS/library.json rename usermods/LDR_Dusk_Dawn_v2/{usermod_LDR_Dusk_Dawn_v2.h => LDR_Dusk_Dawn_v2.cpp} (98%) create mode 100644 usermods/LDR_Dusk_Dawn_v2/library.json rename usermods/PIR_sensor_switch/{usermod_PIR_sensor_switch.h => PIR_sensor_switch.cpp} (96%) create mode 100644 usermods/PIR_sensor_switch/library.json rename usermods/PWM_fan/{usermod_PWM_fan.h => PWM_fan.cpp} (99%) create mode 100644 usermods/PWM_fan/library.json rename usermods/RTC/{usermod_rtc.h => RTC.cpp} (96%) create mode 100644 usermods/RTC/library.json rename usermods/SN_Photoresistor/{usermod_sn_photoresistor.h => SN_Photoresistor.cpp} (98%) create mode 100644 usermods/SN_Photoresistor/library.json rename usermods/ST7789_display/{ST7789_display.h => ST7789_display.cpp} (99%) create mode 100644 usermods/ST7789_display/library.json rename usermods/Si7021_MQTT_HA/{usermod_si7021_mqtt_ha.h => Si7021_MQTT_HA.cpp} (99%) create mode 100644 usermods/Si7021_MQTT_HA/library.json rename usermods/Temperature/{usermod_temperature.h => Temperature.cpp} (99%) create mode 100644 usermods/Temperature/library.json rename usermods/VL53L0X_gestures/{usermod_vl53l0x_gestures.h => VL53L0X_gestures.cpp} (98%) create mode 100644 usermods/VL53L0X_gestures/library.json rename usermods/boblight/{boblight.h => boblight.cpp} (99%) create mode 100644 usermods/boblight/library.json rename usermods/buzzer/{usermod_v2_buzzer.h => buzzer.cpp} (97%) create mode 100644 usermods/buzzer/library.json rename usermods/deep_sleep/{usermod_deep_sleep.h => deep_sleep.cpp} (98%) create mode 100644 usermods/deep_sleep/library.json create mode 100644 usermods/mpu6050_imu/library.json rename usermods/mpu6050_imu/{usermod_mpu6050_imu.h => mpu6050_imu.cpp} (99%) create mode 100644 usermods/multi_relay/library.json rename usermods/multi_relay/{usermod_multi_relay.h => multi_relay.cpp} (99%) create mode 100644 usermods/pixels_dice_tray/library.json rename usermods/pixels_dice_tray/{pixels_dice_tray.h => pixels_dice_tray.cpp} (99%) create mode 100644 usermods/pov_display/library.json rename usermods/pov_display/{usermod_pov_display.h => pov_display.cpp} (96%) create mode 100644 usermods/pwm_outputs/library.json rename usermods/pwm_outputs/{usermod_pwm_outputs.h => pwm_outputs.cpp} (98%) create mode 100644 usermods/quinled-an-penta/library.json rename usermods/quinled-an-penta/{quinled-an-penta.h => quinled-an-penta.cpp} (99%) create mode 100644 usermods/rgb-rotary-encoder/library.json rename usermods/rgb-rotary-encoder/{rgb-rotary-encoder.h => rgb-rotary-encoder.cpp} (99%) create mode 100644 usermods/sd_card/library.json rename usermods/sd_card/{usermod_sd_card.h => sd_card.cpp} (99%) create mode 100644 usermods/seven_segment_display/library.json rename usermods/seven_segment_display/{usermod_v2_seven_segment_display.h => seven_segment_display.cpp} (99%) create mode 100644 usermods/sht/library.json rename usermods/sht/{usermod_sht.h => sht.cpp} (99%) create mode 100644 usermods/smartnest/library.json rename usermods/smartnest/{usermod_smartnest.h => smartnest.cpp} (98%) create mode 100644 usermods/usermod_rotary_brightness_color/library.json rename usermods/usermod_rotary_brightness_color/{usermod_rotary_brightness_color.h => usermod_rotary_brightness_color.cpp} (98%) create mode 100644 usermods/usermod_v2_HttpPullLightControl/library.json create mode 100644 usermods/usermod_v2_four_line_display_ALT/library.json rename usermods/usermod_v2_four_line_display_ALT/{usermod_v2_four_line_display_ALT.h => usermod_v2_four_line_display_ALT.cpp} (99%) create mode 100644 usermods/usermod_v2_klipper_percentage/library.json rename usermods/usermod_v2_klipper_percentage/{usermod_v2_klipper_percentage.h => usermod_v2_klipper_percentage.cpp} (97%) create mode 100644 usermods/usermod_v2_ping_pong_clock/library.json rename usermods/usermod_v2_ping_pong_clock/{usermod_v2_ping_pong_clock.h => usermod_v2_ping_pong_clock.cpp} (97%) create mode 100644 usermods/usermod_v2_rotary_encoder_ui_ALT/library.json rename usermods/usermod_v2_rotary_encoder_ui_ALT/{usermod_v2_rotary_encoder_ui_ALT.h => usermod_v2_rotary_encoder_ui_ALT.cpp} (99%) create mode 100644 usermods/usermod_v2_word_clock/library.json rename usermods/usermod_v2_word_clock/{usermod_v2_word_clock.h => usermod_v2_word_clock.cpp} (99%) create mode 100644 usermods/wireguard/library.json rename usermods/wireguard/{wireguard.h => wireguard.cpp} (98%) create mode 100644 usermods/wizlights/library.json rename usermods/wizlights/{wizlights.h => wizlights.cpp} (98%) diff --git a/usermods/Analog_Clock/Analog_Clock.h b/usermods/Analog_Clock/Analog_Clock.cpp similarity index 99% rename from usermods/Analog_Clock/Analog_Clock.h rename to usermods/Analog_Clock/Analog_Clock.cpp index 9d82f7670..8a4c048a8 100644 --- a/usermods/Analog_Clock/Analog_Clock.h +++ b/usermods/Analog_Clock/Analog_Clock.cpp @@ -254,3 +254,7 @@ public: return USERMOD_ID_ANALOG_CLOCK; } }; + + +static AnalogClockUsermod analog_clock; +REGISTER_USERMOD(analog_clock); \ No newline at end of file diff --git a/usermods/Analog_Clock/library.json b/usermods/Analog_Clock/library.json new file mode 100644 index 000000000..ddba3a76f --- /dev/null +++ b/usermods/Analog_Clock/library.json @@ -0,0 +1,9 @@ +{ + "name:": "Analog_Clock", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/Animated_Staircase/Animated_Staircase.h b/usermods/Animated_Staircase/Animated_Staircase.cpp similarity index 99% rename from usermods/Animated_Staircase/Animated_Staircase.h rename to usermods/Animated_Staircase/Animated_Staircase.cpp index 54a9b3331..43d9db6b4 100644 --- a/usermods/Animated_Staircase/Animated_Staircase.h +++ b/usermods/Animated_Staircase/Animated_Staircase.cpp @@ -562,3 +562,7 @@ const char Animated_Staircase::_bottomEcho_pin[] PROGMEM = "bottomEch const char Animated_Staircase::_topEchoCm[] PROGMEM = "top-dist-cm"; const char Animated_Staircase::_bottomEchoCm[] PROGMEM = "bottom-dist-cm"; const char Animated_Staircase::_togglePower[] PROGMEM = "toggle-on-off"; + + +static Animated_Staircase animated_staircase; +REGISTER_USERMOD(animated_staircase); \ No newline at end of file diff --git a/usermods/Animated_Staircase/library.json b/usermods/Animated_Staircase/library.json new file mode 100644 index 000000000..e37df3114 --- /dev/null +++ b/usermods/Animated_Staircase/library.json @@ -0,0 +1,9 @@ +{ + "name:": "Animated_Staircase", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/Battery/usermod_v2_Battery.h b/usermods/Battery/Battery.cpp similarity index 99% rename from usermods/Battery/usermod_v2_Battery.h rename to usermods/Battery/Battery.cpp index b36c5f4d6..4646a2384 100644 --- a/usermods/Battery/usermod_v2_Battery.h +++ b/usermods/Battery/Battery.cpp @@ -857,3 +857,7 @@ const char UsermodBattery::_preset[] PROGMEM = "preset"; const char UsermodBattery::_duration[] PROGMEM = "duration"; const char UsermodBattery::_init[] PROGMEM = "init"; const char UsermodBattery::_haDiscovery[] PROGMEM = "HA-discovery"; + + +static UsermodBattery battery; +REGISTER_USERMOD(battery); \ No newline at end of file diff --git a/usermods/Battery/library.json b/usermods/Battery/library.json new file mode 100644 index 000000000..bc0d97a11 --- /dev/null +++ b/usermods/Battery/library.json @@ -0,0 +1,9 @@ +{ + "name:": "Battery", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/Cronixie/usermod_cronixie.h b/usermods/Cronixie/Cronixie.cpp similarity index 99% rename from usermods/Cronixie/usermod_cronixie.h rename to usermods/Cronixie/Cronixie.cpp index 671c5d134..09e7e25ac 100644 --- a/usermods/Cronixie/usermod_cronixie.h +++ b/usermods/Cronixie/Cronixie.cpp @@ -299,4 +299,7 @@ class UsermodCronixie : public Usermod { { return USERMOD_ID_CRONIXIE; } -}; \ No newline at end of file +}; + +static UsermodCronixie cronixie; +REGISTER_USERMOD(cronixie); \ No newline at end of file diff --git a/usermods/Cronixie/library.json b/usermods/Cronixie/library.json new file mode 100644 index 000000000..f0d39d001 --- /dev/null +++ b/usermods/Cronixie/library.json @@ -0,0 +1,9 @@ +{ + "name:": "Cronixie", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/DHT/usermod_dht.h b/usermods/DHT/DHT.cpp similarity index 99% rename from usermods/DHT/usermod_dht.h rename to usermods/DHT/DHT.cpp index 05a7267b5..fad6dad5c 100644 --- a/usermods/DHT/usermod_dht.h +++ b/usermods/DHT/DHT.cpp @@ -245,3 +245,7 @@ class UsermodDHT : public Usermod { } }; + + +static UsermodDHT dht; +REGISTER_USERMOD(dht); \ No newline at end of file diff --git a/usermods/DHT/library.json b/usermods/DHT/library.json new file mode 100644 index 000000000..bb6773615 --- /dev/null +++ b/usermods/DHT/library.json @@ -0,0 +1,9 @@ +{ + "name:": "DHT", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/EleksTube_IPS/usermod_elekstube_ips.h b/usermods/EleksTube_IPS/EleksTube_IPS.cpp similarity index 98% rename from usermods/EleksTube_IPS/usermod_elekstube_ips.h rename to usermods/EleksTube_IPS/EleksTube_IPS.cpp index 0f7d92e7e..48fbb2b40 100644 --- a/usermods/EleksTube_IPS/usermod_elekstube_ips.h +++ b/usermods/EleksTube_IPS/EleksTube_IPS.cpp @@ -156,3 +156,7 @@ class ElekstubeIPSUsermod : public Usermod { const char ElekstubeIPSUsermod::_name[] PROGMEM = "EleksTubeIPS"; const char ElekstubeIPSUsermod::_tubeSeg[] PROGMEM = "tubeSegment"; const char ElekstubeIPSUsermod::_digitOffset[] PROGMEM = "digitOffset"; + + +static ElekstubeIPSUsermod elekstube_ips; +REGISTER_USERMOD(elekstube_ips); \ No newline at end of file diff --git a/usermods/EleksTube_IPS/library.json b/usermods/EleksTube_IPS/library.json new file mode 100644 index 000000000..d025fc78a --- /dev/null +++ b/usermods/EleksTube_IPS/library.json @@ -0,0 +1,9 @@ +{ + "name:": "EleksTube_IPS", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/LDR_Dusk_Dawn_v2/usermod_LDR_Dusk_Dawn_v2.h b/usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp similarity index 98% rename from usermods/LDR_Dusk_Dawn_v2/usermod_LDR_Dusk_Dawn_v2.h rename to usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp index 03f4c078a..6104fcab5 100644 --- a/usermods/LDR_Dusk_Dawn_v2/usermod_LDR_Dusk_Dawn_v2.h +++ b/usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp @@ -151,3 +151,7 @@ class LDR_Dusk_Dawn_v2 : public Usermod { }; const char LDR_Dusk_Dawn_v2::_name[] PROGMEM = "LDR_Dusk_Dawn_v2"; + + +static LDR_Dusk_Dawn_v2 ldr_dusk_dawn_v2; +REGISTER_USERMOD(ldr_dusk_dawn_v2); \ No newline at end of file diff --git a/usermods/LDR_Dusk_Dawn_v2/library.json b/usermods/LDR_Dusk_Dawn_v2/library.json new file mode 100644 index 000000000..6a08c9cca --- /dev/null +++ b/usermods/LDR_Dusk_Dawn_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "LDR_Dusk_Dawn_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h b/usermods/PIR_sensor_switch/PIR_sensor_switch.cpp similarity index 96% rename from usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h rename to usermods/PIR_sensor_switch/PIR_sensor_switch.cpp index 0deda181c..1cc31a08d 100644 --- a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h +++ b/usermods/PIR_sensor_switch/PIR_sensor_switch.cpp @@ -571,3 +571,7 @@ bool PIRsensorSwitch::readFromConfig(JsonObject &root) // use "return !top["newestParameter"].isNull();" when updating Usermod with new features return !(pins.isNull() || pins.size() != PIR_SENSOR_MAX_SENSORS); } + + +static PIRsensorSwitch pir_sensor_switch; +REGISTER_USERMOD(pir_sensor_switch); \ No newline at end of file diff --git a/usermods/PIR_sensor_switch/library.json b/usermods/PIR_sensor_switch/library.json new file mode 100644 index 000000000..152946e4c --- /dev/null +++ b/usermods/PIR_sensor_switch/library.json @@ -0,0 +1,9 @@ +{ + "name:": "PIR_sensor_switch", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/PWM_fan/usermod_PWM_fan.h b/usermods/PWM_fan/PWM_fan.cpp similarity index 99% rename from usermods/PWM_fan/usermod_PWM_fan.h rename to usermods/PWM_fan/PWM_fan.cpp index c3ef24fe4..9df373045 100644 --- a/usermods/PWM_fan/usermod_PWM_fan.h +++ b/usermods/PWM_fan/PWM_fan.cpp @@ -397,3 +397,7 @@ const char PWMFanUsermod::_maxPWMValuePct[] PROGMEM = "max-PWM-percent"; const char PWMFanUsermod::_IRQperRotation[] PROGMEM = "IRQs-per-rotation"; const char PWMFanUsermod::_speed[] PROGMEM = "speed"; const char PWMFanUsermod::_lock[] PROGMEM = "lock"; + + +static PWMFanUsermod pwm_fan; +REGISTER_USERMOD(pwm_fan); \ No newline at end of file diff --git a/usermods/PWM_fan/library.json b/usermods/PWM_fan/library.json new file mode 100644 index 000000000..a6d5ea64f --- /dev/null +++ b/usermods/PWM_fan/library.json @@ -0,0 +1,9 @@ +{ + "name:": "PWM_fan", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/RTC/usermod_rtc.h b/usermods/RTC/RTC.cpp similarity index 96% rename from usermods/RTC/usermod_rtc.h rename to usermods/RTC/RTC.cpp index 42965e3af..f9dbe3cf2 100644 --- a/usermods/RTC/usermod_rtc.h +++ b/usermods/RTC/RTC.cpp @@ -48,4 +48,7 @@ class RTCUsermod : public Usermod { { return USERMOD_ID_RTC; } -}; \ No newline at end of file +}; + +static RTCUsermod rtc; +REGISTER_USERMOD(rtc); \ No newline at end of file diff --git a/usermods/RTC/library.json b/usermods/RTC/library.json new file mode 100644 index 000000000..96aa095bb --- /dev/null +++ b/usermods/RTC/library.json @@ -0,0 +1,9 @@ +{ + "name:": "RTC", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/SN_Photoresistor/usermod_sn_photoresistor.h b/usermods/SN_Photoresistor/SN_Photoresistor.cpp similarity index 98% rename from usermods/SN_Photoresistor/usermod_sn_photoresistor.h rename to usermods/SN_Photoresistor/SN_Photoresistor.cpp index 45cdb66ad..5e50ab7a6 100644 --- a/usermods/SN_Photoresistor/usermod_sn_photoresistor.h +++ b/usermods/SN_Photoresistor/SN_Photoresistor.cpp @@ -210,3 +210,7 @@ const char Usermod_SN_Photoresistor::_referenceVoltage[] PROGMEM = "supplied-vol const char Usermod_SN_Photoresistor::_resistorValue[] PROGMEM = "resistor-value"; const char Usermod_SN_Photoresistor::_adcPrecision[] PROGMEM = "adc-precision"; const char Usermod_SN_Photoresistor::_offset[] PROGMEM = "offset"; + + +static Usermod_SN_Photoresistor sn_photoresistor; +REGISTER_USERMOD(sn_photoresistor); \ No newline at end of file diff --git a/usermods/SN_Photoresistor/library.json b/usermods/SN_Photoresistor/library.json new file mode 100644 index 000000000..fe5173bed --- /dev/null +++ b/usermods/SN_Photoresistor/library.json @@ -0,0 +1,9 @@ +{ + "name:": "SN_Photoresistor", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/ST7789_display/ST7789_display.h b/usermods/ST7789_display/ST7789_display.cpp similarity index 99% rename from usermods/ST7789_display/ST7789_display.h rename to usermods/ST7789_display/ST7789_display.cpp index 65f4cae5d..e81c53ba5 100644 --- a/usermods/ST7789_display/ST7789_display.h +++ b/usermods/ST7789_display/ST7789_display.cpp @@ -410,4 +410,7 @@ class St7789DisplayUsermod : public Usermod { //More methods can be added in the future, this example will then be extended. //Your usermod will remain compatible as it does not need to implement all methods from the Usermod base class! -}; \ No newline at end of file +}; + +static name. st7789_display; +REGISTER_USERMOD(st7789_display); \ No newline at end of file diff --git a/usermods/ST7789_display/library.json b/usermods/ST7789_display/library.json new file mode 100644 index 000000000..88f4efe78 --- /dev/null +++ b/usermods/ST7789_display/library.json @@ -0,0 +1,9 @@ +{ + "name:": "ST7789_display", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/Si7021_MQTT_HA/usermod_si7021_mqtt_ha.h b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp similarity index 99% rename from usermods/Si7021_MQTT_HA/usermod_si7021_mqtt_ha.h rename to usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp index 9f027382d..04f6d750d 100644 --- a/usermods/Si7021_MQTT_HA/usermod_si7021_mqtt_ha.h +++ b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp @@ -229,3 +229,7 @@ const char Si7021_MQTT_HA::_name[] PROGMEM = "Si7021 MQTT (Hom const char Si7021_MQTT_HA::_enabled[] PROGMEM = "enabled"; const char Si7021_MQTT_HA::_sendAdditionalSensors[] PROGMEM = "Send Dew Point, Abs. Humidity and Heat Index"; const char Si7021_MQTT_HA::_haAutoDiscovery[] PROGMEM = "Home Assistant MQTT Auto-Discovery"; + + +static Si7021_MQTT_HA si7021_mqtt_ha; +REGISTER_USERMOD(si7021_mqtt_ha); \ No newline at end of file diff --git a/usermods/Si7021_MQTT_HA/library.json b/usermods/Si7021_MQTT_HA/library.json new file mode 100644 index 000000000..2c18375f2 --- /dev/null +++ b/usermods/Si7021_MQTT_HA/library.json @@ -0,0 +1,9 @@ +{ + "name:": "Si7021_MQTT_HA", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/Temperature/usermod_temperature.h b/usermods/Temperature/Temperature.cpp similarity index 99% rename from usermods/Temperature/usermod_temperature.h rename to usermods/Temperature/Temperature.cpp index 178bc05a0..a17bd2d90 100644 --- a/usermods/Temperature/usermod_temperature.h +++ b/usermods/Temperature/Temperature.cpp @@ -471,3 +471,7 @@ static uint16_t mode_temperature() { SEGMENT.fill(SEGMENT.color_from_palette(i, false, false, 255)); return FRAMETIME; } + + +static UsermodTemperature temperature; +REGISTER_USERMOD(temperature); \ No newline at end of file diff --git a/usermods/Temperature/library.json b/usermods/Temperature/library.json new file mode 100644 index 000000000..56371db4e --- /dev/null +++ b/usermods/Temperature/library.json @@ -0,0 +1,9 @@ +{ + "name:": "Temperature", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/VL53L0X_gestures/usermod_vl53l0x_gestures.h b/usermods/VL53L0X_gestures/VL53L0X_gestures.cpp similarity index 98% rename from usermods/VL53L0X_gestures/usermod_vl53l0x_gestures.h rename to usermods/VL53L0X_gestures/VL53L0X_gestures.cpp index fe6b958f5..759c31c7c 100644 --- a/usermods/VL53L0X_gestures/usermod_vl53l0x_gestures.h +++ b/usermods/VL53L0X_gestures/VL53L0X_gestures.cpp @@ -126,4 +126,7 @@ class UsermodVL53L0XGestures : public Usermod { { return USERMOD_ID_VL53L0X; } -}; \ No newline at end of file +}; + +static UsermodVL53L0XGestures vl53l0x_gestures; +REGISTER_USERMOD(vl53l0x_gestures); \ No newline at end of file diff --git a/usermods/VL53L0X_gestures/library.json b/usermods/VL53L0X_gestures/library.json new file mode 100644 index 000000000..77521d6f3 --- /dev/null +++ b/usermods/VL53L0X_gestures/library.json @@ -0,0 +1,9 @@ +{ + "name:": "VL53L0X_gestures", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/boblight/boblight.h b/usermods/boblight/boblight.cpp similarity index 99% rename from usermods/boblight/boblight.h rename to usermods/boblight/boblight.cpp index b04b78fac..2a52fc156 100644 --- a/usermods/boblight/boblight.h +++ b/usermods/boblight/boblight.cpp @@ -457,3 +457,7 @@ void BobLightUsermod::pollBob() { } } } + + +static BobLightUsermod boblight; +REGISTER_USERMOD(boblight); \ No newline at end of file diff --git a/usermods/boblight/library.json b/usermods/boblight/library.json new file mode 100644 index 000000000..0b63b2247 --- /dev/null +++ b/usermods/boblight/library.json @@ -0,0 +1,9 @@ +{ + "name:": "boblight", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/buzzer/usermod_v2_buzzer.h b/usermods/buzzer/buzzer.cpp similarity index 97% rename from usermods/buzzer/usermod_v2_buzzer.h rename to usermods/buzzer/buzzer.cpp index ebd8dcb15..e421a2391 100644 --- a/usermods/buzzer/usermod_v2_buzzer.h +++ b/usermods/buzzer/buzzer.cpp @@ -78,4 +78,7 @@ class BuzzerUsermod : public Usermod { { return USERMOD_ID_BUZZER; } -}; \ No newline at end of file +}; + +static BuzzerUsermod buzzer; +REGISTER_USERMOD(buzzer); \ No newline at end of file diff --git a/usermods/buzzer/library.json b/usermods/buzzer/library.json new file mode 100644 index 000000000..78ba4152f --- /dev/null +++ b/usermods/buzzer/library.json @@ -0,0 +1,9 @@ +{ + "name:": "buzzer", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/deep_sleep/usermod_deep_sleep.h b/usermods/deep_sleep/deep_sleep.cpp similarity index 98% rename from usermods/deep_sleep/usermod_deep_sleep.h rename to usermods/deep_sleep/deep_sleep.cpp index 7f4efd5ca..741b618fd 100644 --- a/usermods/deep_sleep/usermod_deep_sleep.h +++ b/usermods/deep_sleep/deep_sleep.cpp @@ -224,4 +224,7 @@ void addToConfig(JsonObject& root) override // add more strings here to reduce flash memory usage const char DeepSleepUsermod::_name[] PROGMEM = "DeepSleep"; -const char DeepSleepUsermod::_enabled[] PROGMEM = "enabled"; \ No newline at end of file +const char DeepSleepUsermod::_enabled[] PROGMEM = "enabled"; + +static DeepSleepUsermod deep_sleep; +REGISTER_USERMOD(deep_sleep); \ No newline at end of file diff --git a/usermods/deep_sleep/library.json b/usermods/deep_sleep/library.json new file mode 100644 index 000000000..c15e8d577 --- /dev/null +++ b/usermods/deep_sleep/library.json @@ -0,0 +1,9 @@ +{ + "name:": "deep_sleep", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/mpu6050_imu/library.json b/usermods/mpu6050_imu/library.json new file mode 100644 index 000000000..bf86aed62 --- /dev/null +++ b/usermods/mpu6050_imu/library.json @@ -0,0 +1,9 @@ +{ + "name:": "mpu6050_imu", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/mpu6050_imu/usermod_mpu6050_imu.h b/usermods/mpu6050_imu/mpu6050_imu.cpp similarity index 99% rename from usermods/mpu6050_imu/usermod_mpu6050_imu.h rename to usermods/mpu6050_imu/mpu6050_imu.cpp index f04578fe3..2f8166cdd 100644 --- a/usermods/mpu6050_imu/usermod_mpu6050_imu.h +++ b/usermods/mpu6050_imu/mpu6050_imu.cpp @@ -446,3 +446,7 @@ const char MPU6050Driver::_z_acc_bias[] PROGMEM = "z_acc_bias"; const char MPU6050Driver::_x_gyro_bias[] PROGMEM = "x_gyro_bias"; const char MPU6050Driver::_y_gyro_bias[] PROGMEM = "y_gyro_bias"; const char MPU6050Driver::_z_gyro_bias[] PROGMEM = "z_gyro_bias"; + + +static MPU6050Driver mpu6050_imu; +REGISTER_USERMOD(mpu6050_imu); \ No newline at end of file diff --git a/usermods/multi_relay/library.json b/usermods/multi_relay/library.json new file mode 100644 index 000000000..47505d0b4 --- /dev/null +++ b/usermods/multi_relay/library.json @@ -0,0 +1,9 @@ +{ + "name:": "multi_relay", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/multi_relay/usermod_multi_relay.h b/usermods/multi_relay/multi_relay.cpp similarity index 99% rename from usermods/multi_relay/usermod_multi_relay.h rename to usermods/multi_relay/multi_relay.cpp index c4446c7a2..ea07e281e 100644 --- a/usermods/multi_relay/usermod_multi_relay.h +++ b/usermods/multi_relay/multi_relay.cpp @@ -842,3 +842,7 @@ const char MultiRelay::_pcfAddress[] PROGMEM = "PCF8574-address"; const char MultiRelay::_switch[] PROGMEM = "switch"; const char MultiRelay::_toggle[] PROGMEM = "toggle"; const char MultiRelay::_Command[] PROGMEM = "/command"; + + +static MultiRelay multi_relay; +REGISTER_USERMOD(multi_relay); \ No newline at end of file diff --git a/usermods/pixels_dice_tray/library.json b/usermods/pixels_dice_tray/library.json new file mode 100644 index 000000000..01776ffe2 --- /dev/null +++ b/usermods/pixels_dice_tray/library.json @@ -0,0 +1,9 @@ +{ + "name:": "pixels_dice_tray", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/pixels_dice_tray/pixels_dice_tray.h b/usermods/pixels_dice_tray/pixels_dice_tray.cpp similarity index 99% rename from usermods/pixels_dice_tray/pixels_dice_tray.h rename to usermods/pixels_dice_tray/pixels_dice_tray.cpp index 61348ebb8..07fd3d596 100644 --- a/usermods/pixels_dice_tray/pixels_dice_tray.h +++ b/usermods/pixels_dice_tray/pixels_dice_tray.cpp @@ -533,3 +533,7 @@ class PixelsDiceTrayUsermod : public Usermod { // extended. Your usermod will remain compatible as it does not need to // implement all methods from the Usermod base class! }; + + +static PixelsDiceTrayUsermod pixels_dice_tray; +REGISTER_USERMOD(pixels_dice_tray); \ No newline at end of file diff --git a/usermods/pov_display/library.json b/usermods/pov_display/library.json new file mode 100644 index 000000000..5998377b9 --- /dev/null +++ b/usermods/pov_display/library.json @@ -0,0 +1,9 @@ +{ + "name:": "pov_display", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/pov_display/usermod_pov_display.h b/usermods/pov_display/pov_display.cpp similarity index 96% rename from usermods/pov_display/usermod_pov_display.h rename to usermods/pov_display/pov_display.cpp index b1fc0dba6..c1bd143a0 100644 --- a/usermods/pov_display/usermod_pov_display.h +++ b/usermods/pov_display/pov_display.cpp @@ -83,3 +83,7 @@ class PovDisplayUsermod : public Usermod void connected() {} }; + + +static PovDisplayUsermod pov_display; +REGISTER_USERMOD(pov_display); \ No newline at end of file diff --git a/usermods/pwm_outputs/library.json b/usermods/pwm_outputs/library.json new file mode 100644 index 000000000..18ce7d883 --- /dev/null +++ b/usermods/pwm_outputs/library.json @@ -0,0 +1,9 @@ +{ + "name:": "pwm_outputs", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/pwm_outputs/usermod_pwm_outputs.h b/usermods/pwm_outputs/pwm_outputs.cpp similarity index 98% rename from usermods/pwm_outputs/usermod_pwm_outputs.h rename to usermods/pwm_outputs/pwm_outputs.cpp index 09232f043..72a78475c 100644 --- a/usermods/pwm_outputs/usermod_pwm_outputs.h +++ b/usermods/pwm_outputs/pwm_outputs.cpp @@ -219,3 +219,7 @@ class PwmOutputsUsermod : public Usermod { const char PwmOutputsUsermod::USERMOD_NAME[] PROGMEM = "PwmOutputs"; const char PwmOutputsUsermod::PWM_STATE_NAME[] PROGMEM = "pwm"; + + +static PwmOutputsUsermod pwm_outputs; +REGISTER_USERMOD(pwm_outputs); \ No newline at end of file diff --git a/usermods/quinled-an-penta/library.json b/usermods/quinled-an-penta/library.json new file mode 100644 index 000000000..274020d94 --- /dev/null +++ b/usermods/quinled-an-penta/library.json @@ -0,0 +1,9 @@ +{ + "name:": "quinled-an-penta", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/quinled-an-penta/quinled-an-penta.h b/usermods/quinled-an-penta/quinled-an-penta.cpp similarity index 99% rename from usermods/quinled-an-penta/quinled-an-penta.h rename to usermods/quinled-an-penta/quinled-an-penta.cpp index e44672039..612ade03b 100644 --- a/usermods/quinled-an-penta/quinled-an-penta.h +++ b/usermods/quinled-an-penta/quinled-an-penta.cpp @@ -752,4 +752,7 @@ const unsigned char QuinLEDAnPentaUsermod::quinLedLogo[] PROGMEM = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; \ No newline at end of file +}; + +static QuinLEDAnPentaUsermod quinled-an-penta; +REGISTER_USERMOD(quinled-an-penta); \ No newline at end of file diff --git a/usermods/rgb-rotary-encoder/library.json b/usermods/rgb-rotary-encoder/library.json new file mode 100644 index 000000000..c23606c0a --- /dev/null +++ b/usermods/rgb-rotary-encoder/library.json @@ -0,0 +1,9 @@ +{ + "name:": "rgb-rotary-encoder", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/rgb-rotary-encoder/rgb-rotary-encoder.h b/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp similarity index 99% rename from usermods/rgb-rotary-encoder/rgb-rotary-encoder.h rename to usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp index 00fc22725..3e7b96bb2 100644 --- a/usermods/rgb-rotary-encoder/rgb-rotary-encoder.h +++ b/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp @@ -340,4 +340,7 @@ const char RgbRotaryEncoderUsermod::_ebIo[] PROGMEM = "eb-pin"; const char RgbRotaryEncoderUsermod::_ledMode[] PROGMEM = "LED-Mode"; const char RgbRotaryEncoderUsermod::_ledBrightness[] PROGMEM = "LED-Brightness"; const char RgbRotaryEncoderUsermod::_stepsPerClick[] PROGMEM = "Steps-per-Click"; -const char RgbRotaryEncoderUsermod::_incrementPerClick[] PROGMEM = "Increment-per-Click"; \ No newline at end of file +const char RgbRotaryEncoderUsermod::_incrementPerClick[] PROGMEM = "Increment-per-Click"; + +static RgbRotaryEncoderUsermod rgb-rotary-encoder; +REGISTER_USERMOD(rgb-rotary-encoder); \ No newline at end of file diff --git a/usermods/sd_card/library.json b/usermods/sd_card/library.json new file mode 100644 index 000000000..777c6264f --- /dev/null +++ b/usermods/sd_card/library.json @@ -0,0 +1,9 @@ +{ + "name:": "sd_card", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/sd_card/usermod_sd_card.h b/usermods/sd_card/sd_card.cpp similarity index 99% rename from usermods/sd_card/usermod_sd_card.h rename to usermods/sd_card/sd_card.cpp index da1999d9b..e33a643fe 100644 --- a/usermods/sd_card/usermod_sd_card.h +++ b/usermods/sd_card/sd_card.cpp @@ -240,4 +240,7 @@ void listDir( const char * dirname, uint8_t levels){ } } -#endif \ No newline at end of file +#endif + +static UsermodSdCard sd_card; +REGISTER_USERMOD(sd_card); \ No newline at end of file diff --git a/usermods/seven_segment_display/library.json b/usermods/seven_segment_display/library.json new file mode 100644 index 000000000..c10bd084c --- /dev/null +++ b/usermods/seven_segment_display/library.json @@ -0,0 +1,9 @@ +{ + "name:": "seven_segment_display", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/seven_segment_display/usermod_v2_seven_segment_display.h b/usermods/seven_segment_display/seven_segment_display.cpp similarity index 99% rename from usermods/seven_segment_display/usermod_v2_seven_segment_display.h rename to usermods/seven_segment_display/seven_segment_display.cpp index 20fef15df..d3aa57378 100644 --- a/usermods/seven_segment_display/usermod_v2_seven_segment_display.h +++ b/usermods/seven_segment_display/seven_segment_display.cpp @@ -498,4 +498,7 @@ const char SevenSegmentDisplay::_str_timeEnabled[] PROGMEM = "timeEnabled"; const char SevenSegmentDisplay::_str_scrollSpd[] PROGMEM = "scrollSpd"; const char SevenSegmentDisplay::_str_displayMask[] PROGMEM = "displayMask"; const char SevenSegmentDisplay::_str_displayMsg[] PROGMEM = "displayMsg"; -const char SevenSegmentDisplay::_str_sevenSeg[] PROGMEM = "sevenSeg"; \ No newline at end of file +const char SevenSegmentDisplay::_str_sevenSeg[] PROGMEM = "sevenSeg"; + +static SevenSegmentDisplay seven_segment_display; +REGISTER_USERMOD(seven_segment_display); \ No newline at end of file diff --git a/usermods/sht/library.json b/usermods/sht/library.json new file mode 100644 index 000000000..2cb0003ac --- /dev/null +++ b/usermods/sht/library.json @@ -0,0 +1,9 @@ +{ + "name:": "sht", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/sht/usermod_sht.h b/usermods/sht/sht.cpp similarity index 99% rename from usermods/sht/usermod_sht.h rename to usermods/sht/sht.cpp index f10c78a25..7641bbc2e 100644 --- a/usermods/sht/usermod_sht.h +++ b/usermods/sht/sht.cpp @@ -477,4 +477,7 @@ float ShtUsermod::getTemperature() { */ const char* ShtUsermod::getUnitString() { return unitOfTemp ? "°F" : "°C"; -} \ No newline at end of file +} + +static ShtUsermod sht; +REGISTER_USERMOD(sht); \ No newline at end of file diff --git a/usermods/smartnest/library.json b/usermods/smartnest/library.json new file mode 100644 index 000000000..4e776ad76 --- /dev/null +++ b/usermods/smartnest/library.json @@ -0,0 +1,9 @@ +{ + "name:": "smartnest", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/smartnest/usermod_smartnest.h b/usermods/smartnest/smartnest.cpp similarity index 98% rename from usermods/smartnest/usermod_smartnest.h rename to usermods/smartnest/smartnest.cpp index 9d21ef2e7..be7710abc 100644 --- a/usermods/smartnest/usermod_smartnest.h +++ b/usermods/smartnest/smartnest.cpp @@ -203,3 +203,7 @@ public: } } }; + + +static Smartnest smartnest; +REGISTER_USERMOD(smartnest); \ No newline at end of file diff --git a/usermods/usermod_rotary_brightness_color/library.json b/usermods/usermod_rotary_brightness_color/library.json new file mode 100644 index 000000000..8d368082b --- /dev/null +++ b/usermods/usermod_rotary_brightness_color/library.json @@ -0,0 +1,9 @@ +{ + "name:": "usermod_rotary_brightness_color", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.h b/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.cpp similarity index 98% rename from usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.h rename to usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.cpp index 85a9a1605..076e91f73 100644 --- a/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.h +++ b/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.cpp @@ -187,3 +187,7 @@ public: return configComplete; } }; + + +static RotaryEncoderBrightnessColor usermod_rotary_brightness_color; +REGISTER_USERMOD(usermod_rotary_brightness_color); \ No newline at end of file diff --git a/usermods/usermod_v2_HttpPullLightControl/library.json b/usermods/usermod_v2_HttpPullLightControl/library.json new file mode 100644 index 000000000..68b937081 --- /dev/null +++ b/usermods/usermod_v2_HttpPullLightControl/library.json @@ -0,0 +1,9 @@ +{ + "name:": "usermod_v2_HttpPullLightControl", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/usermod_v2_four_line_display_ALT/library.json b/usermods/usermod_v2_four_line_display_ALT/library.json new file mode 100644 index 000000000..6dccb4a98 --- /dev/null +++ b/usermods/usermod_v2_four_line_display_ALT/library.json @@ -0,0 +1,9 @@ +{ + "name:": "usermod_v2_four_line_display_ALT", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.cpp similarity index 99% rename from usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h rename to usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.cpp index 684dd86e4..851e378e1 100644 --- a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h +++ b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.cpp @@ -1386,3 +1386,7 @@ bool FourLineDisplayUsermod::readFromConfig(JsonObject& root) { // use "return !top["newestParameter"].isNull();" when updating Usermod with new features return !top[FPSTR(_contrastFix)].isNull(); } + + +static FourLineDisplayUsermod usermod_v2_four_line_display_alt; +REGISTER_USERMOD(usermod_v2_four_line_display_alt); \ No newline at end of file diff --git a/usermods/usermod_v2_klipper_percentage/library.json b/usermods/usermod_v2_klipper_percentage/library.json new file mode 100644 index 000000000..afd961631 --- /dev/null +++ b/usermods/usermod_v2_klipper_percentage/library.json @@ -0,0 +1,9 @@ +{ + "name:": "usermod_v2_klipper_percentage", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.h b/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.cpp similarity index 97% rename from usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.h rename to usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.cpp index bd4170dd2..55132b84d 100644 --- a/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.h +++ b/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.cpp @@ -219,4 +219,7 @@ public: } }; const char klipper_percentage::_name[] PROGMEM = "Klipper_Percentage"; -const char klipper_percentage::_enabled[] PROGMEM = "enabled"; \ No newline at end of file +const char klipper_percentage::_enabled[] PROGMEM = "enabled"; + +static klipper_percentage usermod_v2_klipper_percentage; +REGISTER_USERMOD(usermod_v2_klipper_percentage); \ No newline at end of file diff --git a/usermods/usermod_v2_ping_pong_clock/library.json b/usermods/usermod_v2_ping_pong_clock/library.json new file mode 100644 index 000000000..197086113 --- /dev/null +++ b/usermods/usermod_v2_ping_pong_clock/library.json @@ -0,0 +1,9 @@ +{ + "name:": "usermod_v2_ping_pong_clock", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.h b/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.cpp similarity index 97% rename from usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.h rename to usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.cpp index 40ff675c0..8212947a6 100644 --- a/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.h +++ b/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.cpp @@ -117,3 +117,7 @@ public: } }; + + +static PingPongClockUsermod usermod_v2_ping_pong_clock; +REGISTER_USERMOD(usermod_v2_ping_pong_clock); \ No newline at end of file diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json new file mode 100644 index 000000000..f7c60ecdd --- /dev/null +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json @@ -0,0 +1,9 @@ +{ + "name:": "usermod_v2_rotary_encoder_ui_ALT", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.cpp similarity index 99% rename from usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h rename to usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.cpp index 383c1193e..ac2cc3c4e 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.cpp @@ -1175,3 +1175,7 @@ const char RotaryEncoderUIUsermod::_applyToAll[] PROGMEM = "apply-2-all-seg"; const char RotaryEncoderUIUsermod::_pcf8574[] PROGMEM = "use-PCF8574"; const char RotaryEncoderUIUsermod::_pcfAddress[] PROGMEM = "PCF8574-address"; const char RotaryEncoderUIUsermod::_pcfINTpin[] PROGMEM = "PCF8574-INT-pin"; + + +static RotaryEncoderUIUsermod usermod_v2_rotary_encoder_ui_alt; +REGISTER_USERMOD(usermod_v2_rotary_encoder_ui_alt); \ No newline at end of file diff --git a/usermods/usermod_v2_word_clock/library.json b/usermods/usermod_v2_word_clock/library.json new file mode 100644 index 000000000..74a3d9035 --- /dev/null +++ b/usermods/usermod_v2_word_clock/library.json @@ -0,0 +1,9 @@ +{ + "name:": "usermod_v2_word_clock", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/usermod_v2_word_clock/usermod_v2_word_clock.h b/usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp similarity index 99% rename from usermods/usermod_v2_word_clock/usermod_v2_word_clock.h rename to usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp index 7ecec08e5..781dd7d81 100644 --- a/usermods/usermod_v2_word_clock/usermod_v2_word_clock.h +++ b/usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp @@ -504,4 +504,7 @@ class WordClockUsermod : public Usermod //More methods can be added in the future, this example will then be extended. //Your usermod will remain compatible as it does not need to implement all methods from the Usermod base class! -}; \ No newline at end of file +}; + +static WordClockUsermod usermod_v2_word_clock; +REGISTER_USERMOD(usermod_v2_word_clock); \ No newline at end of file diff --git a/usermods/wireguard/library.json b/usermods/wireguard/library.json new file mode 100644 index 000000000..290f2794b --- /dev/null +++ b/usermods/wireguard/library.json @@ -0,0 +1,9 @@ +{ + "name:": "wireguard", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/wireguard/wireguard.h b/usermods/wireguard/wireguard.cpp similarity index 98% rename from usermods/wireguard/wireguard.h rename to usermods/wireguard/wireguard.cpp index 8656a704a..77cc952fc 100644 --- a/usermods/wireguard/wireguard.h +++ b/usermods/wireguard/wireguard.cpp @@ -124,4 +124,7 @@ class WireguardUsermod : public Usermod { int endpoint_port = 0; bool is_enabled = false; unsigned long lastTime = 0; -}; \ No newline at end of file +}; + +static WireguardUsermod wireguard; +REGISTER_USERMOD(wireguard); \ No newline at end of file diff --git a/usermods/wizlights/library.json b/usermods/wizlights/library.json new file mode 100644 index 000000000..a82dd7fcb --- /dev/null +++ b/usermods/wizlights/library.json @@ -0,0 +1,9 @@ +{ + "name:": "wizlights", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/wizlights/wizlights.h b/usermods/wizlights/wizlights.cpp similarity index 98% rename from usermods/wizlights/wizlights.h rename to usermods/wizlights/wizlights.cpp index 08d204934..67c0effdb 100644 --- a/usermods/wizlights/wizlights.h +++ b/usermods/wizlights/wizlights.cpp @@ -156,3 +156,7 @@ class WizLightsUsermod : public Usermod { uint16_t getId(){return USERMOD_ID_WIZLIGHTS;} }; + + +static WizLightsUsermod wizlights; +REGISTER_USERMOD(wizlights); \ No newline at end of file From a5575bc3a037b50f0f4be6be8ad1c28f0b5e1ca7 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 21:41:21 +0000 Subject: [PATCH 010/109] Fix naming of usermod files to match library name --- usermods/ADS1115_v2/{usermod_ads1115.h => ADS1115_v2.h} | 0 usermods/AHT10_v2/{usermod_aht10.h => AHT10_v2.h} | 0 usermods/BH1750_v2/{usermod_bh1750.h => BH1750_v2.h} | 0 usermods/BME280_v2/{usermod_bme280.h => BME280_v2.h} | 0 usermods/BME68X_v2/{usermod_bme68x.h => BME68X_v2.h} | 0 usermods/INA226_v2/{usermod_ina226.h => INA226_v2.h} | 0 .../{usermod_internal_temperature.h => Internal_Temperature_v2.h} | 0 usermods/LD2410_v2/{usermod_ld2410.h => LD2410_v2.h} | 0 usermods/MAX17048_v2/{usermod_max17048.h => MAX17048_v2.h} | 0 usermods/MY9291/{usermode_MY9291.h => MY9291.h} | 0 usermods/TetrisAI_v2/{usermod_v2_tetrisai.h => TetrisAI_v2.h} | 0 .../mqtt_switch_v2/{usermod_mqtt_switch.h => mqtt_switch_v2.h} | 0 .../{usermod_v2_SensorsToMqtt.h => sensors_to_mqtt.h} | 0 ..._seven_segment_reloaded.h => seven_segment_display_reloaded.h} | 0 .../{stairway-wipe-usermod-v2.h => stairway_wipe_basic.h} | 0 .../{usermod_word_clock_matrix.h => word-clock-matrix.h} | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename usermods/ADS1115_v2/{usermod_ads1115.h => ADS1115_v2.h} (100%) rename usermods/AHT10_v2/{usermod_aht10.h => AHT10_v2.h} (100%) rename usermods/BH1750_v2/{usermod_bh1750.h => BH1750_v2.h} (100%) rename usermods/BME280_v2/{usermod_bme280.h => BME280_v2.h} (100%) rename usermods/BME68X_v2/{usermod_bme68x.h => BME68X_v2.h} (100%) rename usermods/INA226_v2/{usermod_ina226.h => INA226_v2.h} (100%) rename usermods/Internal_Temperature_v2/{usermod_internal_temperature.h => Internal_Temperature_v2.h} (100%) rename usermods/LD2410_v2/{usermod_ld2410.h => LD2410_v2.h} (100%) rename usermods/MAX17048_v2/{usermod_max17048.h => MAX17048_v2.h} (100%) rename usermods/MY9291/{usermode_MY9291.h => MY9291.h} (100%) rename usermods/TetrisAI_v2/{usermod_v2_tetrisai.h => TetrisAI_v2.h} (100%) rename usermods/mqtt_switch_v2/{usermod_mqtt_switch.h => mqtt_switch_v2.h} (100%) rename usermods/sensors_to_mqtt/{usermod_v2_SensorsToMqtt.h => sensors_to_mqtt.h} (100%) rename usermods/seven_segment_display_reloaded/{usermod_seven_segment_reloaded.h => seven_segment_display_reloaded.h} (100%) rename usermods/stairway_wipe_basic/{stairway-wipe-usermod-v2.h => stairway_wipe_basic.h} (100%) rename usermods/word-clock-matrix/{usermod_word_clock_matrix.h => word-clock-matrix.h} (100%) diff --git a/usermods/ADS1115_v2/usermod_ads1115.h b/usermods/ADS1115_v2/ADS1115_v2.h similarity index 100% rename from usermods/ADS1115_v2/usermod_ads1115.h rename to usermods/ADS1115_v2/ADS1115_v2.h diff --git a/usermods/AHT10_v2/usermod_aht10.h b/usermods/AHT10_v2/AHT10_v2.h similarity index 100% rename from usermods/AHT10_v2/usermod_aht10.h rename to usermods/AHT10_v2/AHT10_v2.h diff --git a/usermods/BH1750_v2/usermod_bh1750.h b/usermods/BH1750_v2/BH1750_v2.h similarity index 100% rename from usermods/BH1750_v2/usermod_bh1750.h rename to usermods/BH1750_v2/BH1750_v2.h diff --git a/usermods/BME280_v2/usermod_bme280.h b/usermods/BME280_v2/BME280_v2.h similarity index 100% rename from usermods/BME280_v2/usermod_bme280.h rename to usermods/BME280_v2/BME280_v2.h diff --git a/usermods/BME68X_v2/usermod_bme68x.h b/usermods/BME68X_v2/BME68X_v2.h similarity index 100% rename from usermods/BME68X_v2/usermod_bme68x.h rename to usermods/BME68X_v2/BME68X_v2.h diff --git a/usermods/INA226_v2/usermod_ina226.h b/usermods/INA226_v2/INA226_v2.h similarity index 100% rename from usermods/INA226_v2/usermod_ina226.h rename to usermods/INA226_v2/INA226_v2.h diff --git a/usermods/Internal_Temperature_v2/usermod_internal_temperature.h b/usermods/Internal_Temperature_v2/Internal_Temperature_v2.h similarity index 100% rename from usermods/Internal_Temperature_v2/usermod_internal_temperature.h rename to usermods/Internal_Temperature_v2/Internal_Temperature_v2.h diff --git a/usermods/LD2410_v2/usermod_ld2410.h b/usermods/LD2410_v2/LD2410_v2.h similarity index 100% rename from usermods/LD2410_v2/usermod_ld2410.h rename to usermods/LD2410_v2/LD2410_v2.h diff --git a/usermods/MAX17048_v2/usermod_max17048.h b/usermods/MAX17048_v2/MAX17048_v2.h similarity index 100% rename from usermods/MAX17048_v2/usermod_max17048.h rename to usermods/MAX17048_v2/MAX17048_v2.h diff --git a/usermods/MY9291/usermode_MY9291.h b/usermods/MY9291/MY9291.h similarity index 100% rename from usermods/MY9291/usermode_MY9291.h rename to usermods/MY9291/MY9291.h diff --git a/usermods/TetrisAI_v2/usermod_v2_tetrisai.h b/usermods/TetrisAI_v2/TetrisAI_v2.h similarity index 100% rename from usermods/TetrisAI_v2/usermod_v2_tetrisai.h rename to usermods/TetrisAI_v2/TetrisAI_v2.h diff --git a/usermods/mqtt_switch_v2/usermod_mqtt_switch.h b/usermods/mqtt_switch_v2/mqtt_switch_v2.h similarity index 100% rename from usermods/mqtt_switch_v2/usermod_mqtt_switch.h rename to usermods/mqtt_switch_v2/mqtt_switch_v2.h diff --git a/usermods/sensors_to_mqtt/usermod_v2_SensorsToMqtt.h b/usermods/sensors_to_mqtt/sensors_to_mqtt.h similarity index 100% rename from usermods/sensors_to_mqtt/usermod_v2_SensorsToMqtt.h rename to usermods/sensors_to_mqtt/sensors_to_mqtt.h diff --git a/usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h b/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.h similarity index 100% rename from usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h rename to usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.h diff --git a/usermods/stairway_wipe_basic/stairway-wipe-usermod-v2.h b/usermods/stairway_wipe_basic/stairway_wipe_basic.h similarity index 100% rename from usermods/stairway_wipe_basic/stairway-wipe-usermod-v2.h rename to usermods/stairway_wipe_basic/stairway_wipe_basic.h diff --git a/usermods/word-clock-matrix/usermod_word_clock_matrix.h b/usermods/word-clock-matrix/word-clock-matrix.h similarity index 100% rename from usermods/word-clock-matrix/usermod_word_clock_matrix.h rename to usermods/word-clock-matrix/word-clock-matrix.h From 6e76a72d78659200f369316351c3ea939592f274 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 21:42:41 +0000 Subject: [PATCH 011/109] Convert usermods from header to library --- usermods/ADS1115_v2/{ADS1115_v2.h => ADS1115_v2.cpp} | 5 ++++- usermods/ADS1115_v2/library.json | 9 +++++++++ usermods/AHT10_v2/{AHT10_v2.h => AHT10_v2.cpp} | 5 ++++- usermods/AHT10_v2/library.json | 9 +++++++++ usermods/BH1750_v2/{BH1750_v2.h => BH1750_v2.cpp} | 4 ++++ usermods/BH1750_v2/library.json | 9 +++++++++ usermods/BME280_v2/{BME280_v2.h => BME280_v2.cpp} | 4 ++++ usermods/BME280_v2/library.json | 9 +++++++++ usermods/BME68X_v2/{BME68X_v2.h => BME68X_v2.cpp} | 4 ++++ usermods/BME68X_v2/library.json | 9 +++++++++ usermods/INA226_v2/{INA226_v2.h => INA226_v2.cpp} | 4 ++++ usermods/INA226_v2/library.json | 9 +++++++++ ...rnal_Temperature_v2.h => Internal_Temperature_v2.cpp} | 5 ++++- usermods/Internal_Temperature_v2/library.json | 9 +++++++++ usermods/LD2410_v2/{LD2410_v2.h => LD2410_v2.cpp} | 4 ++++ usermods/LD2410_v2/library.json | 9 +++++++++ usermods/MAX17048_v2/{MAX17048_v2.h => MAX17048_v2.cpp} | 4 ++++ usermods/MAX17048_v2/library.json | 9 +++++++++ usermods/MY9291/{MY9291.h => MY9291.cpp} | 5 ++++- usermods/MY9291/library.json | 9 +++++++++ usermods/TetrisAI_v2/{TetrisAI_v2.h => TetrisAI_v2.cpp} | 4 ++++ usermods/TetrisAI_v2/library.json | 9 +++++++++ usermods/mqtt_switch_v2/library.json | 9 +++++++++ .../{mqtt_switch_v2.h => mqtt_switch_v2.cpp} | 4 ++++ usermods/sensors_to_mqtt/library.json | 9 +++++++++ .../{sensors_to_mqtt.h => sensors_to_mqtt.cpp} | 4 ++++ usermods/seven_segment_display_reloaded/library.json | 9 +++++++++ ...lay_reloaded.h => seven_segment_display_reloaded.cpp} | 4 ++++ usermods/stairway_wipe_basic/library.json | 9 +++++++++ .../{stairway_wipe_basic.h => stairway_wipe_basic.cpp} | 4 ++++ usermods/word-clock-matrix/library.json | 9 +++++++++ .../{word-clock-matrix.h => word-clock-matrix.cpp} | 4 ++++ 32 files changed, 208 insertions(+), 4 deletions(-) rename usermods/ADS1115_v2/{ADS1115_v2.h => ADS1115_v2.cpp} (98%) create mode 100644 usermods/ADS1115_v2/library.json rename usermods/AHT10_v2/{AHT10_v2.h => AHT10_v2.cpp} (98%) create mode 100644 usermods/AHT10_v2/library.json rename usermods/BH1750_v2/{BH1750_v2.h => BH1750_v2.cpp} (99%) create mode 100644 usermods/BH1750_v2/library.json rename usermods/BME280_v2/{BME280_v2.h => BME280_v2.cpp} (99%) create mode 100644 usermods/BME280_v2/library.json rename usermods/BME68X_v2/{BME68X_v2.h => BME68X_v2.cpp} (99%) create mode 100644 usermods/BME68X_v2/library.json rename usermods/INA226_v2/{INA226_v2.h => INA226_v2.cpp} (99%) create mode 100644 usermods/INA226_v2/library.json rename usermods/Internal_Temperature_v2/{Internal_Temperature_v2.h => Internal_Temperature_v2.cpp} (98%) create mode 100644 usermods/Internal_Temperature_v2/library.json rename usermods/LD2410_v2/{LD2410_v2.h => LD2410_v2.cpp} (99%) create mode 100644 usermods/LD2410_v2/library.json rename usermods/MAX17048_v2/{MAX17048_v2.h => MAX17048_v2.cpp} (99%) create mode 100644 usermods/MAX17048_v2/library.json rename usermods/MY9291/{MY9291.h => MY9291.cpp} (94%) create mode 100644 usermods/MY9291/library.json rename usermods/TetrisAI_v2/{TetrisAI_v2.h => TetrisAI_v2.cpp} (99%) create mode 100644 usermods/TetrisAI_v2/library.json create mode 100644 usermods/mqtt_switch_v2/library.json rename usermods/mqtt_switch_v2/{mqtt_switch_v2.h => mqtt_switch_v2.cpp} (98%) create mode 100644 usermods/sensors_to_mqtt/library.json rename usermods/sensors_to_mqtt/{sensors_to_mqtt.h => sensors_to_mqtt.cpp} (98%) create mode 100644 usermods/seven_segment_display_reloaded/library.json rename usermods/seven_segment_display_reloaded/{seven_segment_display_reloaded.h => seven_segment_display_reloaded.cpp} (99%) create mode 100644 usermods/stairway_wipe_basic/library.json rename usermods/stairway_wipe_basic/{stairway_wipe_basic.h => stairway_wipe_basic.cpp} (97%) create mode 100644 usermods/word-clock-matrix/library.json rename usermods/word-clock-matrix/{word-clock-matrix.h => word-clock-matrix.cpp} (99%) diff --git a/usermods/ADS1115_v2/ADS1115_v2.h b/usermods/ADS1115_v2/ADS1115_v2.cpp similarity index 98% rename from usermods/ADS1115_v2/ADS1115_v2.h rename to usermods/ADS1115_v2/ADS1115_v2.cpp index 5e2b4b270..48f917332 100644 --- a/usermods/ADS1115_v2/ADS1115_v2.h +++ b/usermods/ADS1115_v2/ADS1115_v2.cpp @@ -252,4 +252,7 @@ class ADS1115Usermod : public Usermod { int16_t results = ads.getLastConversionResults(); readings[activeChannel] = ads.computeVolts(results); } -}; \ No newline at end of file +}; + +static ADS1115Usermod ads1115_v2; +REGISTER_USERMOD(ads1115_v2); \ No newline at end of file diff --git a/usermods/ADS1115_v2/library.json b/usermods/ADS1115_v2/library.json new file mode 100644 index 000000000..e4b448a03 --- /dev/null +++ b/usermods/ADS1115_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "ADS1115_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/AHT10_v2/AHT10_v2.h b/usermods/AHT10_v2/AHT10_v2.cpp similarity index 98% rename from usermods/AHT10_v2/AHT10_v2.h rename to usermods/AHT10_v2/AHT10_v2.cpp index b5dc1841d..171e15754 100644 --- a/usermods/AHT10_v2/AHT10_v2.h +++ b/usermods/AHT10_v2/AHT10_v2.cpp @@ -324,4 +324,7 @@ public: } }; -const char UsermodAHT10::_name[] PROGMEM = "AHTxx"; \ No newline at end of file +const char UsermodAHT10::_name[] PROGMEM = "AHTxx"; + +static UsermodAHT10 aht10_v2; +REGISTER_USERMOD(aht10_v2); \ No newline at end of file diff --git a/usermods/AHT10_v2/library.json b/usermods/AHT10_v2/library.json new file mode 100644 index 000000000..209e97af2 --- /dev/null +++ b/usermods/AHT10_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "AHT10_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/BH1750_v2/BH1750_v2.h b/usermods/BH1750_v2/BH1750_v2.cpp similarity index 99% rename from usermods/BH1750_v2/BH1750_v2.h rename to usermods/BH1750_v2/BH1750_v2.cpp index 2a2bd4637..5bd476245 100644 --- a/usermods/BH1750_v2/BH1750_v2.h +++ b/usermods/BH1750_v2/BH1750_v2.cpp @@ -250,3 +250,7 @@ const char Usermod_BH1750::_maxReadInterval[] PROGMEM = "max-read-interval-ms"; const char Usermod_BH1750::_minReadInterval[] PROGMEM = "min-read-interval-ms"; const char Usermod_BH1750::_HomeAssistantDiscovery[] PROGMEM = "HomeAssistantDiscoveryLux"; const char Usermod_BH1750::_offset[] PROGMEM = "offset-lx"; + + +static Usermod_BH1750 bh1750_v2; +REGISTER_USERMOD(bh1750_v2); \ No newline at end of file diff --git a/usermods/BH1750_v2/library.json b/usermods/BH1750_v2/library.json new file mode 100644 index 000000000..662ca3543 --- /dev/null +++ b/usermods/BH1750_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "BH1750_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/BME280_v2/BME280_v2.h b/usermods/BME280_v2/BME280_v2.cpp similarity index 99% rename from usermods/BME280_v2/BME280_v2.h rename to usermods/BME280_v2/BME280_v2.cpp index 9168f4229..d29451eed 100644 --- a/usermods/BME280_v2/BME280_v2.h +++ b/usermods/BME280_v2/BME280_v2.cpp @@ -479,3 +479,7 @@ public: const char UsermodBME280::_name[] PROGMEM = "BME280/BMP280"; const char UsermodBME280::_enabled[] PROGMEM = "enabled"; + + +static UsermodBME280 bme280_v2; +REGISTER_USERMOD(bme280_v2); \ No newline at end of file diff --git a/usermods/BME280_v2/library.json b/usermods/BME280_v2/library.json new file mode 100644 index 000000000..57d41fb37 --- /dev/null +++ b/usermods/BME280_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "BME280_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/BME68X_v2/BME68X_v2.h b/usermods/BME68X_v2/BME68X_v2.cpp similarity index 99% rename from usermods/BME68X_v2/BME68X_v2.h rename to usermods/BME68X_v2/BME68X_v2.cpp index aca24d0a2..5814506b3 100644 --- a/usermods/BME68X_v2/BME68X_v2.h +++ b/usermods/BME68X_v2/BME68X_v2.cpp @@ -1112,3 +1112,7 @@ void UsermodBME68X::saveState() { if (WLED_MQTT_CONNECTED) mqtt->publish(charbuffer, 0, false, contbuffer); } } + + +static UsermodBME68X bme68x_v2; +REGISTER_USERMOD(bme68x_v2); \ No newline at end of file diff --git a/usermods/BME68X_v2/library.json b/usermods/BME68X_v2/library.json new file mode 100644 index 000000000..1a8a1f0ff --- /dev/null +++ b/usermods/BME68X_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "BME68X_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/INA226_v2/INA226_v2.h b/usermods/INA226_v2/INA226_v2.cpp similarity index 99% rename from usermods/INA226_v2/INA226_v2.h rename to usermods/INA226_v2/INA226_v2.cpp index 52bc3d83f..3c79f05bb 100644 --- a/usermods/INA226_v2/INA226_v2.h +++ b/usermods/INA226_v2/INA226_v2.cpp @@ -554,3 +554,7 @@ public: }; const char UsermodINA226::_name[] PROGMEM = "INA226"; + + +static UsermodINA226 ina226_v2; +REGISTER_USERMOD(ina226_v2); \ No newline at end of file diff --git a/usermods/INA226_v2/library.json b/usermods/INA226_v2/library.json new file mode 100644 index 000000000..2596b86a5 --- /dev/null +++ b/usermods/INA226_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "INA226_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/Internal_Temperature_v2/Internal_Temperature_v2.h b/usermods/Internal_Temperature_v2/Internal_Temperature_v2.cpp similarity index 98% rename from usermods/Internal_Temperature_v2/Internal_Temperature_v2.h rename to usermods/Internal_Temperature_v2/Internal_Temperature_v2.cpp index 6d4d4577c..ab7f907ec 100644 --- a/usermods/Internal_Temperature_v2/Internal_Temperature_v2.h +++ b/usermods/Internal_Temperature_v2/Internal_Temperature_v2.cpp @@ -193,4 +193,7 @@ void InternalTemperatureUsermod::publishMqtt(const char *state, bool retain) mqtt->publish(subuf, 0, retain, state); } #endif -} \ No newline at end of file +} + +static InternalTemperatureUsermod internal_temperature_v2; +REGISTER_USERMOD(internal_temperature_v2); \ No newline at end of file diff --git a/usermods/Internal_Temperature_v2/library.json b/usermods/Internal_Temperature_v2/library.json new file mode 100644 index 000000000..38b560da8 --- /dev/null +++ b/usermods/Internal_Temperature_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "Internal_Temperature_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/LD2410_v2/LD2410_v2.h b/usermods/LD2410_v2/LD2410_v2.cpp similarity index 99% rename from usermods/LD2410_v2/LD2410_v2.h rename to usermods/LD2410_v2/LD2410_v2.cpp index 4d96b32ff..51c887fa4 100644 --- a/usermods/LD2410_v2/LD2410_v2.h +++ b/usermods/LD2410_v2/LD2410_v2.cpp @@ -235,3 +235,7 @@ void LD2410Usermod::publishMqtt(const char* topic, const char* state, bool retai } #endif } + + +static LD2410Usermod ld2410_v2; +REGISTER_USERMOD(ld2410_v2); \ No newline at end of file diff --git a/usermods/LD2410_v2/library.json b/usermods/LD2410_v2/library.json new file mode 100644 index 000000000..3480cd798 --- /dev/null +++ b/usermods/LD2410_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "LD2410_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/MAX17048_v2/MAX17048_v2.h b/usermods/MAX17048_v2/MAX17048_v2.cpp similarity index 99% rename from usermods/MAX17048_v2/MAX17048_v2.h rename to usermods/MAX17048_v2/MAX17048_v2.cpp index c3a2664ab..1a1108cf6 100644 --- a/usermods/MAX17048_v2/MAX17048_v2.h +++ b/usermods/MAX17048_v2/MAX17048_v2.cpp @@ -279,3 +279,7 @@ const char Usermod_MAX17048::_enabled[] PROGMEM = "enabled"; const char Usermod_MAX17048::_maxReadInterval[] PROGMEM = "max-read-interval-ms"; const char Usermod_MAX17048::_minReadInterval[] PROGMEM = "min-read-interval-ms"; const char Usermod_MAX17048::_HomeAssistantDiscovery[] PROGMEM = "HomeAssistantDiscovery"; + + +static Usermod_MAX17048 max17048_v2; +REGISTER_USERMOD(max17048_v2); \ No newline at end of file diff --git a/usermods/MAX17048_v2/library.json b/usermods/MAX17048_v2/library.json new file mode 100644 index 000000000..72ac0e61f --- /dev/null +++ b/usermods/MAX17048_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "MAX17048_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/MY9291/MY9291.h b/usermods/MY9291/MY9291.cpp similarity index 94% rename from usermods/MY9291/MY9291.h rename to usermods/MY9291/MY9291.cpp index 66bbc34cb..ce8d0f001 100644 --- a/usermods/MY9291/MY9291.h +++ b/usermods/MY9291/MY9291.cpp @@ -42,4 +42,7 @@ class MY9291Usermod : public Usermod { uint16_t getId() { return USERMOD_ID_MY9291; } -}; \ No newline at end of file +}; + +static MY9291Usermod my9291; +REGISTER_USERMOD(my9291); \ No newline at end of file diff --git a/usermods/MY9291/library.json b/usermods/MY9291/library.json new file mode 100644 index 000000000..d965f4c35 --- /dev/null +++ b/usermods/MY9291/library.json @@ -0,0 +1,9 @@ +{ + "name:": "MY9291", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/TetrisAI_v2/TetrisAI_v2.h b/usermods/TetrisAI_v2/TetrisAI_v2.cpp similarity index 99% rename from usermods/TetrisAI_v2/TetrisAI_v2.h rename to usermods/TetrisAI_v2/TetrisAI_v2.cpp index 0f7039dac..78cdfd227 100644 --- a/usermods/TetrisAI_v2/TetrisAI_v2.h +++ b/usermods/TetrisAI_v2/TetrisAI_v2.cpp @@ -250,3 +250,7 @@ public: return USERMOD_ID_TETRISAI; } }; + + +static TetrisAIUsermod tetrisai_v2; +REGISTER_USERMOD(tetrisai_v2); \ No newline at end of file diff --git a/usermods/TetrisAI_v2/library.json b/usermods/TetrisAI_v2/library.json new file mode 100644 index 000000000..199e5c434 --- /dev/null +++ b/usermods/TetrisAI_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "TetrisAI_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/mqtt_switch_v2/library.json b/usermods/mqtt_switch_v2/library.json new file mode 100644 index 000000000..96695a9c7 --- /dev/null +++ b/usermods/mqtt_switch_v2/library.json @@ -0,0 +1,9 @@ +{ + "name:": "mqtt_switch_v2", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/mqtt_switch_v2/mqtt_switch_v2.h b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp similarity index 98% rename from usermods/mqtt_switch_v2/mqtt_switch_v2.h rename to usermods/mqtt_switch_v2/mqtt_switch_v2.cpp index 67dfc9cc0..d4d823f32 100644 --- a/usermods/mqtt_switch_v2/mqtt_switch_v2.h +++ b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp @@ -157,3 +157,7 @@ inline void UsermodMqttSwitch::updateState(uint8_t pinNr) mqtt->publish(buf, 0, false, "OFF"); } } + + +static UsermodMqttSwitc mqtt_switch_v2; +REGISTER_USERMOD(mqtt_switch_v2); \ No newline at end of file diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json new file mode 100644 index 000000000..dd9a4f3a2 --- /dev/null +++ b/usermods/sensors_to_mqtt/library.json @@ -0,0 +1,9 @@ +{ + "name:": "sensors_to_mqtt", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/sensors_to_mqtt/sensors_to_mqtt.h b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp similarity index 98% rename from usermods/sensors_to_mqtt/sensors_to_mqtt.h rename to usermods/sensors_to_mqtt/sensors_to_mqtt.cpp index 9b5bd8c88..02f8e8d27 100644 --- a/usermods/sensors_to_mqtt/sensors_to_mqtt.h +++ b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp @@ -276,3 +276,7 @@ public: } } }; + + +static UserMod_SensorsToMQTT sensors_to_mqtt; +REGISTER_USERMOD(sensors_to_mqtt); \ No newline at end of file diff --git a/usermods/seven_segment_display_reloaded/library.json b/usermods/seven_segment_display_reloaded/library.json new file mode 100644 index 000000000..485aa4fd8 --- /dev/null +++ b/usermods/seven_segment_display_reloaded/library.json @@ -0,0 +1,9 @@ +{ + "name:": "seven_segment_display_reloaded", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.h b/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp similarity index 99% rename from usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.h rename to usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp index 1436f8fc4..812065d86 100644 --- a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.h +++ b/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp @@ -571,3 +571,7 @@ const char UsermodSSDR::_str_years[] PROGMEM = "LED-Numbers-Year"; const char UsermodSSDR::_str_ldrEnabled[] PROGMEM = "enable-auto-brightness"; const char UsermodSSDR::_str_minBrightness[] PROGMEM = "auto-brightness-min"; const char UsermodSSDR::_str_maxBrightness[] PROGMEM = "auto-brightness-max"; + + +static UsermodSSDR seven_segment_display_reloaded; +REGISTER_USERMOD(seven_segment_display_reloaded); \ No newline at end of file diff --git a/usermods/stairway_wipe_basic/library.json b/usermods/stairway_wipe_basic/library.json new file mode 100644 index 000000000..6b3a52368 --- /dev/null +++ b/usermods/stairway_wipe_basic/library.json @@ -0,0 +1,9 @@ +{ + "name:": "stairway_wipe_basic", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/stairway_wipe_basic/stairway_wipe_basic.h b/usermods/stairway_wipe_basic/stairway_wipe_basic.cpp similarity index 97% rename from usermods/stairway_wipe_basic/stairway_wipe_basic.h rename to usermods/stairway_wipe_basic/stairway_wipe_basic.cpp index 707479df1..cdb7cd662 100644 --- a/usermods/stairway_wipe_basic/stairway_wipe_basic.h +++ b/usermods/stairway_wipe_basic/stairway_wipe_basic.cpp @@ -126,3 +126,7 @@ void setup() { //More methods can be added in the future, this example will then be extended. //Your usermod will remain compatible as it does not need to implement all methods from the Usermod base class! }; + + +static StairwayWipeUsermod stairway_wipe_basic; +REGISTER_USERMOD(stairway_wipe_basic); \ No newline at end of file diff --git a/usermods/word-clock-matrix/library.json b/usermods/word-clock-matrix/library.json new file mode 100644 index 000000000..ed29ae088 --- /dev/null +++ b/usermods/word-clock-matrix/library.json @@ -0,0 +1,9 @@ +{ + "name:": "word-clock-matrix", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "libLDFMode": "chain+", + "libArchive": false + } +} \ No newline at end of file diff --git a/usermods/word-clock-matrix/word-clock-matrix.h b/usermods/word-clock-matrix/word-clock-matrix.cpp similarity index 99% rename from usermods/word-clock-matrix/word-clock-matrix.h rename to usermods/word-clock-matrix/word-clock-matrix.cpp index 82499c0ce..c8606003d 100644 --- a/usermods/word-clock-matrix/word-clock-matrix.h +++ b/usermods/word-clock-matrix/word-clock-matrix.cpp @@ -336,3 +336,7 @@ public: }; + + +static WordClockMatrix word-clock-matrix; +REGISTER_USERMOD(word-clock-matrix); \ No newline at end of file From 67022beca0aee5edcc45918987217660d0362892 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 22:07:03 +0000 Subject: [PATCH 012/109] Build all usermods --- .github/workflows/build.yml | 7 ++++++- usermods/platformio_override.usermods.ini | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 usermods/platformio_override.usermods.ini diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bac314f3..e1b05b5af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }} + environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }} usermods steps: - uses: actions/checkout@v4 - name: Set up Node.js @@ -57,6 +57,11 @@ jobs: cache: 'pip' - name: Install PlatformIO run: pip install -r requirements.txt + - name: Add usermods environment + run: | + cp -v usermods/platformio_override.usermods.ini platformio_override.ini + find usermods/ -name library.json | xargs dirname | xargs -n 1 basename | xargs echo >> platformio_override.ini + - name: Build firmware run: pio run -e ${{ matrix.environment }} - uses: actions/upload-artifact@v4 diff --git a/usermods/platformio_override.usermods.ini b/usermods/platformio_override.usermods.ini new file mode 100644 index 000000000..568b20259 --- /dev/null +++ b/usermods/platformio_override.usermods.ini @@ -0,0 +1,9 @@ +[env:usermods] +board = esp32dev +platform = ${esp32.platform} +platform_packages = ${esp32.platform_packages} +build_unflags = ${common.build_unflags} +build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" + ${esp32.AR_build_flags} +lib_deps = ${esp32.lib_deps} +board_build.partitions = ${esp32.default_partitions} From cbed841414c0c6e388c3abac71f3063a5c472323 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 22:12:36 +0000 Subject: [PATCH 013/109] Include basic usermods in CI --- .github/workflows/build.yml | 3 ++- platformio.ini | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1b05b5af..efdb3f7af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }} usermods + environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }} steps: - uses: actions/checkout@v4 - name: Set up Node.js @@ -60,6 +60,7 @@ jobs: - name: Add usermods environment run: | cp -v usermods/platformio_override.usermods.ini platformio_override.ini + echo -n "custom_usermods = " >> platformio_override.ini find usermods/ -name library.json | xargs dirname | xargs -n 1 basename | xargs echo >> platformio_override.ini - name: Build firmware diff --git a/platformio.ini b/platformio.ini index 4832978a9..156feb060 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ # ------------------------------------------------------------------------------ # CI/release binaries -default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover +default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover, usermods src_dir = ./wled00 data_dir = ./wled00/data @@ -636,3 +636,13 @@ build_flags = ${common.build_flags} ${esp32s2.build_flags} -D WLED_RELEASE_NAME= ; -D STATUSLED=15 ${esp32.AR_build_flags} lib_deps = ${esp32s2.lib_deps} + + +[env:usermods] +board = esp32dev +platform = ${esp32.platform} +platform_packages = ${esp32.platform_packages} +build_unflags = ${common.build_unflags} +build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" + ${esp32.AR_build_flags} +lib_deps = ${esp32.lib_deps} From c16d83fab00c6a3bb8510bc269f46d2082b41cef Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 22:36:06 +0000 Subject: [PATCH 014/109] Build custom_usermods = audioreactive auto_save animartrix --- platformio.ini | 2 +- wled00/wled.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 156feb060..7eef17755 100644 --- a/platformio.ini +++ b/platformio.ini @@ -420,7 +420,7 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME= board = esp32dev platform = ${esp32.platform} platform_packages = ${esp32.platform_packages} -custom_usermods = audioreactive +custom_usermods = audioreactive auto_save usermod_v2_animartrix build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32\" #-D WLED_DISABLE_BROWNOUT_DET ${esp32.AR_build_flags} diff --git a/wled00/wled.h b/wled00/wled.h index ae93d9548..5a1a9ff89 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -1,3 +1,6 @@ +// TODO: HACK!! - do not merge +#define LOROL_LITTLEFS 1 + #ifndef WLED_H #define WLED_H /* From d64cedd3fc94080277524942f3170a7c06d8e1bf Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 22:38:57 +0000 Subject: [PATCH 015/109] Build custom_usermods = audioreactive auto_save animartrix --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 7eef17755..00ddd8158 100644 --- a/platformio.ini +++ b/platformio.ini @@ -420,7 +420,7 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME= board = esp32dev platform = ${esp32.platform} platform_packages = ${esp32.platform_packages} -custom_usermods = audioreactive auto_save usermod_v2_animartrix +custom_usermods = audioreactive auto_save animartrix build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32\" #-D WLED_DISABLE_BROWNOUT_DET ${esp32.AR_build_flags} From 2381e323c1dcb13c176d691bbf9871d7e5282fcd Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 22:54:28 +0000 Subject: [PATCH 016/109] Define dependencies for ADS1115 usermod --- platformio.ini | 3 --- usermods/ADS1115_v2/library.json | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/platformio.ini b/platformio.ini index 00ddd8158..e52afb3bc 100644 --- a/platformio.ini +++ b/platformio.ini @@ -158,9 +158,6 @@ lib_deps = ;adafruit/Adafruit BMP280 Library @ 2.1.0 ;adafruit/Adafruit CCS811 Library @ 1.0.4 ;adafruit/Adafruit Si7021 Library @ 1.4.0 - #For ADS1115 sensor uncomment following - ;adafruit/Adafruit BusIO @ 1.13.2 - ;adafruit/Adafruit ADS1X15 @ 2.4.0 #For MAX1704x Lipo Monitor / Fuel Gauge uncomment following ; https://github.com/adafruit/Adafruit_BusIO @ 1.14.5 ; https://github.com/adafruit/Adafruit_MAX1704X @ 1.0.2 diff --git a/usermods/ADS1115_v2/library.json b/usermods/ADS1115_v2/library.json index e4b448a03..179a56e5b 100644 --- a/usermods/ADS1115_v2/library.json +++ b/usermods/ADS1115_v2/library.json @@ -5,5 +5,9 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "Adafruit BusIO": "https://github.com/adafruit/Adafruit_BusIO#1.13.2", + "Adafruit ADS1X15": "https://github.com/adafruit/Adafruit_ADS1X15#2.4.0" } -} \ No newline at end of file +} From 79bac912aa7164b18efddf676397e0b8755e4fca Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 11 Jan 2025 23:25:05 +0000 Subject: [PATCH 017/109] use bigger partitions for usermods env --- usermods/AHT10_v2/library.json | 5 ++++- usermods/AHT10_v2/platformio_override.ini | 4 ---- usermods/BH1750_v2/library.json | 5 ++++- usermods/BH1750_v2/readme.md | 11 ----------- usermods/Temperature/library.json | 5 ++++- usermods/Temperature/platformio_override.ini | 6 +----- usermods/platformio_override.usermods.ini | 2 +- 7 files changed, 14 insertions(+), 24 deletions(-) diff --git a/usermods/AHT10_v2/library.json b/usermods/AHT10_v2/library.json index 209e97af2..28bac4353 100644 --- a/usermods/AHT10_v2/library.json +++ b/usermods/AHT10_v2/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "enjoyneering/AHT10":"~1.1.0" } -} \ No newline at end of file +} diff --git a/usermods/AHT10_v2/platformio_override.ini b/usermods/AHT10_v2/platformio_override.ini index 30240f222..74dcd659b 100644 --- a/usermods/AHT10_v2/platformio_override.ini +++ b/usermods/AHT10_v2/platformio_override.ini @@ -2,8 +2,4 @@ extends = env:esp32dev build_flags = ${common.build_flags} ${esp32.build_flags} - -D USERMOD_AHT10 ; -D USERMOD_AHT10_DEBUG ; -- add a debug status to the info modal -lib_deps = - ${esp32.lib_deps} - enjoyneering/AHT10@~1.1.0 \ No newline at end of file diff --git a/usermods/BH1750_v2/library.json b/usermods/BH1750_v2/library.json index 662ca3543..0211bc885 100644 --- a/usermods/BH1750_v2/library.json +++ b/usermods/BH1750_v2/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "claws/BH1750":"^1.2.0" } -} \ No newline at end of file +} diff --git a/usermods/BH1750_v2/readme.md b/usermods/BH1750_v2/readme.md index 6e6c693d4..c4aa8cb47 100644 --- a/usermods/BH1750_v2/readme.md +++ b/usermods/BH1750_v2/readme.md @@ -6,22 +6,11 @@ The luminance is displayed in both the Info section of the web UI, as well as pu ## Dependencies - Libraries - `claws/BH1750 @^1.2.0` - - This must be added under `lib_deps` in your `platformio.ini` (or `platformio_override.ini`). - Data is published over MQTT - make sure you've enabled the MQTT sync interface. ## Compilation To enable, compile with `USERMOD_BH1750` defined (e.g. in `platformio_override.ini`) -```ini -[env:usermod_BH1750_d1_mini] -extends = env:d1_mini -build_flags = - ${common.build_flags_esp8266} - -D USERMOD_BH1750 -lib_deps = - ${esp8266.lib_deps} - claws/BH1750 @ ^1.2.0 -``` ### Configuration Options The following settings can be set at compile-time but are configurable on the usermod menu (except First Measurement time): diff --git a/usermods/Temperature/library.json b/usermods/Temperature/library.json index 56371db4e..24de79825 100644 --- a/usermods/Temperature/library.json +++ b/usermods/Temperature/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "paulstoffregen/OneWire":"~2.3.8" } -} \ No newline at end of file +} diff --git a/usermods/Temperature/platformio_override.ini b/usermods/Temperature/platformio_override.ini index cc86367fd..ed35b7d49 100644 --- a/usermods/Temperature/platformio_override.ini +++ b/usermods/Temperature/platformio_override.ini @@ -3,8 +3,4 @@ ; USERMOD_DALLASTEMPERATURE - define this to have this user mod included wled00\usermods_list.cpp ; USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds ; -[env:d1_mini_usermod_dallas_temperature_C] -extends = env:d1_mini -build_flags = ${common.build_flags_esp8266} -D USERMOD_DALLASTEMPERATURE -lib_deps = ${env.lib_deps} - paulstoffregen/OneWire@~2.3.8 \ No newline at end of file + diff --git a/usermods/platformio_override.usermods.ini b/usermods/platformio_override.usermods.ini index 568b20259..0035ac59f 100644 --- a/usermods/platformio_override.usermods.ini +++ b/usermods/platformio_override.usermods.ini @@ -6,4 +6,4 @@ build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} -board_build.partitions = ${esp32.default_partitions} +board_build.partitions = ${esp32.big_partitions} \ No newline at end of file From d3eec72e45e4bfae7ada12e45c637058d552a0a8 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 12 Jan 2025 00:09:31 +0000 Subject: [PATCH 018/109] Defining more usermod dependencies --- usermods/BME68X_v2/README.md | 17 ----------------- usermods/BME68X_v2/library.json | 5 ++++- usermods/pixels_dice_tray/library.json | 5 ++++- usermods/pov_display/library.json | 5 ++++- usermods/sensors_to_mqtt/library.json | 8 ++++++-- usermods/sensors_to_mqtt/readme.md | 19 ------------------- usermods/wireguard/library.json | 5 ++++- usermods/wireguard/platformio_override.ini | 22 ---------------------- 8 files changed, 22 insertions(+), 64 deletions(-) delete mode 100644 usermods/wireguard/platformio_override.ini diff --git a/usermods/BME68X_v2/README.md b/usermods/BME68X_v2/README.md index 72ae25a57..7e7a15113 100644 --- a/usermods/BME68X_v2/README.md +++ b/usermods/BME68X_v2/README.md @@ -118,23 +118,6 @@ Methods also exist to read the read/calculated values from other WLED modules th - getStabStatus(); - getRunInStatus(); - -## Compiling - -To enable, compile with `USERMOD_BME68X` defined (e.g. in `platformio_override.ini`) and add the `BSEC Software Library` to the lib_deps. - -``` -[env:esp32-BME680] -board = esp32dev -platform = ${esp32.platform} -platform_packages = ${esp32.platform_packages} -lib_deps = ${esp32.lib_deps} - boschsensortec/BSEC Software Library @ ^1.8.1492 ; USERMOD: BME680 -build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags_esp32} - -D USERMOD_BME68X ; USERMOD: BME680 -``` - ## Revision History ### Version 1.0.0 - First version of the BME68X_v user module diff --git a/usermods/BME68X_v2/library.json b/usermods/BME68X_v2/library.json index 1a8a1f0ff..ccfac0d9a 100644 --- a/usermods/BME68X_v2/library.json +++ b/usermods/BME68X_v2/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "boschsensortec/BSEC Software Library":"^1.8.1492" } -} \ No newline at end of file +} diff --git a/usermods/pixels_dice_tray/library.json b/usermods/pixels_dice_tray/library.json index 01776ffe2..4634c4070 100644 --- a/usermods/pixels_dice_tray/library.json +++ b/usermods/pixels_dice_tray/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "arduino-pixels-dice":"https://github.com/axlan/arduino-pixels-dice.git" } -} \ No newline at end of file +} diff --git a/usermods/pov_display/library.json b/usermods/pov_display/library.json index 5998377b9..a3885417d 100644 --- a/usermods/pov_display/library.json +++ b/usermods/pov_display/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "bitbank2/PNGdec":"^1.0.3" } -} \ No newline at end of file +} diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json index dd9a4f3a2..c1bb6ec8f 100644 --- a/usermods/sensors_to_mqtt/library.json +++ b/usermods/sensors_to_mqtt/library.json @@ -5,5 +5,9 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false - } -} \ No newline at end of file + }, + "dependencies": { + "adafruit/Adafruit BMP280 Library":"2.1.0", + "adafruit/Adafruit CCS811 Library":"1.0.4", + "adafruit/Adafruit Si7021 Library":"1.4.0 +} diff --git a/usermods/sensors_to_mqtt/readme.md b/usermods/sensors_to_mqtt/readme.md index d427d3e14..061627937 100644 --- a/usermods/sensors_to_mqtt/readme.md +++ b/usermods/sensors_to_mqtt/readme.md @@ -60,25 +60,6 @@ SCL_PIN = 5; SDA_PIN = 4; ``` -## Enable in WLED - -1. Copy `usermod_v2_SensorsToMqtt.h` into the `wled00` directory. -2. Add to `build_flags` in platformio.ini: - -``` - -D USERMOD_SENSORSTOMQTT -``` - -3. And add to `lib_deps` in platformio.ini: - -``` - adafruit/Adafruit BMP280 Library @ 2.1.0 - adafruit/Adafruit CCS811 Library @ 1.0.4 - adafruit/Adafruit Si7021 Library @ 1.4.0 -``` - -The #ifdefs in `usermods_list.cpp` should do the rest - # Credits - Aircoookie for making WLED diff --git a/usermods/wireguard/library.json b/usermods/wireguard/library.json index 290f2794b..996484008 100644 --- a/usermods/wireguard/library.json +++ b/usermods/wireguard/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "WireGuard-ESP32-Arduino":"https://github.com/kienvu58/WireGuard-ESP32-Arduino.git" } -} \ No newline at end of file +} diff --git a/usermods/wireguard/platformio_override.ini b/usermods/wireguard/platformio_override.ini deleted file mode 100644 index fc0ae5fc9..000000000 --- a/usermods/wireguard/platformio_override.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Example PlatformIO Project Configuration Override for WireGuard -# ------------------------------------------------------------------------------ -# Copy to platformio_override.ini to activate. -# ------------------------------------------------------------------------------ -# Please visit documentation: https://docs.platformio.org/page/projectconf.html - -[platformio] -default_envs = WLED_ESP32-WireGuard - -[env:WLED_ESP32-WireGuard] -board = esp32dev -platform = ${esp32.platform} -platform_packages = ${esp32.platform_packages} -build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags_esp32} - -D WLED_RELEASE_NAME=ESP32-WireGuard - -D USERMOD_WIREGUARD -lib_deps = ${esp32.lib_deps} - https://github.com/kienvu58/WireGuard-ESP32-Arduino.git -monitor_filters = esp32_exception_decoder -board_build.partitions = ${esp32.default_partitions} -upload_speed = 921600 \ No newline at end of file From 3521732597fb838d5fda5d696c9225a415c991f0 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 12 Jan 2025 00:22:22 +0000 Subject: [PATCH 019/109] fix env:userods --- usermods/platformio_override.usermods.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/platformio_override.usermods.ini b/usermods/platformio_override.usermods.ini index 0035ac59f..3b3e6696e 100644 --- a/usermods/platformio_override.usermods.ini +++ b/usermods/platformio_override.usermods.ini @@ -6,4 +6,4 @@ build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} -board_build.partitions = ${esp32.big_partitions} \ No newline at end of file +board_build.partitions = ${esp32.big_partitions} From 52b784e0e50c316acb6fdcafb53ec41283386af6 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 12 Jan 2025 00:22:22 +0000 Subject: [PATCH 020/109] fix env:usermods --- usermods/platformio_override.usermods.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/platformio_override.usermods.ini b/usermods/platformio_override.usermods.ini index 0035ac59f..3b3e6696e 100644 --- a/usermods/platformio_override.usermods.ini +++ b/usermods/platformio_override.usermods.ini @@ -6,4 +6,4 @@ build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} -board_build.partitions = ${esp32.big_partitions} \ No newline at end of file +board_build.partitions = ${esp32.big_partitions} From 52bee88ad2d3c690f57c25140dbf082a6d13745e Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 12 Jan 2025 00:36:08 +0000 Subject: [PATCH 021/109] fix word_clock_matrix naming --- usermods/word-clock-matrix/word-clock-matrix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usermods/word-clock-matrix/word-clock-matrix.cpp b/usermods/word-clock-matrix/word-clock-matrix.cpp index c8606003d..6643d293b 100644 --- a/usermods/word-clock-matrix/word-clock-matrix.cpp +++ b/usermods/word-clock-matrix/word-clock-matrix.cpp @@ -338,5 +338,5 @@ public: }; -static WordClockMatrix word-clock-matrix; -REGISTER_USERMOD(word-clock-matrix); \ No newline at end of file +static WordClockMatrix word_clock_matrix; +REGISTER_USERMOD(word_clock_matrix); \ No newline at end of file From 075fd4da2d9ddc71f6a755a5a2edddad25fbc4d2 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 12 Jan 2025 01:38:48 +0000 Subject: [PATCH 022/109] Defining more usermod dependencies --- usermods/DHT/library.json | 5 +++- usermods/INA226_v2/library.json | 5 +++- usermods/MAX17048_v2/library.json | 5 +++- usermods/ST7789_display/README.md | 13 ---------- usermods/VL53L0X_gestures/library.json | 5 +++- usermods/VL53L0X_gestures/readme.md | 16 ------------- usermods/mpu6050_imu/library.json | 5 +++- usermods/quinled-an-penta/library.json | 6 ++++- .../quinled-an-penta/quinled-an-penta.cpp | 4 ++-- usermods/quinled-an-penta/readme.md | 23 ------------------ usermods/rgb-rotary-encoder/library.json | 5 +++- usermods/rgb-rotary-encoder/readme.md | 24 ------------------- .../rgb-rotary-encoder/rgb-rotary-encoder.cpp | 4 ++-- 13 files changed, 33 insertions(+), 87 deletions(-) diff --git a/usermods/DHT/library.json b/usermods/DHT/library.json index bb6773615..ec7158d21 100644 --- a/usermods/DHT/library.json +++ b/usermods/DHT/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "DHT_nonblocking":"https://github.com/alwynallan/DHT_nonblocking" } -} \ No newline at end of file +} diff --git a/usermods/INA226_v2/library.json b/usermods/INA226_v2/library.json index 2596b86a5..be6987e25 100644 --- a/usermods/INA226_v2/library.json +++ b/usermods/INA226_v2/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "wollewald/INA226_WE":"~1.2.9" } -} \ No newline at end of file +} diff --git a/usermods/MAX17048_v2/library.json b/usermods/MAX17048_v2/library.json index 72ac0e61f..f85b33cf2 100644 --- a/usermods/MAX17048_v2/library.json +++ b/usermods/MAX17048_v2/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "Adafruit_MAX1704X":"https://github.com/adafruit/Adafruit_MAX1704X#1.0.2" } -} \ No newline at end of file +} diff --git a/usermods/ST7789_display/README.md b/usermods/ST7789_display/README.md index ebaae4922..7dd3b599e 100644 --- a/usermods/ST7789_display/README.md +++ b/usermods/ST7789_display/README.md @@ -27,19 +27,6 @@ This usermod enables display of the following: ### Platformio.ini changes -In the `platformio.ini` file, uncomment the `TFT_eSPI` line within the [common] section, under `lib_deps`: - -```ini -# platformio.ini -... -[common] -... -lib_deps = - ... - #For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line - #TFT_eSPI -... -``` In the `platformio.ini` file, you must change the environment setup to build for just the esp32dev platform as follows: diff --git a/usermods/VL53L0X_gestures/library.json b/usermods/VL53L0X_gestures/library.json index 77521d6f3..6dfe4c4db 100644 --- a/usermods/VL53L0X_gestures/library.json +++ b/usermods/VL53L0X_gestures/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "pololu/VL53L0X" : "^1.3.0" } -} \ No newline at end of file +} diff --git a/usermods/VL53L0X_gestures/readme.md b/usermods/VL53L0X_gestures/readme.md index a230b1a65..04c4a4aa5 100644 --- a/usermods/VL53L0X_gestures/readme.md +++ b/usermods/VL53L0X_gestures/readme.md @@ -10,20 +10,4 @@ Useful for controlling strips when you want to avoid touching anything. 1. Attach VL53L0X sensor to i2c pins according to default pins for your board. 2. Add `-D USERMOD_VL53L0X_GESTURES` to your build flags at platformio.ini (plaformio_override.ini) for needed environment. -In my case, for example: `build_flags = ${env.build_flags} -D USERMOD_VL53L0X_GESTURES` -3. Add "pololu/VL53L0X" dependency below to `lib_deps` like this: -```ini -lib_deps = ${env.lib_deps} - pololu/VL53L0X @ ^1.3.0 -``` -My entire `platformio_override.ini` for example (for nodemcu board): -```ini -[platformio] -default_envs = nodemcuv2 - -[env:nodemcuv2] -build_flags = ${env.build_flags} -D USERMOD_VL53L0X_GESTURES -lib_deps = ${env.lib_deps} - pololu/VL53L0X @ ^1.3.0 -``` diff --git a/usermods/mpu6050_imu/library.json b/usermods/mpu6050_imu/library.json index bf86aed62..68db4d2f8 100644 --- a/usermods/mpu6050_imu/library.json +++ b/usermods/mpu6050_imu/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "electroniccats/MPU6050":"1.0.1" } -} \ No newline at end of file +} diff --git a/usermods/quinled-an-penta/library.json b/usermods/quinled-an-penta/library.json index 274020d94..2fe3e11a8 100644 --- a/usermods/quinled-an-penta/library.json +++ b/usermods/quinled-an-penta/library.json @@ -5,5 +5,9 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "olikraus/U8g2":"~2.28.8", + "robtillaart/SHT85":"~0.3.3" } -} \ No newline at end of file +} diff --git a/usermods/quinled-an-penta/quinled-an-penta.cpp b/usermods/quinled-an-penta/quinled-an-penta.cpp index 612ade03b..1fbfd807e 100644 --- a/usermods/quinled-an-penta/quinled-an-penta.cpp +++ b/usermods/quinled-an-penta/quinled-an-penta.cpp @@ -754,5 +754,5 @@ const unsigned char QuinLEDAnPentaUsermod::quinLedLogo[] PROGMEM = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; -static QuinLEDAnPentaUsermod quinled-an-penta; -REGISTER_USERMOD(quinled-an-penta); \ No newline at end of file +static QuinLEDAnPentaUsermod quinled_an_penta; +REGISTER_USERMOD(quinled_an_penta); \ No newline at end of file diff --git a/usermods/quinled-an-penta/readme.md b/usermods/quinled-an-penta/readme.md index c1260d913..db1f72c4a 100644 --- a/usermods/quinled-an-penta/readme.md +++ b/usermods/quinled-an-penta/readme.md @@ -5,29 +5,6 @@ The (un)official usermod to get the best out of the QuinLED-An-Penta (https://qu * "u8g2" by olikraus, v2.28 or higher: https://github.com/olikraus/u8g2 * "SHT85" by Rob Tillaart, v0.2 or higher: https://github.com/RobTillaart/SHT85 -## Usermod installation -Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one, add the buildflag `-D QUINLED_AN_PENTA` and the below library dependencies. - -ESP32 (**without** ethernet): -``` -[env:custom_esp32dev_usermod_quinled_an_penta] -extends = env:esp32dev -build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D QUINLED_AN_PENTA -lib_deps = ${esp32.lib_deps} - olikraus/U8g2@~2.28.8 - robtillaart/SHT85@~0.2.0 -``` - -ESP32 (**with** ethernet): -``` -[env:custom_esp32dev_usermod_quinled_an_penta] -extends = env:esp32dev -build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D WLED_USE_ETHERNET -D QUINLED_AN_PENTA -lib_deps = ${esp32.lib_deps} - olikraus/U8g2@~2.28.8 - robtillaart/SHT85@~0.2.0 -``` - ## Some words about the (optional) OLED This mod has been optimized for an SSD1306 driven 128x64 OLED. Using a smaller OLED or an OLED using a different driver will result in unexpected results. I highly recommend using these "two color monochromatic OLEDs", which have the first 16 pixels in a different color than the other 48, e.g. a yellow/blue OLED. diff --git a/usermods/rgb-rotary-encoder/library.json b/usermods/rgb-rotary-encoder/library.json index c23606c0a..dd6169a31 100644 --- a/usermods/rgb-rotary-encoder/library.json +++ b/usermods/rgb-rotary-encoder/library.json @@ -5,5 +5,8 @@ "includeDir": "../../wled00", "libLDFMode": "chain+", "libArchive": false + }, + "dependencies": { + "lennarthennigs/ESP Rotary":"^2.1.1" } -} \ No newline at end of file +} diff --git a/usermods/rgb-rotary-encoder/readme.md b/usermods/rgb-rotary-encoder/readme.md index 653179179..abd8a812c 100644 --- a/usermods/rgb-rotary-encoder/readme.md +++ b/usermods/rgb-rotary-encoder/readme.md @@ -8,30 +8,6 @@ https://user-images.githubusercontent.com/3090131/124680599-0180ab80-dec7-11eb-9 The actual / original code that controls the LED modes is from Adam Zeloof. I take no credit for it. I ported it to WLED, which involved replacing the LED library he used, (because WLED already has one, so no need to add another one) plus the rotary encoder library because it was not compatible with ESP, only Arduino. It was quite a bit more work than I hoped, but I got there eventually :) -## Requirements -* "ESP Rotary" by Lennart Hennigs, v2.1.1 or higher: https://github.com/LennartHennigs/ESPRotary - -## Usermod installation -Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one and add the buildflag `-D RGB_ROTARY_ENCODER`. - -ESP32: -``` -[env:custom_esp32dev_usermod_rgb_encoder_board] -extends = env:esp32dev -build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D RGB_ROTARY_ENCODER -lib_deps = ${esp32.lib_deps} - lennarthennigs/ESP Rotary@^2.1.1 -``` - -ESP8266 / D1 Mini: -``` -[env:custom_d1_mini_usermod_rgb_encoder_board] -extends = env:d1_mini -build_flags = ${common.build_flags_esp8266} -D RGB_ROTARY_ENCODER -lib_deps = ${esp8266.lib_deps} - lennarthennigs/ESP Rotary@^2.1.1 -``` - ## How to connect the board to your ESP We'll need (minimum) three or (maximum) four GPIOs for the board: * "ea": reports the encoder direction diff --git a/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp b/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp index 3e7b96bb2..5b4e73153 100644 --- a/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp +++ b/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp @@ -342,5 +342,5 @@ const char RgbRotaryEncoderUsermod::_ledBrightness[] PROGMEM = "LED-Brightne const char RgbRotaryEncoderUsermod::_stepsPerClick[] PROGMEM = "Steps-per-Click"; const char RgbRotaryEncoderUsermod::_incrementPerClick[] PROGMEM = "Increment-per-Click"; -static RgbRotaryEncoderUsermod rgb-rotary-encoder; -REGISTER_USERMOD(rgb-rotary-encoder); \ No newline at end of file +static RgbRotaryEncoderUsermod rgb_rotary_encoder; +REGISTER_USERMOD(rgb_rotary_encoder); \ No newline at end of file From 8527d231e1624244c68ea78cebc996eee61736e0 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 12 Jan 2025 13:12:12 +0000 Subject: [PATCH 023/109] audioreactive: Move flags to library Use a PlatformIO script to move the last of AR_buildflags in to the module itself. --- usermods/audioreactive/library.json | 31 ++++++++++++------------- usermods/audioreactive/override_sqrt.py | 5 ++++ 2 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 usermods/audioreactive/override_sqrt.py diff --git a/usermods/audioreactive/library.json b/usermods/audioreactive/library.json index 658bf9432..2ce60ec6b 100644 --- a/usermods/audioreactive/library.json +++ b/usermods/audioreactive/library.json @@ -1,17 +1,16 @@ -{ - "name": "audioreactive", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, - "dependencies": [ - { - "owner": "kosme", - "name": "arduinoFFT", - "version": "2.0.1", - "platforms": "espressif32" - } - ] +{ + "name": "audioreactive", + "build": { + "srcDir": ".", + "includeDir": "../../wled00", + "extraScript": "override_sqrt.py" + }, + "dependencies": [ + { + "owner": "kosme", + "name": "arduinoFFT", + "version": "2.0.1", + "platforms": "espressif32" + } + ] } \ No newline at end of file diff --git a/usermods/audioreactive/override_sqrt.py b/usermods/audioreactive/override_sqrt.py new file mode 100644 index 000000000..36aa79df4 --- /dev/null +++ b/usermods/audioreactive/override_sqrt.py @@ -0,0 +1,5 @@ +Import('env') + +for lb in env.GetLibBuilders(): + if lb.name == "arduinoFFT": + lb.env.Append(CPPDEFINES=[("sqrt_internal", "sqrtf")]) From cc9e9b109cb7a9b85531c707ec4bfb086d1faefb Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 12 Jan 2025 17:07:36 +0000 Subject: [PATCH 024/109] Fix usermod library builds Manage include folders via a second platformio script, fixing builds and removing all the extra boilerplate from usermod library.json files. --- pio-scripts/fixup_usermods.py | 17 +++++++++++++++++ platformio.ini | 1 + usermods/audioreactive/library.json | 2 -- usermods/usermod_v2_animartrix/library.json | 6 ------ usermods/usermod_v2_auto_save/library.json | 7 +------ 5 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 pio-scripts/fixup_usermods.py diff --git a/pio-scripts/fixup_usermods.py b/pio-scripts/fixup_usermods.py new file mode 100644 index 000000000..5b8cddf32 --- /dev/null +++ b/pio-scripts/fixup_usermods.py @@ -0,0 +1,17 @@ +Import('env') + +# Patch up each usermod's include folders to include anything referenced by wled +# This is because usermods need to include wled.h +lib_builders = env.GetLibBuilders() +um_deps = [dep for dep in lib_builders if "/usermods" in dep.src_dir] +other_deps = [dep for dep in lib_builders if "/usermods" not in dep.src_dir] + +for um in um_deps: + # Add include paths for all non-usermod dependencies + for dep in other_deps: + for dir in dep.get_include_dirs(): + um.env.PrependUnique(CPPPATH=dir) + # Add the wled folder to the include path + um.env.PrependUnique(CPPPATH=env["PROJECT_SRC_DIR"]) + +#raise RuntimeError("debug") diff --git a/platformio.ini b/platformio.ini index 4832978a9..f8366da0b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -115,6 +115,7 @@ extra_scripts = post:pio-scripts/strip-floats.py pre:pio-scripts/user_config_copy.py pre:pio-scripts/load_usermods.py + post:pio-scripts/fixup_usermods.py pre:pio-scripts/build_ui.py ; post:pio-scripts/obj-dump.py ;; convenience script to create a disassembly dump of the firmware (hardcore debugging) diff --git a/usermods/audioreactive/library.json b/usermods/audioreactive/library.json index 2ce60ec6b..77f30d2c4 100644 --- a/usermods/audioreactive/library.json +++ b/usermods/audioreactive/library.json @@ -1,8 +1,6 @@ { "name": "audioreactive", "build": { - "srcDir": ".", - "includeDir": "../../wled00", "extraScript": "override_sqrt.py" }, "dependencies": [ diff --git a/usermods/usermod_v2_animartrix/library.json b/usermods/usermod_v2_animartrix/library.json index f176e72ed..4552be330 100644 --- a/usermods/usermod_v2_animartrix/library.json +++ b/usermods/usermod_v2_animartrix/library.json @@ -1,11 +1,5 @@ { "name": "animartrix", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "Animartrix": "https://github.com/netmindz/animartrix.git#b172586" } diff --git a/usermods/usermod_v2_auto_save/library.json b/usermods/usermod_v2_auto_save/library.json index 40676ed55..9d81aa682 100644 --- a/usermods/usermod_v2_auto_save/library.json +++ b/usermods/usermod_v2_auto_save/library.json @@ -1,8 +1,3 @@ { - "name": "auto_save", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+" - } + "name": "auto_save" } \ No newline at end of file From f2626b0fc0e355f013ed8483445b430cc5214846 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 12 Jan 2025 17:09:33 +0000 Subject: [PATCH 025/109] Remove now-obsolete AR_build_flags --- platformio.ini | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/platformio.ini b/platformio.ini index f8366da0b..7094b7d23 100644 --- a/platformio.ini +++ b/platformio.ini @@ -260,8 +260,8 @@ lib_deps = ${env.lib_deps} board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs # additional build flags for audioreactive - must be applied globally -AR_build_flags = -D sqrt_internal=sqrtf ;; -fsingle-precision-constant ;; forces ArduinoFFT to use float math (2x faster) -AR_lib_deps = kosme/arduinoFFT @ 2.0.1 ;; for pre-usermod-library platformio_override compatibility +AR_build_flags = ;; -fsingle-precision-constant ;; forces ArduinoFFT to use float math (2x faster) +AR_lib_deps = ;; for pre-usermod-library platformio_override compatibility [esp32_idf_V4] @@ -424,7 +424,6 @@ platform_packages = ${esp32.platform_packages} custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32\" #-D WLED_DISABLE_BROWNOUT_DET - ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} monitor_filters = esp32_exception_decoder board_build.partitions = ${esp32.default_partitions} @@ -436,7 +435,6 @@ platform_packages = ${esp32_idf_V4.platform_packages} custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_8M\" #-D WLED_DISABLE_BROWNOUT_DET - ${esp32.AR_build_flags} lib_deps = ${esp32_idf_V4.lib_deps} monitor_filters = esp32_exception_decoder board_build.partitions = ${esp32.large_partitions} @@ -452,7 +450,6 @@ platform_packages = ${esp32_idf_V4.platform_packages} custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_16M\" #-D WLED_DISABLE_BROWNOUT_DET - ${esp32.AR_build_flags} lib_deps = ${esp32_idf_V4.lib_deps} monitor_filters = esp32_exception_decoder board_build.partitions = ${esp32.extreme_partitions} @@ -468,7 +465,6 @@ board_build.flash_mode = dio ;custom_usermods = audioreactive ;build_unflags = ${common.build_unflags} ;build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_audioreactive\" #-D WLED_DISABLE_BROWNOUT_DET -; ${esp32.AR_build_flags} ;lib_deps = ${esp32.lib_deps} ;monitor_filters = esp32_exception_decoder ;board_build.partitions = ${esp32.default_partitions} @@ -484,7 +480,6 @@ custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_Ethernet\" -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 ; -D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only - ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} board_build.partitions = ${esp32.default_partitions} @@ -501,7 +496,6 @@ build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_WROVER\" -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue ;; Older ESP32 (rev.<3) need a PSRAM fix (increases static RAM used) https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/external-ram.html -D DATA_PINS=25 - ${esp32.AR_build_flags} lib_deps = ${esp32_idf_V4.lib_deps} [env:esp32c3dev] @@ -534,7 +528,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= ;-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip -D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") -DBOARD_HAS_PSRAM - ${esp32.AR_build_flags} lib_deps = ${esp32s3.lib_deps} board_build.partitions = ${esp32.extreme_partitions} board_upload.flash_size = 16MB @@ -557,7 +550,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= ;-D ARDUINO_USB_CDC_ON_BOOT=0 ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip -D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB") -DBOARD_HAS_PSRAM - ${esp32.AR_build_flags} lib_deps = ${esp32s3.lib_deps} board_build.partitions = ${esp32.large_partitions} board_build.f_flash = 80000000L @@ -582,7 +574,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= -D LEDPIN=38 -D DATA_PINS=38 ;; buildin WS2812b LED -D BTNPIN=0 -D RLYPIN=16 -D IRPIN=17 -D AUDIOPIN=-1 -D WLED_DEBUG - ${esp32.AR_build_flags} -D SR_DMTYPE=1 -D I2S_SDPIN=13 -D I2S_CKPIN=14 -D I2S_WSPIN=15 -D MCLK_PIN=4 ;; I2S mic lib_deps = ${esp32s3.lib_deps} @@ -604,7 +595,6 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D WLED_RELEASE_NAME= -DBOARD_HAS_PSRAM -DLOLIN_WIFI_FIX ; seems to work much better with this -D WLED_WATCHDOG_TIMEOUT=0 - ${esp32.AR_build_flags} lib_deps = ${esp32s3.lib_deps} board_build.partitions = ${esp32.default_partitions} board_build.f_flash = 80000000L @@ -635,5 +625,4 @@ build_flags = ${common.build_flags} ${esp32s2.build_flags} -D WLED_RELEASE_NAME= -D HW_PIN_DATASPI=11 -D HW_PIN_MISOSPI=9 ; -D STATUSLED=15 - ${esp32.AR_build_flags} lib_deps = ${esp32s2.lib_deps} From 24accf96a859c0e4023a5db925d7ecc3898aebf7 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Mon, 13 Jan 2025 10:53:24 +0000 Subject: [PATCH 026/109] Remove now redundant build section from library.json --- usermods/ADS1115_v2/library.json | 6 ------ usermods/AHT10_v2/library.json | 6 ------ usermods/Analog_Clock/library.json | 8 +------- usermods/Animated_Staircase/library.json | 8 +------- usermods/BH1750_v2/library.json | 6 ------ usermods/BME280_v2/library.json | 8 +------- usermods/BME68X_v2/library.json | 6 ------ usermods/Battery/library.json | 8 +------- usermods/Cronixie/library.json | 8 +------- usermods/DHT/library.json | 6 ------ usermods/EleksTube_IPS/library.json | 8 +------- usermods/INA226_v2/library.json | 6 ------ usermods/Internal_Temperature_v2/library.json | 8 +------- usermods/LD2410_v2/library.json | 8 +------- usermods/LDR_Dusk_Dawn_v2/library.json | 8 +------- usermods/MAX17048_v2/library.json | 6 ------ usermods/MY9291/library.json | 8 +------- usermods/PIR_sensor_switch/library.json | 8 +------- usermods/PWM_fan/library.json | 8 +------- usermods/RTC/library.json | 8 +------- usermods/SN_Photoresistor/library.json | 8 +------- usermods/ST7789_display/library.json | 8 +------- usermods/Si7021_MQTT_HA/library.json | 8 +------- usermods/Temperature/library.json | 6 ------ usermods/TetrisAI_v2/library.json | 8 +------- usermods/VL53L0X_gestures/library.json | 6 ------ usermods/audioreactive/library.json | 8 +------- usermods/boblight/library.json | 8 +------- usermods/buzzer/library.json | 8 +------- usermods/deep_sleep/library.json | 8 +------- usermods/mpu6050_imu/library.json | 6 ------ usermods/mqtt_switch_v2/library.json | 8 +------- usermods/multi_relay/library.json | 8 +------- usermods/pixels_dice_tray/library.json | 6 ------ usermods/pov_display/library.json | 6 ------ usermods/pwm_outputs/library.json | 8 +------- usermods/quinled-an-penta/library.json | 6 ------ usermods/rgb-rotary-encoder/library.json | 6 ------ usermods/sd_card/library.json | 8 +------- usermods/sensors_to_mqtt/library.json | 6 ------ usermods/seven_segment_display/library.json | 8 +------- usermods/seven_segment_display_reloaded/library.json | 8 +------- usermods/sht/library.json | 8 +------- usermods/smartnest/library.json | 8 +------- usermods/stairway_wipe_basic/library.json | 8 +------- usermods/usermod_rotary_brightness_color/library.json | 8 +------- usermods/usermod_v2_HttpPullLightControl/library.json | 8 +------- usermods/usermod_v2_animartrix/library.json | 6 ------ usermods/usermod_v2_auto_save/library.json | 9 ++------- usermods/usermod_v2_four_line_display_ALT/library.json | 8 +------- usermods/usermod_v2_klipper_percentage/library.json | 8 +------- usermods/usermod_v2_ping_pong_clock/library.json | 8 +------- usermods/usermod_v2_rotary_encoder_ui_ALT/library.json | 8 +------- usermods/usermod_v2_word_clock/library.json | 8 +------- usermods/wireguard/library.json | 6 ------ usermods/wizlights/library.json | 8 +------- usermods/word-clock-matrix/library.json | 8 +------- 57 files changed, 41 insertions(+), 382 deletions(-) diff --git a/usermods/ADS1115_v2/library.json b/usermods/ADS1115_v2/library.json index 179a56e5b..0b93c9351 100644 --- a/usermods/ADS1115_v2/library.json +++ b/usermods/ADS1115_v2/library.json @@ -1,11 +1,5 @@ { "name:": "ADS1115_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "Adafruit BusIO": "https://github.com/adafruit/Adafruit_BusIO#1.13.2", "Adafruit ADS1X15": "https://github.com/adafruit/Adafruit_ADS1X15#2.4.0" diff --git a/usermods/AHT10_v2/library.json b/usermods/AHT10_v2/library.json index 28bac4353..94a206c57 100644 --- a/usermods/AHT10_v2/library.json +++ b/usermods/AHT10_v2/library.json @@ -1,11 +1,5 @@ { "name:": "AHT10_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "enjoyneering/AHT10":"~1.1.0" } diff --git a/usermods/Analog_Clock/library.json b/usermods/Analog_Clock/library.json index ddba3a76f..4936950e9 100644 --- a/usermods/Analog_Clock/library.json +++ b/usermods/Analog_Clock/library.json @@ -1,9 +1,3 @@ { - "name:": "Analog_Clock", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "Analog_Clock" } \ No newline at end of file diff --git a/usermods/Animated_Staircase/library.json b/usermods/Animated_Staircase/library.json index e37df3114..626baa494 100644 --- a/usermods/Animated_Staircase/library.json +++ b/usermods/Animated_Staircase/library.json @@ -1,9 +1,3 @@ { - "name:": "Animated_Staircase", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "Animated_Staircase" } \ No newline at end of file diff --git a/usermods/BH1750_v2/library.json b/usermods/BH1750_v2/library.json index 0211bc885..b7f006cc2 100644 --- a/usermods/BH1750_v2/library.json +++ b/usermods/BH1750_v2/library.json @@ -1,11 +1,5 @@ { "name:": "BH1750_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "claws/BH1750":"^1.2.0" } diff --git a/usermods/BME280_v2/library.json b/usermods/BME280_v2/library.json index 57d41fb37..126cb362c 100644 --- a/usermods/BME280_v2/library.json +++ b/usermods/BME280_v2/library.json @@ -1,9 +1,3 @@ { - "name:": "BME280_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "BME280_v2" } \ No newline at end of file diff --git a/usermods/BME68X_v2/library.json b/usermods/BME68X_v2/library.json index ccfac0d9a..3a0e49489 100644 --- a/usermods/BME68X_v2/library.json +++ b/usermods/BME68X_v2/library.json @@ -1,11 +1,5 @@ { "name:": "BME68X_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "boschsensortec/BSEC Software Library":"^1.8.1492" } diff --git a/usermods/Battery/library.json b/usermods/Battery/library.json index bc0d97a11..3f4774b87 100644 --- a/usermods/Battery/library.json +++ b/usermods/Battery/library.json @@ -1,9 +1,3 @@ { - "name:": "Battery", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "Battery" } \ No newline at end of file diff --git a/usermods/Cronixie/library.json b/usermods/Cronixie/library.json index f0d39d001..d48327649 100644 --- a/usermods/Cronixie/library.json +++ b/usermods/Cronixie/library.json @@ -1,9 +1,3 @@ { - "name:": "Cronixie", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "Cronixie" } \ No newline at end of file diff --git a/usermods/DHT/library.json b/usermods/DHT/library.json index ec7158d21..5f2d27f09 100644 --- a/usermods/DHT/library.json +++ b/usermods/DHT/library.json @@ -1,11 +1,5 @@ { "name:": "DHT", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "DHT_nonblocking":"https://github.com/alwynallan/DHT_nonblocking" } diff --git a/usermods/EleksTube_IPS/library.json b/usermods/EleksTube_IPS/library.json index d025fc78a..27d718614 100644 --- a/usermods/EleksTube_IPS/library.json +++ b/usermods/EleksTube_IPS/library.json @@ -1,9 +1,3 @@ { - "name:": "EleksTube_IPS", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "EleksTube_IPS" } \ No newline at end of file diff --git a/usermods/INA226_v2/library.json b/usermods/INA226_v2/library.json index be6987e25..91a735fe7 100644 --- a/usermods/INA226_v2/library.json +++ b/usermods/INA226_v2/library.json @@ -1,11 +1,5 @@ { "name:": "INA226_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "wollewald/INA226_WE":"~1.2.9" } diff --git a/usermods/Internal_Temperature_v2/library.json b/usermods/Internal_Temperature_v2/library.json index 38b560da8..6c1652380 100644 --- a/usermods/Internal_Temperature_v2/library.json +++ b/usermods/Internal_Temperature_v2/library.json @@ -1,9 +1,3 @@ { - "name:": "Internal_Temperature_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "Internal_Temperature_v2" } \ No newline at end of file diff --git a/usermods/LD2410_v2/library.json b/usermods/LD2410_v2/library.json index 3480cd798..6fcded024 100644 --- a/usermods/LD2410_v2/library.json +++ b/usermods/LD2410_v2/library.json @@ -1,9 +1,3 @@ { - "name:": "LD2410_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "LD2410_v2" } \ No newline at end of file diff --git a/usermods/LDR_Dusk_Dawn_v2/library.json b/usermods/LDR_Dusk_Dawn_v2/library.json index 6a08c9cca..bb57dbd2a 100644 --- a/usermods/LDR_Dusk_Dawn_v2/library.json +++ b/usermods/LDR_Dusk_Dawn_v2/library.json @@ -1,9 +1,3 @@ { - "name:": "LDR_Dusk_Dawn_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "LDR_Dusk_Dawn_v2" } \ No newline at end of file diff --git a/usermods/MAX17048_v2/library.json b/usermods/MAX17048_v2/library.json index f85b33cf2..146333459 100644 --- a/usermods/MAX17048_v2/library.json +++ b/usermods/MAX17048_v2/library.json @@ -1,11 +1,5 @@ { "name:": "MAX17048_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "Adafruit_MAX1704X":"https://github.com/adafruit/Adafruit_MAX1704X#1.0.2" } diff --git a/usermods/MY9291/library.json b/usermods/MY9291/library.json index d965f4c35..9324e4a02 100644 --- a/usermods/MY9291/library.json +++ b/usermods/MY9291/library.json @@ -1,9 +1,3 @@ { - "name:": "MY9291", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "MY9291" } \ No newline at end of file diff --git a/usermods/PIR_sensor_switch/library.json b/usermods/PIR_sensor_switch/library.json index 152946e4c..0ee7e18b5 100644 --- a/usermods/PIR_sensor_switch/library.json +++ b/usermods/PIR_sensor_switch/library.json @@ -1,9 +1,3 @@ { - "name:": "PIR_sensor_switch", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "PIR_sensor_switch" } \ No newline at end of file diff --git a/usermods/PWM_fan/library.json b/usermods/PWM_fan/library.json index a6d5ea64f..904d77236 100644 --- a/usermods/PWM_fan/library.json +++ b/usermods/PWM_fan/library.json @@ -1,9 +1,3 @@ { - "name:": "PWM_fan", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "PWM_fan" } \ No newline at end of file diff --git a/usermods/RTC/library.json b/usermods/RTC/library.json index 96aa095bb..e0c527d2c 100644 --- a/usermods/RTC/library.json +++ b/usermods/RTC/library.json @@ -1,9 +1,3 @@ { - "name:": "RTC", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "RTC" } \ No newline at end of file diff --git a/usermods/SN_Photoresistor/library.json b/usermods/SN_Photoresistor/library.json index fe5173bed..7cac93f8d 100644 --- a/usermods/SN_Photoresistor/library.json +++ b/usermods/SN_Photoresistor/library.json @@ -1,9 +1,3 @@ { - "name:": "SN_Photoresistor", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "SN_Photoresistor" } \ No newline at end of file diff --git a/usermods/ST7789_display/library.json b/usermods/ST7789_display/library.json index 88f4efe78..abcd4635c 100644 --- a/usermods/ST7789_display/library.json +++ b/usermods/ST7789_display/library.json @@ -1,9 +1,3 @@ { - "name:": "ST7789_display", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "ST7789_display" } \ No newline at end of file diff --git a/usermods/Si7021_MQTT_HA/library.json b/usermods/Si7021_MQTT_HA/library.json index 2c18375f2..004f9f99e 100644 --- a/usermods/Si7021_MQTT_HA/library.json +++ b/usermods/Si7021_MQTT_HA/library.json @@ -1,9 +1,3 @@ { - "name:": "Si7021_MQTT_HA", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "Si7021_MQTT_HA" } \ No newline at end of file diff --git a/usermods/Temperature/library.json b/usermods/Temperature/library.json index 24de79825..6a20a7d3f 100644 --- a/usermods/Temperature/library.json +++ b/usermods/Temperature/library.json @@ -1,11 +1,5 @@ { "name:": "Temperature", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "paulstoffregen/OneWire":"~2.3.8" } diff --git a/usermods/TetrisAI_v2/library.json b/usermods/TetrisAI_v2/library.json index 199e5c434..7163dadbf 100644 --- a/usermods/TetrisAI_v2/library.json +++ b/usermods/TetrisAI_v2/library.json @@ -1,9 +1,3 @@ { - "name:": "TetrisAI_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "TetrisAI_v2" } \ No newline at end of file diff --git a/usermods/VL53L0X_gestures/library.json b/usermods/VL53L0X_gestures/library.json index 6dfe4c4db..50ff9cb45 100644 --- a/usermods/VL53L0X_gestures/library.json +++ b/usermods/VL53L0X_gestures/library.json @@ -1,11 +1,5 @@ { "name:": "VL53L0X_gestures", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "pololu/VL53L0X" : "^1.3.0" } diff --git a/usermods/audioreactive/library.json b/usermods/audioreactive/library.json index 658bf9432..70484d0a2 100644 --- a/usermods/audioreactive/library.json +++ b/usermods/audioreactive/library.json @@ -1,11 +1,5 @@ { "name": "audioreactive", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": [ { "owner": "kosme", @@ -14,4 +8,4 @@ "platforms": "espressif32" } ] -} \ No newline at end of file +} diff --git a/usermods/boblight/library.json b/usermods/boblight/library.json index 0b63b2247..741d4cb18 100644 --- a/usermods/boblight/library.json +++ b/usermods/boblight/library.json @@ -1,9 +1,3 @@ { - "name:": "boblight", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "boblight" } \ No newline at end of file diff --git a/usermods/buzzer/library.json b/usermods/buzzer/library.json index 78ba4152f..6bbcdcc34 100644 --- a/usermods/buzzer/library.json +++ b/usermods/buzzer/library.json @@ -1,9 +1,3 @@ { - "name:": "buzzer", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "buzzer" } \ No newline at end of file diff --git a/usermods/deep_sleep/library.json b/usermods/deep_sleep/library.json index c15e8d577..c8f66de10 100644 --- a/usermods/deep_sleep/library.json +++ b/usermods/deep_sleep/library.json @@ -1,9 +1,3 @@ { - "name:": "deep_sleep", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "deep_sleep" } \ No newline at end of file diff --git a/usermods/mpu6050_imu/library.json b/usermods/mpu6050_imu/library.json index 68db4d2f8..295623936 100644 --- a/usermods/mpu6050_imu/library.json +++ b/usermods/mpu6050_imu/library.json @@ -1,11 +1,5 @@ { "name:": "mpu6050_imu", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "electroniccats/MPU6050":"1.0.1" } diff --git a/usermods/mqtt_switch_v2/library.json b/usermods/mqtt_switch_v2/library.json index 96695a9c7..cf9abefdb 100644 --- a/usermods/mqtt_switch_v2/library.json +++ b/usermods/mqtt_switch_v2/library.json @@ -1,9 +1,3 @@ { - "name:": "mqtt_switch_v2", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "mqtt_switch_v2" } \ No newline at end of file diff --git a/usermods/multi_relay/library.json b/usermods/multi_relay/library.json index 47505d0b4..7aa764399 100644 --- a/usermods/multi_relay/library.json +++ b/usermods/multi_relay/library.json @@ -1,9 +1,3 @@ { - "name:": "multi_relay", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "multi_relay" } \ No newline at end of file diff --git a/usermods/pixels_dice_tray/library.json b/usermods/pixels_dice_tray/library.json index 4634c4070..fd6a53a57 100644 --- a/usermods/pixels_dice_tray/library.json +++ b/usermods/pixels_dice_tray/library.json @@ -1,11 +1,5 @@ { "name:": "pixels_dice_tray", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "arduino-pixels-dice":"https://github.com/axlan/arduino-pixels-dice.git" } diff --git a/usermods/pov_display/library.json b/usermods/pov_display/library.json index a3885417d..298739b5d 100644 --- a/usermods/pov_display/library.json +++ b/usermods/pov_display/library.json @@ -1,11 +1,5 @@ { "name:": "pov_display", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "bitbank2/PNGdec":"^1.0.3" } diff --git a/usermods/pwm_outputs/library.json b/usermods/pwm_outputs/library.json index 18ce7d883..4bf07777a 100644 --- a/usermods/pwm_outputs/library.json +++ b/usermods/pwm_outputs/library.json @@ -1,9 +1,3 @@ { - "name:": "pwm_outputs", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "pwm_outputs" } \ No newline at end of file diff --git a/usermods/quinled-an-penta/library.json b/usermods/quinled-an-penta/library.json index 2fe3e11a8..e89dc0020 100644 --- a/usermods/quinled-an-penta/library.json +++ b/usermods/quinled-an-penta/library.json @@ -1,11 +1,5 @@ { "name:": "quinled-an-penta", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "olikraus/U8g2":"~2.28.8", "robtillaart/SHT85":"~0.3.3" diff --git a/usermods/rgb-rotary-encoder/library.json b/usermods/rgb-rotary-encoder/library.json index dd6169a31..25572e116 100644 --- a/usermods/rgb-rotary-encoder/library.json +++ b/usermods/rgb-rotary-encoder/library.json @@ -1,11 +1,5 @@ { "name:": "rgb-rotary-encoder", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "lennarthennigs/ESP Rotary":"^2.1.1" } diff --git a/usermods/sd_card/library.json b/usermods/sd_card/library.json index 777c6264f..1f123ead6 100644 --- a/usermods/sd_card/library.json +++ b/usermods/sd_card/library.json @@ -1,9 +1,3 @@ { - "name:": "sd_card", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "sd_card" } \ No newline at end of file diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json index c1bb6ec8f..6594152c8 100644 --- a/usermods/sensors_to_mqtt/library.json +++ b/usermods/sensors_to_mqtt/library.json @@ -1,11 +1,5 @@ { "name:": "sensors_to_mqtt", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "adafruit/Adafruit BMP280 Library":"2.1.0", "adafruit/Adafruit CCS811 Library":"1.0.4", diff --git a/usermods/seven_segment_display/library.json b/usermods/seven_segment_display/library.json index c10bd084c..8764e92b3 100644 --- a/usermods/seven_segment_display/library.json +++ b/usermods/seven_segment_display/library.json @@ -1,9 +1,3 @@ { - "name:": "seven_segment_display", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "seven_segment_display" } \ No newline at end of file diff --git a/usermods/seven_segment_display_reloaded/library.json b/usermods/seven_segment_display_reloaded/library.json index 485aa4fd8..fdce8b536 100644 --- a/usermods/seven_segment_display_reloaded/library.json +++ b/usermods/seven_segment_display_reloaded/library.json @@ -1,9 +1,3 @@ { - "name:": "seven_segment_display_reloaded", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "seven_segment_display_reloaded" } \ No newline at end of file diff --git a/usermods/sht/library.json b/usermods/sht/library.json index 2cb0003ac..330093bda 100644 --- a/usermods/sht/library.json +++ b/usermods/sht/library.json @@ -1,9 +1,3 @@ { - "name:": "sht", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "sht" } \ No newline at end of file diff --git a/usermods/smartnest/library.json b/usermods/smartnest/library.json index 4e776ad76..e2c6ab351 100644 --- a/usermods/smartnest/library.json +++ b/usermods/smartnest/library.json @@ -1,9 +1,3 @@ { - "name:": "smartnest", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "smartnest" } \ No newline at end of file diff --git a/usermods/stairway_wipe_basic/library.json b/usermods/stairway_wipe_basic/library.json index 6b3a52368..59cb5da93 100644 --- a/usermods/stairway_wipe_basic/library.json +++ b/usermods/stairway_wipe_basic/library.json @@ -1,9 +1,3 @@ { - "name:": "stairway_wipe_basic", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "stairway_wipe_basic" } \ No newline at end of file diff --git a/usermods/usermod_rotary_brightness_color/library.json b/usermods/usermod_rotary_brightness_color/library.json index 8d368082b..777ec19c0 100644 --- a/usermods/usermod_rotary_brightness_color/library.json +++ b/usermods/usermod_rotary_brightness_color/library.json @@ -1,9 +1,3 @@ { - "name:": "usermod_rotary_brightness_color", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "usermod_rotary_brightness_color" } \ No newline at end of file diff --git a/usermods/usermod_v2_HttpPullLightControl/library.json b/usermods/usermod_v2_HttpPullLightControl/library.json index 68b937081..0f66710b3 100644 --- a/usermods/usermod_v2_HttpPullLightControl/library.json +++ b/usermods/usermod_v2_HttpPullLightControl/library.json @@ -1,9 +1,3 @@ { - "name:": "usermod_v2_HttpPullLightControl", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "usermod_v2_HttpPullLightControl" } \ No newline at end of file diff --git a/usermods/usermod_v2_animartrix/library.json b/usermods/usermod_v2_animartrix/library.json index f176e72ed..4552be330 100644 --- a/usermods/usermod_v2_animartrix/library.json +++ b/usermods/usermod_v2_animartrix/library.json @@ -1,11 +1,5 @@ { "name": "animartrix", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "Animartrix": "https://github.com/netmindz/animartrix.git#b172586" } diff --git a/usermods/usermod_v2_auto_save/library.json b/usermods/usermod_v2_auto_save/library.json index 40676ed55..67b29ca69 100644 --- a/usermods/usermod_v2_auto_save/library.json +++ b/usermods/usermod_v2_auto_save/library.json @@ -1,8 +1,3 @@ -{ - "name": "auto_save", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+" - } +{ + "name:": "usermod_v2_auto_save" } \ No newline at end of file diff --git a/usermods/usermod_v2_four_line_display_ALT/library.json b/usermods/usermod_v2_four_line_display_ALT/library.json index 6dccb4a98..56612c96e 100644 --- a/usermods/usermod_v2_four_line_display_ALT/library.json +++ b/usermods/usermod_v2_four_line_display_ALT/library.json @@ -1,9 +1,3 @@ { - "name:": "usermod_v2_four_line_display_ALT", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "usermod_v2_four_line_display_ALT" } \ No newline at end of file diff --git a/usermods/usermod_v2_klipper_percentage/library.json b/usermods/usermod_v2_klipper_percentage/library.json index afd961631..b31fb1ad1 100644 --- a/usermods/usermod_v2_klipper_percentage/library.json +++ b/usermods/usermod_v2_klipper_percentage/library.json @@ -1,9 +1,3 @@ { - "name:": "usermod_v2_klipper_percentage", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "usermod_v2_klipper_percentage" } \ No newline at end of file diff --git a/usermods/usermod_v2_ping_pong_clock/library.json b/usermods/usermod_v2_ping_pong_clock/library.json index 197086113..fe23cd910 100644 --- a/usermods/usermod_v2_ping_pong_clock/library.json +++ b/usermods/usermod_v2_ping_pong_clock/library.json @@ -1,9 +1,3 @@ { - "name:": "usermod_v2_ping_pong_clock", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "usermod_v2_ping_pong_clock" } \ No newline at end of file diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json index f7c60ecdd..5f857218b 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json @@ -1,9 +1,3 @@ { - "name:": "usermod_v2_rotary_encoder_ui_ALT", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "usermod_v2_rotary_encoder_ui_ALT" } \ No newline at end of file diff --git a/usermods/usermod_v2_word_clock/library.json b/usermods/usermod_v2_word_clock/library.json index 74a3d9035..83c14dc7e 100644 --- a/usermods/usermod_v2_word_clock/library.json +++ b/usermods/usermod_v2_word_clock/library.json @@ -1,9 +1,3 @@ { - "name:": "usermod_v2_word_clock", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "usermod_v2_word_clock" } \ No newline at end of file diff --git a/usermods/wireguard/library.json b/usermods/wireguard/library.json index 996484008..0ebace8b5 100644 --- a/usermods/wireguard/library.json +++ b/usermods/wireguard/library.json @@ -1,11 +1,5 @@ { "name:": "wireguard", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - }, "dependencies": { "WireGuard-ESP32-Arduino":"https://github.com/kienvu58/WireGuard-ESP32-Arduino.git" } diff --git a/usermods/wizlights/library.json b/usermods/wizlights/library.json index a82dd7fcb..687fba0f7 100644 --- a/usermods/wizlights/library.json +++ b/usermods/wizlights/library.json @@ -1,9 +1,3 @@ { - "name:": "wizlights", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "wizlights" } \ No newline at end of file diff --git a/usermods/word-clock-matrix/library.json b/usermods/word-clock-matrix/library.json index ed29ae088..d971dfff4 100644 --- a/usermods/word-clock-matrix/library.json +++ b/usermods/word-clock-matrix/library.json @@ -1,9 +1,3 @@ { - "name:": "word-clock-matrix", - "build": { - "srcDir": ".", - "includeDir": "../../wled00", - "libLDFMode": "chain+", - "libArchive": false - } + "name:": "word-clock-matrix" } \ No newline at end of file From b380d5e2c7df29820b91b4d7aa4be7350b8d9a9d Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Tue, 14 Jan 2025 00:10:55 +0000 Subject: [PATCH 027/109] reinstate libArchive:false --- usermods/ADS1115_v2/library.json | 1 + usermods/AHT10_v2/library.json | 1 + usermods/Analog_Clock/library.json | 3 ++- usermods/Animated_Staircase/library.json | 3 ++- usermods/BH1750_v2/library.json | 1 + usermods/BME280_v2/library.json | 3 ++- usermods/BME68X_v2/library.json | 1 + usermods/Battery/library.json | 3 ++- usermods/Cronixie/library.json | 3 ++- usermods/DHT/library.json | 1 + usermods/EleksTube_IPS/library.json | 3 ++- usermods/INA226_v2/library.json | 1 + usermods/Internal_Temperature_v2/library.json | 3 ++- usermods/LD2410_v2/library.json | 3 ++- usermods/LDR_Dusk_Dawn_v2/library.json | 3 ++- usermods/MAX17048_v2/library.json | 1 + usermods/MY9291/library.json | 3 ++- usermods/PIR_sensor_switch/library.json | 3 ++- usermods/PWM_fan/library.json | 3 ++- usermods/RTC/library.json | 3 ++- usermods/SN_Photoresistor/library.json | 3 ++- usermods/ST7789_display/library.json | 3 ++- usermods/Si7021_MQTT_HA/library.json | 3 ++- usermods/Temperature/library.json | 1 + usermods/TetrisAI_v2/library.json | 3 ++- usermods/VL53L0X_gestures/library.json | 1 + usermods/audioreactive/library.json | 1 + usermods/boblight/library.json | 3 ++- usermods/buzzer/library.json | 3 ++- usermods/deep_sleep/library.json | 3 ++- usermods/mpu6050_imu/library.json | 1 + usermods/mqtt_switch_v2/library.json | 3 ++- usermods/multi_relay/library.json | 3 ++- usermods/pixels_dice_tray/library.json | 1 + usermods/pov_display/library.json | 1 + usermods/pwm_outputs/library.json | 3 ++- usermods/quinled-an-penta/library.json | 1 + usermods/rgb-rotary-encoder/library.json | 1 + usermods/sd_card/library.json | 3 ++- usermods/sensors_to_mqtt/library.json | 1 + usermods/seven_segment_display/library.json | 3 ++- usermods/seven_segment_display_reloaded/library.json | 3 ++- usermods/sht/library.json | 3 ++- usermods/smartnest/library.json | 3 ++- usermods/stairway_wipe_basic/library.json | 3 ++- usermods/usermod_rotary_brightness_color/library.json | 3 ++- usermods/usermod_v2_HttpPullLightControl/library.json | 3 ++- usermods/usermod_v2_animartrix/library.json | 1 + usermods/usermod_v2_auto_save/library.json | 3 ++- usermods/usermod_v2_four_line_display_ALT/library.json | 3 ++- usermods/usermod_v2_klipper_percentage/library.json | 3 ++- usermods/usermod_v2_ping_pong_clock/library.json | 3 ++- usermods/usermod_v2_rotary_encoder_ui_ALT/library.json | 3 ++- usermods/usermod_v2_word_clock/library.json | 3 ++- usermods/wireguard/library.json | 1 + usermods/wizlights/library.json | 3 ++- usermods/word-clock-matrix/library.json | 3 ++- 57 files changed, 96 insertions(+), 39 deletions(-) diff --git a/usermods/ADS1115_v2/library.json b/usermods/ADS1115_v2/library.json index 0b93c9351..0ce2039f9 100644 --- a/usermods/ADS1115_v2/library.json +++ b/usermods/ADS1115_v2/library.json @@ -1,5 +1,6 @@ { "name:": "ADS1115_v2", + "build": { "libArchive": false }, "dependencies": { "Adafruit BusIO": "https://github.com/adafruit/Adafruit_BusIO#1.13.2", "Adafruit ADS1X15": "https://github.com/adafruit/Adafruit_ADS1X15#2.4.0" diff --git a/usermods/AHT10_v2/library.json b/usermods/AHT10_v2/library.json index 94a206c57..b4501ed72 100644 --- a/usermods/AHT10_v2/library.json +++ b/usermods/AHT10_v2/library.json @@ -1,5 +1,6 @@ { "name:": "AHT10_v2", + "build": { "libArchive": false }, "dependencies": { "enjoyneering/AHT10":"~1.1.0" } diff --git a/usermods/Analog_Clock/library.json b/usermods/Analog_Clock/library.json index 4936950e9..7a2fc50d5 100644 --- a/usermods/Analog_Clock/library.json +++ b/usermods/Analog_Clock/library.json @@ -1,3 +1,4 @@ { - "name:": "Analog_Clock" + "name:": "Analog_Clock", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/Animated_Staircase/library.json b/usermods/Animated_Staircase/library.json index 626baa494..73dc3f1b6 100644 --- a/usermods/Animated_Staircase/library.json +++ b/usermods/Animated_Staircase/library.json @@ -1,3 +1,4 @@ { - "name:": "Animated_Staircase" + "name:": "Animated_Staircase", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/BH1750_v2/library.json b/usermods/BH1750_v2/library.json index b7f006cc2..2ce4054fb 100644 --- a/usermods/BH1750_v2/library.json +++ b/usermods/BH1750_v2/library.json @@ -1,5 +1,6 @@ { "name:": "BH1750_v2", + "build": { "libArchive": false }, "dependencies": { "claws/BH1750":"^1.2.0" } diff --git a/usermods/BME280_v2/library.json b/usermods/BME280_v2/library.json index 126cb362c..faae0f34a 100644 --- a/usermods/BME280_v2/library.json +++ b/usermods/BME280_v2/library.json @@ -1,3 +1,4 @@ { - "name:": "BME280_v2" + "name:": "BME280_v2", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/BME68X_v2/library.json b/usermods/BME68X_v2/library.json index 3a0e49489..6bd0bb9b2 100644 --- a/usermods/BME68X_v2/library.json +++ b/usermods/BME68X_v2/library.json @@ -1,5 +1,6 @@ { "name:": "BME68X_v2", + "build": { "libArchive": false}, "dependencies": { "boschsensortec/BSEC Software Library":"^1.8.1492" } diff --git a/usermods/Battery/library.json b/usermods/Battery/library.json index 3f4774b87..85be8542b 100644 --- a/usermods/Battery/library.json +++ b/usermods/Battery/library.json @@ -1,3 +1,4 @@ { - "name:": "Battery" + "name:": "Battery", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/Cronixie/library.json b/usermods/Cronixie/library.json index d48327649..d22bfa45f 100644 --- a/usermods/Cronixie/library.json +++ b/usermods/Cronixie/library.json @@ -1,3 +1,4 @@ { - "name:": "Cronixie" + "name:": "Cronixie", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/DHT/library.json b/usermods/DHT/library.json index 5f2d27f09..d61634e9f 100644 --- a/usermods/DHT/library.json +++ b/usermods/DHT/library.json @@ -1,5 +1,6 @@ { "name:": "DHT", + "build": { "libArchive": false}, "dependencies": { "DHT_nonblocking":"https://github.com/alwynallan/DHT_nonblocking" } diff --git a/usermods/EleksTube_IPS/library.json b/usermods/EleksTube_IPS/library.json index 27d718614..e5ed62198 100644 --- a/usermods/EleksTube_IPS/library.json +++ b/usermods/EleksTube_IPS/library.json @@ -1,3 +1,4 @@ { - "name:": "EleksTube_IPS" + "name:": "EleksTube_IPS", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/INA226_v2/library.json b/usermods/INA226_v2/library.json index 91a735fe7..3633c3a73 100644 --- a/usermods/INA226_v2/library.json +++ b/usermods/INA226_v2/library.json @@ -1,5 +1,6 @@ { "name:": "INA226_v2", + "build": { "libArchive": false}, "dependencies": { "wollewald/INA226_WE":"~1.2.9" } diff --git a/usermods/Internal_Temperature_v2/library.json b/usermods/Internal_Temperature_v2/library.json index 6c1652380..dc0ae30a4 100644 --- a/usermods/Internal_Temperature_v2/library.json +++ b/usermods/Internal_Temperature_v2/library.json @@ -1,3 +1,4 @@ { - "name:": "Internal_Temperature_v2" + "name:": "Internal_Temperature_v2", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/LD2410_v2/library.json b/usermods/LD2410_v2/library.json index 6fcded024..faef37d4d 100644 --- a/usermods/LD2410_v2/library.json +++ b/usermods/LD2410_v2/library.json @@ -1,3 +1,4 @@ { - "name:": "LD2410_v2" + "name:": "LD2410_v2", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/LDR_Dusk_Dawn_v2/library.json b/usermods/LDR_Dusk_Dawn_v2/library.json index bb57dbd2a..c5e986209 100644 --- a/usermods/LDR_Dusk_Dawn_v2/library.json +++ b/usermods/LDR_Dusk_Dawn_v2/library.json @@ -1,3 +1,4 @@ { - "name:": "LDR_Dusk_Dawn_v2" + "name:": "LDR_Dusk_Dawn_v2", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/MAX17048_v2/library.json b/usermods/MAX17048_v2/library.json index 146333459..03b9acd9f 100644 --- a/usermods/MAX17048_v2/library.json +++ b/usermods/MAX17048_v2/library.json @@ -1,5 +1,6 @@ { "name:": "MAX17048_v2", + "build": { "libArchive": false}, "dependencies": { "Adafruit_MAX1704X":"https://github.com/adafruit/Adafruit_MAX1704X#1.0.2" } diff --git a/usermods/MY9291/library.json b/usermods/MY9291/library.json index 9324e4a02..ddf7aa092 100644 --- a/usermods/MY9291/library.json +++ b/usermods/MY9291/library.json @@ -1,3 +1,4 @@ { - "name:": "MY9291" + "name:": "MY9291", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/PIR_sensor_switch/library.json b/usermods/PIR_sensor_switch/library.json index 0ee7e18b5..1c08ccc13 100644 --- a/usermods/PIR_sensor_switch/library.json +++ b/usermods/PIR_sensor_switch/library.json @@ -1,3 +1,4 @@ { - "name:": "PIR_sensor_switch" + "name:": "PIR_sensor_switch", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/PWM_fan/library.json b/usermods/PWM_fan/library.json index 904d77236..67f026204 100644 --- a/usermods/PWM_fan/library.json +++ b/usermods/PWM_fan/library.json @@ -1,3 +1,4 @@ { - "name:": "PWM_fan" + "name:": "PWM_fan", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/RTC/library.json b/usermods/RTC/library.json index e0c527d2c..17bc0d532 100644 --- a/usermods/RTC/library.json +++ b/usermods/RTC/library.json @@ -1,3 +1,4 @@ { - "name:": "RTC" + "name:": "RTC", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/SN_Photoresistor/library.json b/usermods/SN_Photoresistor/library.json index 7cac93f8d..8e34ed3b4 100644 --- a/usermods/SN_Photoresistor/library.json +++ b/usermods/SN_Photoresistor/library.json @@ -1,3 +1,4 @@ { - "name:": "SN_Photoresistor" + "name:": "SN_Photoresistor", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/ST7789_display/library.json b/usermods/ST7789_display/library.json index abcd4635c..725e20a65 100644 --- a/usermods/ST7789_display/library.json +++ b/usermods/ST7789_display/library.json @@ -1,3 +1,4 @@ { - "name:": "ST7789_display" + "name:": "ST7789_display", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/Si7021_MQTT_HA/library.json b/usermods/Si7021_MQTT_HA/library.json index 004f9f99e..60991a3e9 100644 --- a/usermods/Si7021_MQTT_HA/library.json +++ b/usermods/Si7021_MQTT_HA/library.json @@ -1,3 +1,4 @@ { - "name:": "Si7021_MQTT_HA" + "name:": "Si7021_MQTT_HA", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/Temperature/library.json b/usermods/Temperature/library.json index 6a20a7d3f..0d9f55ccd 100644 --- a/usermods/Temperature/library.json +++ b/usermods/Temperature/library.json @@ -1,5 +1,6 @@ { "name:": "Temperature", + "build": { "libArchive": false}, "dependencies": { "paulstoffregen/OneWire":"~2.3.8" } diff --git a/usermods/TetrisAI_v2/library.json b/usermods/TetrisAI_v2/library.json index 7163dadbf..b32822882 100644 --- a/usermods/TetrisAI_v2/library.json +++ b/usermods/TetrisAI_v2/library.json @@ -1,3 +1,4 @@ { - "name:": "TetrisAI_v2" + "name:": "TetrisAI_v2", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/VL53L0X_gestures/library.json b/usermods/VL53L0X_gestures/library.json index 50ff9cb45..db24abd0b 100644 --- a/usermods/VL53L0X_gestures/library.json +++ b/usermods/VL53L0X_gestures/library.json @@ -1,5 +1,6 @@ { "name:": "VL53L0X_gestures", + "build": { "libArchive": false}, "dependencies": { "pololu/VL53L0X" : "^1.3.0" } diff --git a/usermods/audioreactive/library.json b/usermods/audioreactive/library.json index 70484d0a2..4984a3bc2 100644 --- a/usermods/audioreactive/library.json +++ b/usermods/audioreactive/library.json @@ -1,5 +1,6 @@ { "name": "audioreactive", + "build": { "libArchive": false }, "dependencies": [ { "owner": "kosme", diff --git a/usermods/boblight/library.json b/usermods/boblight/library.json index 741d4cb18..34de5c8f5 100644 --- a/usermods/boblight/library.json +++ b/usermods/boblight/library.json @@ -1,3 +1,4 @@ { - "name:": "boblight" + "name:": "boblight", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/buzzer/library.json b/usermods/buzzer/library.json index 6bbcdcc34..6208090c4 100644 --- a/usermods/buzzer/library.json +++ b/usermods/buzzer/library.json @@ -1,3 +1,4 @@ { - "name:": "buzzer" + "name:": "buzzer", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/deep_sleep/library.json b/usermods/deep_sleep/library.json index c8f66de10..3f4687ef9 100644 --- a/usermods/deep_sleep/library.json +++ b/usermods/deep_sleep/library.json @@ -1,3 +1,4 @@ { - "name:": "deep_sleep" + "name:": "deep_sleep", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/mpu6050_imu/library.json b/usermods/mpu6050_imu/library.json index 295623936..3c39de450 100644 --- a/usermods/mpu6050_imu/library.json +++ b/usermods/mpu6050_imu/library.json @@ -1,5 +1,6 @@ { "name:": "mpu6050_imu", + "build": { "libArchive": false}, "dependencies": { "electroniccats/MPU6050":"1.0.1" } diff --git a/usermods/mqtt_switch_v2/library.json b/usermods/mqtt_switch_v2/library.json index cf9abefdb..d60322574 100644 --- a/usermods/mqtt_switch_v2/library.json +++ b/usermods/mqtt_switch_v2/library.json @@ -1,3 +1,4 @@ { - "name:": "mqtt_switch_v2" + "name:": "mqtt_switch_v2", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/multi_relay/library.json b/usermods/multi_relay/library.json index 7aa764399..cb9437e68 100644 --- a/usermods/multi_relay/library.json +++ b/usermods/multi_relay/library.json @@ -1,3 +1,4 @@ { - "name:": "multi_relay" + "name:": "multi_relay", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/pixels_dice_tray/library.json b/usermods/pixels_dice_tray/library.json index fd6a53a57..ce08b801f 100644 --- a/usermods/pixels_dice_tray/library.json +++ b/usermods/pixels_dice_tray/library.json @@ -1,5 +1,6 @@ { "name:": "pixels_dice_tray", + "build": { "libArchive": false}, "dependencies": { "arduino-pixels-dice":"https://github.com/axlan/arduino-pixels-dice.git" } diff --git a/usermods/pov_display/library.json b/usermods/pov_display/library.json index 298739b5d..2dd944a8a 100644 --- a/usermods/pov_display/library.json +++ b/usermods/pov_display/library.json @@ -1,5 +1,6 @@ { "name:": "pov_display", + "build": { "libArchive": false}, "dependencies": { "bitbank2/PNGdec":"^1.0.3" } diff --git a/usermods/pwm_outputs/library.json b/usermods/pwm_outputs/library.json index 4bf07777a..bdb9937e7 100644 --- a/usermods/pwm_outputs/library.json +++ b/usermods/pwm_outputs/library.json @@ -1,3 +1,4 @@ { - "name:": "pwm_outputs" + "name:": "pwm_outputs", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/quinled-an-penta/library.json b/usermods/quinled-an-penta/library.json index e89dc0020..9a1f4e0e5 100644 --- a/usermods/quinled-an-penta/library.json +++ b/usermods/quinled-an-penta/library.json @@ -1,5 +1,6 @@ { "name:": "quinled-an-penta", + "build": { "libArchive": false}, "dependencies": { "olikraus/U8g2":"~2.28.8", "robtillaart/SHT85":"~0.3.3" diff --git a/usermods/rgb-rotary-encoder/library.json b/usermods/rgb-rotary-encoder/library.json index 25572e116..b1394ba25 100644 --- a/usermods/rgb-rotary-encoder/library.json +++ b/usermods/rgb-rotary-encoder/library.json @@ -1,5 +1,6 @@ { "name:": "rgb-rotary-encoder", + "build": { "libArchive": false}, "dependencies": { "lennarthennigs/ESP Rotary":"^2.1.1" } diff --git a/usermods/sd_card/library.json b/usermods/sd_card/library.json index 1f123ead6..5b8faf162 100644 --- a/usermods/sd_card/library.json +++ b/usermods/sd_card/library.json @@ -1,3 +1,4 @@ { - "name:": "sd_card" + "name:": "sd_card", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json index 6594152c8..29addddc3 100644 --- a/usermods/sensors_to_mqtt/library.json +++ b/usermods/sensors_to_mqtt/library.json @@ -1,5 +1,6 @@ { "name:": "sensors_to_mqtt", + "build": { "libArchive": false}, "dependencies": { "adafruit/Adafruit BMP280 Library":"2.1.0", "adafruit/Adafruit CCS811 Library":"1.0.4", diff --git a/usermods/seven_segment_display/library.json b/usermods/seven_segment_display/library.json index 8764e92b3..6a3061194 100644 --- a/usermods/seven_segment_display/library.json +++ b/usermods/seven_segment_display/library.json @@ -1,3 +1,4 @@ { - "name:": "seven_segment_display" + "name:": "seven_segment_display", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/seven_segment_display_reloaded/library.json b/usermods/seven_segment_display_reloaded/library.json index fdce8b536..5fa5037f8 100644 --- a/usermods/seven_segment_display_reloaded/library.json +++ b/usermods/seven_segment_display_reloaded/library.json @@ -1,3 +1,4 @@ { - "name:": "seven_segment_display_reloaded" + "name:": "seven_segment_display_reloaded", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/sht/library.json b/usermods/sht/library.json index 330093bda..2788c34ac 100644 --- a/usermods/sht/library.json +++ b/usermods/sht/library.json @@ -1,3 +1,4 @@ { - "name:": "sht" + "name:": "sht", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/smartnest/library.json b/usermods/smartnest/library.json index e2c6ab351..7a9d95dd4 100644 --- a/usermods/smartnest/library.json +++ b/usermods/smartnest/library.json @@ -1,3 +1,4 @@ { - "name:": "smartnest" + "name:": "smartnest", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/stairway_wipe_basic/library.json b/usermods/stairway_wipe_basic/library.json index 59cb5da93..801846ead 100644 --- a/usermods/stairway_wipe_basic/library.json +++ b/usermods/stairway_wipe_basic/library.json @@ -1,3 +1,4 @@ { - "name:": "stairway_wipe_basic" + "name:": "stairway_wipe_basic", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_rotary_brightness_color/library.json b/usermods/usermod_rotary_brightness_color/library.json index 777ec19c0..5e6691697 100644 --- a/usermods/usermod_rotary_brightness_color/library.json +++ b/usermods/usermod_rotary_brightness_color/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_rotary_brightness_color" + "name:": "usermod_rotary_brightness_color", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_v2_HttpPullLightControl/library.json b/usermods/usermod_v2_HttpPullLightControl/library.json index 0f66710b3..91735b8cd 100644 --- a/usermods/usermod_v2_HttpPullLightControl/library.json +++ b/usermods/usermod_v2_HttpPullLightControl/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_v2_HttpPullLightControl" + "name:": "usermod_v2_HttpPullLightControl", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_v2_animartrix/library.json b/usermods/usermod_v2_animartrix/library.json index 4552be330..c9c98c398 100644 --- a/usermods/usermod_v2_animartrix/library.json +++ b/usermods/usermod_v2_animartrix/library.json @@ -1,5 +1,6 @@ { "name": "animartrix", + "build": { "libArchive": false}, "dependencies": { "Animartrix": "https://github.com/netmindz/animartrix.git#b172586" } diff --git a/usermods/usermod_v2_auto_save/library.json b/usermods/usermod_v2_auto_save/library.json index 67b29ca69..b9c39d711 100644 --- a/usermods/usermod_v2_auto_save/library.json +++ b/usermods/usermod_v2_auto_save/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_v2_auto_save" + "name:": "usermod_v2_auto_save", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_v2_four_line_display_ALT/library.json b/usermods/usermod_v2_four_line_display_ALT/library.json index 56612c96e..33c277bdc 100644 --- a/usermods/usermod_v2_four_line_display_ALT/library.json +++ b/usermods/usermod_v2_four_line_display_ALT/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_v2_four_line_display_ALT" + "name:": "usermod_v2_four_line_display_ALT", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_v2_klipper_percentage/library.json b/usermods/usermod_v2_klipper_percentage/library.json index b31fb1ad1..99e0546c5 100644 --- a/usermods/usermod_v2_klipper_percentage/library.json +++ b/usermods/usermod_v2_klipper_percentage/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_v2_klipper_percentage" + "name:": "usermod_v2_klipper_percentage", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_v2_ping_pong_clock/library.json b/usermods/usermod_v2_ping_pong_clock/library.json index fe23cd910..b3417b987 100644 --- a/usermods/usermod_v2_ping_pong_clock/library.json +++ b/usermods/usermod_v2_ping_pong_clock/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_v2_ping_pong_clock" + "name:": "usermod_v2_ping_pong_clock", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json index 5f857218b..065c67d9a 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_v2_rotary_encoder_ui_ALT" + "name:": "usermod_v2_rotary_encoder_ui_ALT", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/usermod_v2_word_clock/library.json b/usermods/usermod_v2_word_clock/library.json index 83c14dc7e..9e6a339d1 100644 --- a/usermods/usermod_v2_word_clock/library.json +++ b/usermods/usermod_v2_word_clock/library.json @@ -1,3 +1,4 @@ { - "name:": "usermod_v2_word_clock" + "name:": "usermod_v2_word_clock", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/wireguard/library.json b/usermods/wireguard/library.json index 0ebace8b5..7c7b17ef8 100644 --- a/usermods/wireguard/library.json +++ b/usermods/wireguard/library.json @@ -1,5 +1,6 @@ { "name:": "wireguard", + "build": { "libArchive": false}, "dependencies": { "WireGuard-ESP32-Arduino":"https://github.com/kienvu58/WireGuard-ESP32-Arduino.git" } diff --git a/usermods/wizlights/library.json b/usermods/wizlights/library.json index 687fba0f7..38ea759f8 100644 --- a/usermods/wizlights/library.json +++ b/usermods/wizlights/library.json @@ -1,3 +1,4 @@ { - "name:": "wizlights" + "name:": "wizlights", + "build": { "libArchive": false } } \ No newline at end of file diff --git a/usermods/word-clock-matrix/library.json b/usermods/word-clock-matrix/library.json index d971dfff4..12a8bd7f0 100644 --- a/usermods/word-clock-matrix/library.json +++ b/usermods/word-clock-matrix/library.json @@ -1,3 +1,4 @@ { - "name:": "word-clock-matrix" + "name:": "word-clock-matrix", + "build": { "libArchive": false } } \ No newline at end of file From 1dbd7066decf914398d30a092e34625c4cc8b178 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Tue, 14 Jan 2025 00:27:54 +0000 Subject: [PATCH 028/109] Revert LOROL_LITTLEFS hack --- wled00/wled.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/wled00/wled.h b/wled00/wled.h index 5a1a9ff89..ae93d9548 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -1,6 +1,3 @@ -// TODO: HACK!! - do not merge -#define LOROL_LITTLEFS 1 - #ifndef WLED_H #define WLED_H /* From e4714870a406674fbe18280a2306a27fc793d00b Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Tue, 14 Jan 2025 00:39:04 +0000 Subject: [PATCH 029/109] typo in usermods/sensors_to_mqtt/library.json --- usermods/sensors_to_mqtt/library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json index 29addddc3..91118c230 100644 --- a/usermods/sensors_to_mqtt/library.json +++ b/usermods/sensors_to_mqtt/library.json @@ -4,5 +4,5 @@ "dependencies": { "adafruit/Adafruit BMP280 Library":"2.1.0", "adafruit/Adafruit CCS811 Library":"1.0.4", - "adafruit/Adafruit Si7021 Library":"1.4.0 + "adafruit/Adafruit Si7021 Library":"1.4.0" } From 869e275e48e3bb1bd0fce020c9cfcdbd8d5535b3 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Tue, 14 Jan 2025 00:43:59 +0000 Subject: [PATCH 030/109] typo in usermods/sensors_to_mqtt/library.json --- usermods/sensors_to_mqtt/library.json | 1 + 1 file changed, 1 insertion(+) diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json index 91118c230..9ce4424e1 100644 --- a/usermods/sensors_to_mqtt/library.json +++ b/usermods/sensors_to_mqtt/library.json @@ -5,4 +5,5 @@ "adafruit/Adafruit BMP280 Library":"2.1.0", "adafruit/Adafruit CCS811 Library":"1.0.4", "adafruit/Adafruit Si7021 Library":"1.4.0" + } } From 0b8721c25e635e2b6149455ef63d3d54c20be0d3 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Mon, 13 Jan 2025 21:26:15 -0500 Subject: [PATCH 031/109] Fix usermod libArchive setting Monkey-patch PlatformIO to intercept the build process after library dependencies are loaded, but before the build is fully analyzed. This lets us enforce libArchive=False for usermods without making that setting global across all libraries. The rest of the fixup code is integrated at the same call site for simplicity. --- pio-scripts/fixup_usermods.py | 17 -------------- pio-scripts/load_usermods.py | 44 +++++++++++++++++++++++++++++------ platformio.ini | 1 - 3 files changed, 37 insertions(+), 25 deletions(-) delete mode 100644 pio-scripts/fixup_usermods.py diff --git a/pio-scripts/fixup_usermods.py b/pio-scripts/fixup_usermods.py deleted file mode 100644 index 5b8cddf32..000000000 --- a/pio-scripts/fixup_usermods.py +++ /dev/null @@ -1,17 +0,0 @@ -Import('env') - -# Patch up each usermod's include folders to include anything referenced by wled -# This is because usermods need to include wled.h -lib_builders = env.GetLibBuilders() -um_deps = [dep for dep in lib_builders if "/usermods" in dep.src_dir] -other_deps = [dep for dep in lib_builders if "/usermods" not in dep.src_dir] - -for um in um_deps: - # Add include paths for all non-usermod dependencies - for dep in other_deps: - for dir in dep.get_include_dirs(): - um.env.PrependUnique(CPPPATH=dir) - # Add the wled folder to the include path - um.env.PrependUnique(CPPPATH=env["PROJECT_SRC_DIR"]) - -#raise RuntimeError("debug") diff --git a/pio-scripts/load_usermods.py b/pio-scripts/load_usermods.py index 55b9c4b1b..f53078200 100644 --- a/pio-scripts/load_usermods.py +++ b/pio-scripts/load_usermods.py @@ -1,17 +1,19 @@ Import('env') -import os +from pathlib import Path # For OS-agnostic path manipulation -def find_usermod(mod_dir: str, mod: str): +usermod_dir = Path(env["PROJECT_DIR"]) / "usermods" + +def find_usermod(mod: str): """Locate this library in the usermods folder. We do this to avoid needing to rename a bunch of folders; this could be removed later """ # Check name match - mp = f"{mod_dir}/{mod}" - if os.path.exists(mp): + mp = usermod_dir / mod + if mp.exists(): return mp - mp = f"{mod_dir}/usermod_v2_{mod}" - if os.path.exists(mp): + mp = usermod_dir / f"usermod_v2_{mod}" + if mp.exists(): return mp raise RuntimeError(f"Couldn't locate module {mod} in usermods directory!") @@ -21,6 +23,34 @@ if usermods: deps = env.GetProjectOption('lib_deps') src_dir = proj.get("platformio", "src_dir") src_dir = src_dir.replace('\\','/') - mod_paths = {mod: find_usermod(f"{src_dir}/../usermods", mod) for mod in usermods.split(" ")} + mod_paths = {mod: find_usermod(mod) for mod in usermods.split(" ")} usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()] proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) + + +# Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies +# Save the old value +cpl = env.ConfigureProjectLibBuilder +# Our new wrapper +def cpl_wrapper(env): + result = cpl.clone(env)() + # Update usermod properties + lib_builders = env.GetLibBuilders() + um_deps = [dep for dep in lib_builders if usermod_dir in Path(dep.src_dir).parents] + other_deps = [dep for dep in lib_builders if usermod_dir not in Path(dep.src_dir).parents] + for um in um_deps: + # Add include paths for all non-usermod dependencies + for dep in other_deps: + for dir in dep.get_include_dirs(): + um.env.PrependUnique(CPPPATH=dir) + # Add the wled folder to the include path + um.env.PrependUnique(CPPPATH=env["PROJECT_SRC_DIR"]) + # Make sure we link directly, not through an archive + # Archives drop the .dtor table section we need + build = um._manifest.get("build", {}) + build["libArchive"] = False + um._manifest["build"] = build + return result + +# Replace the old one with ours +env.AddMethod(cpl_wrapper, "ConfigureProjectLibBuilder") diff --git a/platformio.ini b/platformio.ini index a64295e51..93219d2f7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -115,7 +115,6 @@ extra_scripts = post:pio-scripts/strip-floats.py pre:pio-scripts/user_config_copy.py pre:pio-scripts/load_usermods.py - post:pio-scripts/fixup_usermods.py pre:pio-scripts/build_ui.py ; post:pio-scripts/obj-dump.py ;; convenience script to create a disassembly dump of the firmware (hardcore debugging) From 270d75afe2b7ee624f10546f32877fbe0a062a18 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Tue, 14 Jan 2025 22:16:55 +0000 Subject: [PATCH 032/109] Update usermod deps earlier When processing usermods, update their include path properties before the LDF runs, so it can see through wled.h. --- pio-scripts/load_usermods.py | 112 +++++++++++++++++------------------ 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/pio-scripts/load_usermods.py b/pio-scripts/load_usermods.py index f53078200..81cbc7bff 100644 --- a/pio-scripts/load_usermods.py +++ b/pio-scripts/load_usermods.py @@ -1,56 +1,56 @@ -Import('env') -from pathlib import Path # For OS-agnostic path manipulation - -usermod_dir = Path(env["PROJECT_DIR"]) / "usermods" - -def find_usermod(mod: str): - """Locate this library in the usermods folder. - We do this to avoid needing to rename a bunch of folders; - this could be removed later - """ - # Check name match - mp = usermod_dir / mod - if mp.exists(): - return mp - mp = usermod_dir / f"usermod_v2_{mod}" - if mp.exists(): - return mp - raise RuntimeError(f"Couldn't locate module {mod} in usermods directory!") - -usermods = env.GetProjectOption("custom_usermods","") -if usermods: - proj = env.GetProjectConfig() - deps = env.GetProjectOption('lib_deps') - src_dir = proj.get("platformio", "src_dir") - src_dir = src_dir.replace('\\','/') - mod_paths = {mod: find_usermod(mod) for mod in usermods.split(" ")} - usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()] - proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) - - -# Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies -# Save the old value -cpl = env.ConfigureProjectLibBuilder -# Our new wrapper -def cpl_wrapper(env): - result = cpl.clone(env)() - # Update usermod properties - lib_builders = env.GetLibBuilders() - um_deps = [dep for dep in lib_builders if usermod_dir in Path(dep.src_dir).parents] - other_deps = [dep for dep in lib_builders if usermod_dir not in Path(dep.src_dir).parents] - for um in um_deps: - # Add include paths for all non-usermod dependencies - for dep in other_deps: - for dir in dep.get_include_dirs(): - um.env.PrependUnique(CPPPATH=dir) - # Add the wled folder to the include path - um.env.PrependUnique(CPPPATH=env["PROJECT_SRC_DIR"]) - # Make sure we link directly, not through an archive - # Archives drop the .dtor table section we need - build = um._manifest.get("build", {}) - build["libArchive"] = False - um._manifest["build"] = build - return result - -# Replace the old one with ours -env.AddMethod(cpl_wrapper, "ConfigureProjectLibBuilder") +Import('env') +from pathlib import Path # For OS-agnostic path manipulation + +usermod_dir = Path(env["PROJECT_DIR"]) / "usermods" + +def find_usermod(mod: str): + """Locate this library in the usermods folder. + We do this to avoid needing to rename a bunch of folders; + this could be removed later + """ + # Check name match + mp = usermod_dir / mod + if mp.exists(): + return mp + mp = usermod_dir / f"usermod_v2_{mod}" + if mp.exists(): + return mp + raise RuntimeError(f"Couldn't locate module {mod} in usermods directory!") + +usermods = env.GetProjectOption("custom_usermods","") +if usermods: + proj = env.GetProjectConfig() + deps = env.GetProjectOption('lib_deps') + src_dir = proj.get("platformio", "src_dir") + src_dir = src_dir.replace('\\','/') + mod_paths = {mod: find_usermod(mod) for mod in usermods.split(" ")} + usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()] + proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) + + +# Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies +# Save the old value +cpl = env.ConfigureProjectLibBuilder +# Our new wrapper +def cpl_wrapper(env): + # Update usermod properties + lib_builders = env.GetLibBuilders() + um_deps = [dep for dep in lib_builders if usermod_dir in Path(dep.src_dir).parents] + other_deps = [dep for dep in lib_builders if usermod_dir not in Path(dep.src_dir).parents] + for um in um_deps: + # Add include paths for all non-usermod dependencies + for dep in other_deps: + for dir in dep.get_include_dirs(): + um.env.PrependUnique(CPPPATH=dir) + # Add the wled folder to the include path + um.env.PrependUnique(CPPPATH=env["PROJECT_SRC_DIR"]) + # Make sure we link directly, not through an archive + # Archives drop the .dtor table section we need + build = um._manifest.get("build", {}) + build["libArchive"] = False + um._manifest["build"] = build + return cpl.clone(env)() + + +# Replace the old one with ours +env.AddMethod(cpl_wrapper, "ConfigureProjectLibBuilder") From 8fd905215f4734616d31c8ba0755ada097b91d99 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Tue, 14 Jan 2025 22:21:26 +0000 Subject: [PATCH 033/109] Integrate usermods environment Move the "all usermods" logic in to the platformio script, so the 'usermods' environment can be built in any checkout without extra setup commands. --- .github/workflows/build.yml | 5 ----- pio-scripts/load_usermods.py | 5 +++++ platformio.ini | 1 + usermods/platformio_override.usermods.ini | 9 --------- 4 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 usermods/platformio_override.usermods.ini diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efdb3f7af..3de08ff7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,11 +57,6 @@ jobs: cache: 'pip' - name: Install PlatformIO run: pip install -r requirements.txt - - name: Add usermods environment - run: | - cp -v usermods/platformio_override.usermods.ini platformio_override.ini - echo -n "custom_usermods = " >> platformio_override.ini - find usermods/ -name library.json | xargs dirname | xargs -n 1 basename | xargs echo >> platformio_override.ini - name: Build firmware run: pio run -e ${{ matrix.environment }} diff --git a/pio-scripts/load_usermods.py b/pio-scripts/load_usermods.py index 81cbc7bff..76359a7a6 100644 --- a/pio-scripts/load_usermods.py +++ b/pio-scripts/load_usermods.py @@ -2,6 +2,11 @@ Import('env') from pathlib import Path # For OS-agnostic path manipulation usermod_dir = Path(env["PROJECT_DIR"]) / "usermods" +all_usermods = [f for f in usermod_dir.iterdir() if f.is_dir() and f.joinpath('library.json').exists()] + +if env['PIOENV'] == "usermods": + # Add all usermods + env.GetProjectConfig().set(f"env:usermods", 'custom_usermods', " ".join([f.name for f in all_usermods])) def find_usermod(mod: str): """Locate this library in the usermods folder. diff --git a/platformio.ini b/platformio.ini index 93219d2f7..57919e2d2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -632,3 +632,4 @@ build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" ${esp32.AR_build_flags} lib_deps = ${esp32.lib_deps} +board_build.partitions = ${esp32.big_partitions} diff --git a/usermods/platformio_override.usermods.ini b/usermods/platformio_override.usermods.ini deleted file mode 100644 index 3b3e6696e..000000000 --- a/usermods/platformio_override.usermods.ini +++ /dev/null @@ -1,9 +0,0 @@ -[env:usermods] -board = esp32dev -platform = ${esp32.platform} -platform_packages = ${esp32.platform_packages} -build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" - ${esp32.AR_build_flags} -lib_deps = ${esp32.lib_deps} -board_build.partitions = ${esp32.big_partitions} From 30559cd2d3a1478708f998de257ccb29d5eeb3d1 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Tue, 14 Jan 2025 22:21:41 +0000 Subject: [PATCH 034/109] Fix dependency for EleksTube_IPS usermod --- usermods/EleksTube_IPS/library.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usermods/EleksTube_IPS/library.json b/usermods/EleksTube_IPS/library.json index e5ed62198..0fc259afa 100644 --- a/usermods/EleksTube_IPS/library.json +++ b/usermods/EleksTube_IPS/library.json @@ -1,4 +1,7 @@ { "name:": "EleksTube_IPS", - "build": { "libArchive": false } -} \ No newline at end of file + "build": { "libArchive": false }, + "dependencies": { + "TFT_eSPI" : "2.5.33" + } +} From 32607ee74c280d741f2d0a56b96c3f31df7c7c0e Mon Sep 17 00:00:00 2001 From: Will Miles Date: Wed, 15 Jan 2025 02:26:26 +0000 Subject: [PATCH 035/109] Revert incorrect testing platformio.ini --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 57919e2d2..8d8e7647e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -417,7 +417,7 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME= board = esp32dev platform = ${esp32.platform} platform_packages = ${esp32.platform_packages} -custom_usermods = audioreactive auto_save animartrix +custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32\" #-D WLED_DISABLE_BROWNOUT_DET lib_deps = ${esp32.lib_deps} From 2adf745d06e031b763fcf9505ed42ef540d0db24 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Wed, 15 Jan 2025 11:22:33 +0000 Subject: [PATCH 036/109] Update env:usermods to use V4 --- platformio.ini | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/platformio.ini b/platformio.ini index dad7007f8..5cddbbf90 100644 --- a/platformio.ini +++ b/platformio.ini @@ -427,7 +427,6 @@ board = esp32dev platform = ${esp32_idf_V4.platform} build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_V4\" #-D WLED_DISABLE_BROWNOUT_DET - ${esp32.AR_build_flags} lib_deps = ${esp32_idf_V4.lib_deps} ${esp32.AR_lib_deps} monitor_filters = esp32_exception_decoder @@ -628,10 +627,10 @@ lib_deps = ${esp32s2.lib_deps} [env:usermods] board = esp32dev -platform = ${esp32.platform} -platform_packages = ${esp32.platform_packages} +platform = ${esp32_idf_V4.platform} build_unflags = ${common.build_unflags} -build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"USERMODS\" - ${esp32.AR_build_flags} -lib_deps = ${esp32.lib_deps} +build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_USERMODS\" +lib_deps = ${esp32_idf_V4.lib_deps} +monitor_filters = esp32_exception_decoder +board_build.flash_mode = dio board_build.partitions = ${esp32.big_partitions} From 5da380e1b0cda1d44e2d246e097eff4838ed67d5 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Wed, 15 Jan 2025 11:28:38 +0000 Subject: [PATCH 037/109] Update dependencies for sensors_to_mqtt --- usermods/sensors_to_mqtt/library.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json index 9ce4424e1..731f57b2b 100644 --- a/usermods/sensors_to_mqtt/library.json +++ b/usermods/sensors_to_mqtt/library.json @@ -2,8 +2,8 @@ "name:": "sensors_to_mqtt", "build": { "libArchive": false}, "dependencies": { - "adafruit/Adafruit BMP280 Library":"2.1.0", - "adafruit/Adafruit CCS811 Library":"1.0.4", - "adafruit/Adafruit Si7021 Library":"1.4.0" + "adafruit/Adafruit BMP280 Library":"2.6.8", + "adafruit/Adafruit CCS811 Library":"1.1.3", + "adafruit/Adafruit Si7021 Library":"1.5.3" } } From 59a79a30da2dd32b261242046db85debd5fac4b6 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Wed, 15 Jan 2025 11:34:51 +0000 Subject: [PATCH 038/109] Add deps for usermods/BME280_v2 --- usermods/BME280_v2/library.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usermods/BME280_v2/library.json b/usermods/BME280_v2/library.json index faae0f34a..1cb805d34 100644 --- a/usermods/BME280_v2/library.json +++ b/usermods/BME280_v2/library.json @@ -1,4 +1,7 @@ { "name:": "BME280_v2", - "build": { "libArchive": false } + "build": { "libArchive": false }, + "dependencies": { + "finitespace/BME280":"~3.0.0" + } } \ No newline at end of file From 0afd2fe720c5981cd38b9d90d4bb7187ab8fcdb0 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Wed, 15 Jan 2025 12:46:06 +0000 Subject: [PATCH 039/109] Destructor must be public --- usermods/AHT10_v2/AHT10_v2.cpp | 12 ++++++------ usermods/INA226_v2/INA226_v2.cpp | 13 +++++++------ usermods/mqtt_switch_v2/mqtt_switch_v2.cpp | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/usermods/AHT10_v2/AHT10_v2.cpp b/usermods/AHT10_v2/AHT10_v2.cpp index 171e15754..a5d30c0ed 100644 --- a/usermods/AHT10_v2/AHT10_v2.cpp +++ b/usermods/AHT10_v2/AHT10_v2.cpp @@ -54,12 +54,6 @@ private: _lastTemperature = 0; } - ~UsermodAHT10() - { - delete _aht; - _aht = nullptr; - } - #ifndef WLED_DISABLE_MQTT void mqttInitialize() { @@ -322,6 +316,12 @@ public: _initDone = true; return configComplete; } + + ~UsermodAHT10() + { + delete _aht; + _aht = nullptr; + } }; const char UsermodAHT10::_name[] PROGMEM = "AHTxx"; diff --git a/usermods/INA226_v2/INA226_v2.cpp b/usermods/INA226_v2/INA226_v2.cpp index 3c79f05bb..0284a6fa6 100644 --- a/usermods/INA226_v2/INA226_v2.cpp +++ b/usermods/INA226_v2/INA226_v2.cpp @@ -210,12 +210,6 @@ private: } } - ~UsermodINA226() - { - delete _ina226; - _ina226 = nullptr; - } - #ifndef WLED_DISABLE_MQTT void mqttInitialize() { @@ -551,6 +545,13 @@ public: _initDone = true; return configComplete; } + + ~UsermodINA226() + { + delete _ina226; + _ina226 = nullptr; + } + }; const char UsermodINA226::_name[] PROGMEM = "INA226"; diff --git a/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp index d4d823f32..9c8dd5f0c 100644 --- a/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp +++ b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp @@ -159,5 +159,5 @@ inline void UsermodMqttSwitch::updateState(uint8_t pinNr) } -static UsermodMqttSwitc mqtt_switch_v2; +static UsermodMqttSwitch mqtt_switch_v2; REGISTER_USERMOD(mqtt_switch_v2); \ No newline at end of file From 5d05d7936c238a446ff2b9c76e3f0aa1cf089936 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Wed, 15 Jan 2025 12:46:48 +0000 Subject: [PATCH 040/109] Add usermod dependencies --- usermods/LD2410_v2/library.json | 5 ++++- usermods/Si7021_MQTT_HA/library.json | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/usermods/LD2410_v2/library.json b/usermods/LD2410_v2/library.json index faef37d4d..60d493ad9 100644 --- a/usermods/LD2410_v2/library.json +++ b/usermods/LD2410_v2/library.json @@ -1,4 +1,7 @@ { "name:": "LD2410_v2", - "build": { "libArchive": false } + "build": { "libArchive": false }, + "dependencies": { + "ncmreynolds/ld2410":"^0.1.3" + } } \ No newline at end of file diff --git a/usermods/Si7021_MQTT_HA/library.json b/usermods/Si7021_MQTT_HA/library.json index 60991a3e9..8294c1264 100644 --- a/usermods/Si7021_MQTT_HA/library.json +++ b/usermods/Si7021_MQTT_HA/library.json @@ -1,4 +1,7 @@ { "name:": "Si7021_MQTT_HA", - "build": { "libArchive": false } + "build": { "libArchive": false }, + "dependencies": { + "finitespace/BME280":"3.0.0" + } } \ No newline at end of file From 8487dd7cfd48eda4450ac3bfa54405e0a964bd17 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Wed, 15 Jan 2025 12:49:40 +0000 Subject: [PATCH 041/109] Disable build of usermods that are broken at the moment --- usermods/BME280_v2/{library.json => library.json.disabled} | 0 usermods/BME68X_v2/{library.json => library.json.disabled} | 0 usermods/MAX17048_v2/{library.json => library.json.disabled} | 0 usermods/MY9291/{library.json => library.json.disabled} | 0 usermods/RTC/{library.json => library.json.disabled} | 0 usermods/ST7789_display/{library.json => library.json.disabled} | 0 usermods/pov_display/{library.json => library.json.disabled} | 0 .../rgb-rotary-encoder/{library.json => library.json.disabled} | 0 usermods/sht/{library.json => library.json.disabled} | 0 .../{library.json => library.json.disabled} | 0 .../{library.json => library.json.disabled} | 0 .../word-clock-matrix/{library.json => library.json.disabled} | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename usermods/BME280_v2/{library.json => library.json.disabled} (100%) rename usermods/BME68X_v2/{library.json => library.json.disabled} (100%) rename usermods/MAX17048_v2/{library.json => library.json.disabled} (100%) rename usermods/MY9291/{library.json => library.json.disabled} (100%) rename usermods/RTC/{library.json => library.json.disabled} (100%) rename usermods/ST7789_display/{library.json => library.json.disabled} (100%) rename usermods/pov_display/{library.json => library.json.disabled} (100%) rename usermods/rgb-rotary-encoder/{library.json => library.json.disabled} (100%) rename usermods/sht/{library.json => library.json.disabled} (100%) rename usermods/usermod_v2_HttpPullLightControl/{library.json => library.json.disabled} (100%) rename usermods/usermod_v2_four_line_display_ALT/{library.json => library.json.disabled} (100%) rename usermods/word-clock-matrix/{library.json => library.json.disabled} (100%) diff --git a/usermods/BME280_v2/library.json b/usermods/BME280_v2/library.json.disabled similarity index 100% rename from usermods/BME280_v2/library.json rename to usermods/BME280_v2/library.json.disabled diff --git a/usermods/BME68X_v2/library.json b/usermods/BME68X_v2/library.json.disabled similarity index 100% rename from usermods/BME68X_v2/library.json rename to usermods/BME68X_v2/library.json.disabled diff --git a/usermods/MAX17048_v2/library.json b/usermods/MAX17048_v2/library.json.disabled similarity index 100% rename from usermods/MAX17048_v2/library.json rename to usermods/MAX17048_v2/library.json.disabled diff --git a/usermods/MY9291/library.json b/usermods/MY9291/library.json.disabled similarity index 100% rename from usermods/MY9291/library.json rename to usermods/MY9291/library.json.disabled diff --git a/usermods/RTC/library.json b/usermods/RTC/library.json.disabled similarity index 100% rename from usermods/RTC/library.json rename to usermods/RTC/library.json.disabled diff --git a/usermods/ST7789_display/library.json b/usermods/ST7789_display/library.json.disabled similarity index 100% rename from usermods/ST7789_display/library.json rename to usermods/ST7789_display/library.json.disabled diff --git a/usermods/pov_display/library.json b/usermods/pov_display/library.json.disabled similarity index 100% rename from usermods/pov_display/library.json rename to usermods/pov_display/library.json.disabled diff --git a/usermods/rgb-rotary-encoder/library.json b/usermods/rgb-rotary-encoder/library.json.disabled similarity index 100% rename from usermods/rgb-rotary-encoder/library.json rename to usermods/rgb-rotary-encoder/library.json.disabled diff --git a/usermods/sht/library.json b/usermods/sht/library.json.disabled similarity index 100% rename from usermods/sht/library.json rename to usermods/sht/library.json.disabled diff --git a/usermods/usermod_v2_HttpPullLightControl/library.json b/usermods/usermod_v2_HttpPullLightControl/library.json.disabled similarity index 100% rename from usermods/usermod_v2_HttpPullLightControl/library.json rename to usermods/usermod_v2_HttpPullLightControl/library.json.disabled diff --git a/usermods/usermod_v2_four_line_display_ALT/library.json b/usermods/usermod_v2_four_line_display_ALT/library.json.disabled similarity index 100% rename from usermods/usermod_v2_four_line_display_ALT/library.json rename to usermods/usermod_v2_four_line_display_ALT/library.json.disabled diff --git a/usermods/word-clock-matrix/library.json b/usermods/word-clock-matrix/library.json.disabled similarity index 100% rename from usermods/word-clock-matrix/library.json rename to usermods/word-clock-matrix/library.json.disabled From 15edfcd0881de91db4e4c07bee4bdbf9bd37bc45 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Thu, 16 Jan 2025 01:05:12 +0000 Subject: [PATCH 042/109] Fix usermod platformio integration Should now work for new *and* old versions of PlatformIO! --- pio-scripts/load_usermods.py | 72 ++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/pio-scripts/load_usermods.py b/pio-scripts/load_usermods.py index 76359a7a6..7aa6c4d8d 100644 --- a/pio-scripts/load_usermods.py +++ b/pio-scripts/load_usermods.py @@ -1,5 +1,7 @@ Import('env') +import os.path from pathlib import Path # For OS-agnostic path manipulation +from platformio.package.manager.library import LibraryPackageManager usermod_dir = Path(env["PROJECT_DIR"]) / "usermods" all_usermods = [f for f in usermod_dir.iterdir() if f.is_dir() and f.joinpath('library.json').exists()] @@ -24,38 +26,70 @@ def find_usermod(mod: str): usermods = env.GetProjectOption("custom_usermods","") if usermods: + # Inject usermods in to project lib_deps proj = env.GetProjectConfig() - deps = env.GetProjectOption('lib_deps') + deps = env.GetProjectOption('lib_deps') src_dir = proj.get("platformio", "src_dir") src_dir = src_dir.replace('\\','/') mod_paths = {mod: find_usermod(mod) for mod in usermods.split(" ")} usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()] - proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) + proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) + # Force usermods to be installed in to the environment build state before the LDF runs + # Otherwise we won't be able to see them until it's too late to change their paths for LDF + # Logic is largely borrowed from PlaformIO internals + not_found_specs = [] + for spec in usermods: + found = False + for storage_dir in env.GetLibSourceDirs(): + #print(f"Checking {storage_dir} for {spec}") + lm = LibraryPackageManager(storage_dir) + if lm.get_package(spec): + #print("Found!") + found = True + break + if not found: + #print("Missing!") + not_found_specs.append(spec) + if not_found_specs: + lm = LibraryPackageManager( + env.subst(os.path.join("$PROJECT_LIBDEPS_DIR", "$PIOENV")) + ) + for spec in not_found_specs: + #print(f"LU: forcing install of {spec}") + lm.install(spec) # Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies # Save the old value -cpl = env.ConfigureProjectLibBuilder +old_ConfigureProjectLibBuilder = env.ConfigureProjectLibBuilder + # Our new wrapper -def cpl_wrapper(env): +def wrapped_ConfigureProjectLibBuilder(xenv): # Update usermod properties - lib_builders = env.GetLibBuilders() - um_deps = [dep for dep in lib_builders if usermod_dir in Path(dep.src_dir).parents] - other_deps = [dep for dep in lib_builders if usermod_dir not in Path(dep.src_dir).parents] - for um in um_deps: - # Add include paths for all non-usermod dependencies - for dep in other_deps: - for dir in dep.get_include_dirs(): - um.env.PrependUnique(CPPPATH=dir) - # Add the wled folder to the include path - um.env.PrependUnique(CPPPATH=env["PROJECT_SRC_DIR"]) - # Make sure we link directly, not through an archive - # Archives drop the .dtor table section we need + # Set libArchive before build actions are added + for um in (um for um in xenv.GetLibBuilders() if usermod_dir in Path(um.src_dir).parents): build = um._manifest.get("build", {}) build["libArchive"] = False um._manifest["build"] = build - return cpl.clone(env)() + # Call the wrapped function + result = old_ConfigureProjectLibBuilder.clone(xenv)() -# Replace the old one with ours -env.AddMethod(cpl_wrapper, "ConfigureProjectLibBuilder") + # Fix up include paths + # In PlatformIO >=6.1.17, this could be done prior to ConfigureProjectLibBuilder + wled_dir = xenv["PROJECT_SRC_DIR"] + lib_builders = xenv.GetLibBuilders() + um_deps = [dep for dep in lib_builders if usermod_dir in Path(dep.src_dir).parents] + other_deps = [dep for dep in lib_builders if usermod_dir not in Path(dep.src_dir).parents] + for um in um_deps: + # Add the wled folder to the include path + um.env.PrependUnique(CPPPATH=wled_dir) + # Add WLED's own dependencies + for dep in other_deps: + for dir in dep.get_include_dirs(): + um.env.PrependUnique(CPPPATH=dir) + + return result + +# Apply the wrapper +env.AddMethod(wrapped_ConfigureProjectLibBuilder, "ConfigureProjectLibBuilder") From 193926c795961bf30de3c5f44d19ffeb13c4c9d9 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Fri, 17 Jan 2025 00:50:02 +0000 Subject: [PATCH 043/109] usermods: Remove #pragma once from cpps --- usermods/ADS1115_v2/ADS1115_v2.cpp | 2 -- usermods/AHT10_v2/AHT10_v2.cpp | 2 -- usermods/Analog_Clock/Analog_Clock.cpp | 1 - usermods/Animated_Staircase/Animated_Staircase.cpp | 1 - usermods/BH1750_v2/BH1750_v2.cpp | 2 -- usermods/BME280_v2/BME280_v2.cpp | 2 -- usermods/BME68X_v2/BME68X_v2.cpp | 1 - usermods/Battery/Battery.cpp | 2 -- usermods/Cronixie/Cronixie.cpp | 2 -- usermods/DHT/DHT.cpp | 2 -- usermods/EleksTube_IPS/EleksTube_IPS.cpp | 1 - usermods/INA226_v2/INA226_v2.cpp | 2 -- .../Internal_Temperature_v2/Internal_Temperature_v2.cpp | 2 -- usermods/LD2410_v2/LD2410_v2.cpp | 2 -- usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp | 1 - usermods/MAX17048_v2/MAX17048_v2.cpp | 2 -- usermods/MY9291/MY9291.cpp | 2 -- usermods/PIR_sensor_switch/PIR_sensor_switch.cpp | 8 +++----- usermods/PWM_fan/PWM_fan.cpp | 2 -- usermods/RTC/RTC.cpp | 2 -- usermods/SN_Photoresistor/SN_Photoresistor.cpp | 2 -- usermods/ST7789_display/ST7789_display.cpp | 2 -- usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp | 2 -- usermods/Temperature/Temperature.cpp | 2 -- usermods/TetrisAI_v2/TetrisAI_v2.cpp | 2 -- usermods/VL53L0X_gestures/VL53L0X_gestures.cpp | 2 -- usermods/boblight/boblight.cpp | 2 -- usermods/buzzer/buzzer.cpp | 2 -- usermods/deep_sleep/deep_sleep.cpp | 2 -- usermods/mpu6050_imu/mpu6050_imu.cpp | 2 -- usermods/mqtt_switch_v2/mqtt_switch_v2.cpp | 2 -- usermods/multi_relay/multi_relay.cpp | 2 -- usermods/pixels_dice_tray/pixels_dice_tray.cpp | 2 -- usermods/pov_display/pov_display.cpp | 1 - usermods/pwm_outputs/pwm_outputs.cpp | 1 - usermods/quinled-an-penta/quinled-an-penta.cpp | 2 -- usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp | 2 -- usermods/sd_card/sd_card.cpp | 2 -- usermods/sensors_to_mqtt/sensors_to_mqtt.cpp | 2 -- usermods/seven_segment_display/seven_segment_display.cpp | 2 -- .../seven_segment_display_reloaded.cpp | 2 -- usermods/sht/sht.cpp | 2 -- usermods/smartnest/smartnest.cpp | 2 -- .../usermod_rotary_brightness_color.cpp | 2 -- usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp | 2 -- .../usermod_v2_four_line_display_ALT.cpp | 2 -- .../usermod_v2_klipper_percentage.cpp | 2 -- .../usermod_v2_ping_pong_clock.cpp | 2 -- .../usermod_v2_rotary_encoder_ui_ALT.cpp | 2 -- usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp | 2 -- usermods/wireguard/wireguard.cpp | 2 -- usermods/wizlights/wizlights.cpp | 2 -- usermods/word-clock-matrix/word-clock-matrix.cpp | 2 -- 53 files changed, 3 insertions(+), 102 deletions(-) diff --git a/usermods/ADS1115_v2/ADS1115_v2.cpp b/usermods/ADS1115_v2/ADS1115_v2.cpp index 48f917332..bbf457f48 100644 --- a/usermods/ADS1115_v2/ADS1115_v2.cpp +++ b/usermods/ADS1115_v2/ADS1115_v2.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include #include diff --git a/usermods/AHT10_v2/AHT10_v2.cpp b/usermods/AHT10_v2/AHT10_v2.cpp index a5d30c0ed..f88bee1da 100644 --- a/usermods/AHT10_v2/AHT10_v2.cpp +++ b/usermods/AHT10_v2/AHT10_v2.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include diff --git a/usermods/Analog_Clock/Analog_Clock.cpp b/usermods/Analog_Clock/Analog_Clock.cpp index 8a4c048a8..970ba7224 100644 --- a/usermods/Analog_Clock/Analog_Clock.cpp +++ b/usermods/Analog_Clock/Analog_Clock.cpp @@ -1,4 +1,3 @@ -#pragma once #include "wled.h" /* diff --git a/usermods/Animated_Staircase/Animated_Staircase.cpp b/usermods/Animated_Staircase/Animated_Staircase.cpp index 43d9db6b4..2d2d27cf4 100644 --- a/usermods/Animated_Staircase/Animated_Staircase.cpp +++ b/usermods/Animated_Staircase/Animated_Staircase.cpp @@ -7,7 +7,6 @@ * * See the accompanying README.md file for more info. */ -#pragma once #include "wled.h" class Animated_Staircase : public Usermod { diff --git a/usermods/BH1750_v2/BH1750_v2.cpp b/usermods/BH1750_v2/BH1750_v2.cpp index 5bd476245..ec29f5b90 100644 --- a/usermods/BH1750_v2/BH1750_v2.cpp +++ b/usermods/BH1750_v2/BH1750_v2.cpp @@ -5,8 +5,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "wled.h" #include diff --git a/usermods/BME280_v2/BME280_v2.cpp b/usermods/BME280_v2/BME280_v2.cpp index d29451eed..8cc986aa0 100644 --- a/usermods/BME280_v2/BME280_v2.cpp +++ b/usermods/BME280_v2/BME280_v2.cpp @@ -5,8 +5,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "wled.h" #include #include // BME280 sensor diff --git a/usermods/BME68X_v2/BME68X_v2.cpp b/usermods/BME68X_v2/BME68X_v2.cpp index 5814506b3..081d03ff9 100644 --- a/usermods/BME68X_v2/BME68X_v2.cpp +++ b/usermods/BME68X_v2/BME68X_v2.cpp @@ -6,7 +6,6 @@ * @date 19 Feb 2024 */ -#pragma once #warning ********************Included USERMOD_BME68X ******************** #define UMOD_DEVICE "ESP32" // NOTE - Set your hardware here diff --git a/usermods/Battery/Battery.cpp b/usermods/Battery/Battery.cpp index 4646a2384..5572f5502 100644 --- a/usermods/Battery/Battery.cpp +++ b/usermods/Battery/Battery.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include "battery_defaults.h" #include "UMBattery.h" diff --git a/usermods/Cronixie/Cronixie.cpp b/usermods/Cronixie/Cronixie.cpp index 09e7e25ac..05557de0f 100644 --- a/usermods/Cronixie/Cronixie.cpp +++ b/usermods/Cronixie/Cronixie.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" class UsermodCronixie : public Usermod { diff --git a/usermods/DHT/DHT.cpp b/usermods/DHT/DHT.cpp index fad6dad5c..0b4810649 100644 --- a/usermods/DHT/DHT.cpp +++ b/usermods/DHT/DHT.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #ifndef WLED_ENABLE_MQTT #error "This user mod requires MQTT to be enabled." diff --git a/usermods/EleksTube_IPS/EleksTube_IPS.cpp b/usermods/EleksTube_IPS/EleksTube_IPS.cpp index 48fbb2b40..e8637b0fe 100644 --- a/usermods/EleksTube_IPS/EleksTube_IPS.cpp +++ b/usermods/EleksTube_IPS/EleksTube_IPS.cpp @@ -1,4 +1,3 @@ -#pragma once #include "TFTs.h" #include "wled.h" diff --git a/usermods/INA226_v2/INA226_v2.cpp b/usermods/INA226_v2/INA226_v2.cpp index 0284a6fa6..26f92f494 100644 --- a/usermods/INA226_v2/INA226_v2.cpp +++ b/usermods/INA226_v2/INA226_v2.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include diff --git a/usermods/Internal_Temperature_v2/Internal_Temperature_v2.cpp b/usermods/Internal_Temperature_v2/Internal_Temperature_v2.cpp index ab7f907ec..7c30985ee 100644 --- a/usermods/Internal_Temperature_v2/Internal_Temperature_v2.cpp +++ b/usermods/Internal_Temperature_v2/Internal_Temperature_v2.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" class InternalTemperatureUsermod : public Usermod diff --git a/usermods/LD2410_v2/LD2410_v2.cpp b/usermods/LD2410_v2/LD2410_v2.cpp index 51c887fa4..7c1c36745 100644 --- a/usermods/LD2410_v2/LD2410_v2.cpp +++ b/usermods/LD2410_v2/LD2410_v2.cpp @@ -4,8 +4,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "wled.h" #include diff --git a/usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp b/usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp index 6104fcab5..9c5c835e9 100644 --- a/usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp +++ b/usermods/LDR_Dusk_Dawn_v2/LDR_Dusk_Dawn_v2.cpp @@ -1,4 +1,3 @@ -#pragma once #include "wled.h" #ifndef ARDUINO_ARCH_ESP32 diff --git a/usermods/MAX17048_v2/MAX17048_v2.cpp b/usermods/MAX17048_v2/MAX17048_v2.cpp index 1a1108cf6..c284bca7f 100644 --- a/usermods/MAX17048_v2/MAX17048_v2.cpp +++ b/usermods/MAX17048_v2/MAX17048_v2.cpp @@ -1,8 +1,6 @@ // force the compiler to show a warning to confirm that this file is included #warning **** Included USERMOD_MAX17048 V2.0 **** -#pragma once - #include "wled.h" #include "Adafruit_MAX1704X.h" diff --git a/usermods/MY9291/MY9291.cpp b/usermods/MY9291/MY9291.cpp index ce8d0f001..3881ffd07 100644 --- a/usermods/MY9291/MY9291.cpp +++ b/usermods/MY9291/MY9291.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include "MY92xx.h" diff --git a/usermods/PIR_sensor_switch/PIR_sensor_switch.cpp b/usermods/PIR_sensor_switch/PIR_sensor_switch.cpp index 1cc31a08d..20e4bc148 100644 --- a/usermods/PIR_sensor_switch/PIR_sensor_switch.cpp +++ b/usermods/PIR_sensor_switch/PIR_sensor_switch.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #ifndef PIR_SENSOR_PIN @@ -571,7 +569,7 @@ bool PIRsensorSwitch::readFromConfig(JsonObject &root) // use "return !top["newestParameter"].isNull();" when updating Usermod with new features return !(pins.isNull() || pins.size() != PIR_SENSOR_MAX_SENSORS); } - - -static PIRsensorSwitch pir_sensor_switch; + + +static PIRsensorSwitch pir_sensor_switch; REGISTER_USERMOD(pir_sensor_switch); \ No newline at end of file diff --git a/usermods/PWM_fan/PWM_fan.cpp b/usermods/PWM_fan/PWM_fan.cpp index 9df373045..a89a1f323 100644 --- a/usermods/PWM_fan/PWM_fan.cpp +++ b/usermods/PWM_fan/PWM_fan.cpp @@ -1,5 +1,3 @@ -#pragma once - #if !defined(USERMOD_DALLASTEMPERATURE) && !defined(USERMOD_SHT) #error The "PWM fan" usermod requires "Dallas Temeprature" or "SHT" usermod to function properly. #endif diff --git a/usermods/RTC/RTC.cpp b/usermods/RTC/RTC.cpp index f9dbe3cf2..2b9c3b4f7 100644 --- a/usermods/RTC/RTC.cpp +++ b/usermods/RTC/RTC.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "src/dependencies/time/DS1307RTC.h" #include "wled.h" diff --git a/usermods/SN_Photoresistor/SN_Photoresistor.cpp b/usermods/SN_Photoresistor/SN_Photoresistor.cpp index 5e50ab7a6..97f865a97 100644 --- a/usermods/SN_Photoresistor/SN_Photoresistor.cpp +++ b/usermods/SN_Photoresistor/SN_Photoresistor.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" //Pin defaults for QuinLed Dig-Uno (A0) diff --git a/usermods/ST7789_display/ST7789_display.cpp b/usermods/ST7789_display/ST7789_display.cpp index e81c53ba5..c596baecc 100644 --- a/usermods/ST7789_display/ST7789_display.cpp +++ b/usermods/ST7789_display/ST7789_display.cpp @@ -1,8 +1,6 @@ // Credits to @mrVanboy, @gwaland and my dearest friend @westward // Also for @spiff72 for usermod TTGO-T-Display // 210217 -#pragma once - #include "wled.h" #include #include diff --git a/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp index 04f6d750d..8640ceb8a 100644 --- a/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp +++ b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp @@ -2,8 +2,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - // this is remixed from usermod_v2_SensorsToMqtt.h (sensors_to_mqtt usermod) // and usermod_multi_relay.h (multi_relay usermod) diff --git a/usermods/Temperature/Temperature.cpp b/usermods/Temperature/Temperature.cpp index a17bd2d90..8c925eb15 100644 --- a/usermods/Temperature/Temperature.cpp +++ b/usermods/Temperature/Temperature.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include "OneWire.h" diff --git a/usermods/TetrisAI_v2/TetrisAI_v2.cpp b/usermods/TetrisAI_v2/TetrisAI_v2.cpp index 78cdfd227..b51250b26 100644 --- a/usermods/TetrisAI_v2/TetrisAI_v2.cpp +++ b/usermods/TetrisAI_v2/TetrisAI_v2.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include "FX.h" #include "fcn_declare.h" diff --git a/usermods/VL53L0X_gestures/VL53L0X_gestures.cpp b/usermods/VL53L0X_gestures/VL53L0X_gestures.cpp index 759c31c7c..af3220b3c 100644 --- a/usermods/VL53L0X_gestures/VL53L0X_gestures.cpp +++ b/usermods/VL53L0X_gestures/VL53L0X_gestures.cpp @@ -13,8 +13,6 @@ * lib_deps = ${env.lib_deps} * pololu/VL53L0X @ ^1.3.0 */ -#pragma once - #include "wled.h" #include diff --git a/usermods/boblight/boblight.cpp b/usermods/boblight/boblight.cpp index 2a52fc156..5980443d3 100644 --- a/usermods/boblight/boblight.cpp +++ b/usermods/boblight/boblight.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" /* diff --git a/usermods/buzzer/buzzer.cpp b/usermods/buzzer/buzzer.cpp index e421a2391..e5a071e62 100644 --- a/usermods/buzzer/buzzer.cpp +++ b/usermods/buzzer/buzzer.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include "Arduino.h" diff --git a/usermods/deep_sleep/deep_sleep.cpp b/usermods/deep_sleep/deep_sleep.cpp index 741b618fd..f6f3604fb 100644 --- a/usermods/deep_sleep/deep_sleep.cpp +++ b/usermods/deep_sleep/deep_sleep.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include "driver/rtc_io.h" diff --git a/usermods/mpu6050_imu/mpu6050_imu.cpp b/usermods/mpu6050_imu/mpu6050_imu.cpp index 2f8166cdd..529d5dde4 100644 --- a/usermods/mpu6050_imu/mpu6050_imu.cpp +++ b/usermods/mpu6050_imu/mpu6050_imu.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" /* This driver reads quaternion data from the MPU6060 and adds it to the JSON diff --git a/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp index 9c8dd5f0c..36e2adaab 100644 --- a/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp +++ b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp @@ -1,5 +1,3 @@ -#pragma once - #warning "This usermod is deprecated and no longer maintained. It will be removed in a future WLED release. Please use usermod multi_relay which has more features." #include "wled.h" diff --git a/usermods/multi_relay/multi_relay.cpp b/usermods/multi_relay/multi_relay.cpp index ea07e281e..f8b1f566a 100644 --- a/usermods/multi_relay/multi_relay.cpp +++ b/usermods/multi_relay/multi_relay.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) diff --git a/usermods/pixels_dice_tray/pixels_dice_tray.cpp b/usermods/pixels_dice_tray/pixels_dice_tray.cpp index 07fd3d596..73457c67f 100644 --- a/usermods/pixels_dice_tray/pixels_dice_tray.cpp +++ b/usermods/pixels_dice_tray/pixels_dice_tray.cpp @@ -1,5 +1,3 @@ -#pragma once - #include // https://github.com/axlan/arduino-pixels-dice #include "wled.h" diff --git a/usermods/pov_display/pov_display.cpp b/usermods/pov_display/pov_display.cpp index c1bd143a0..b2b91f7d5 100644 --- a/usermods/pov_display/pov_display.cpp +++ b/usermods/pov_display/pov_display.cpp @@ -1,4 +1,3 @@ -#pragma once #include "wled.h" #include diff --git a/usermods/pwm_outputs/pwm_outputs.cpp b/usermods/pwm_outputs/pwm_outputs.cpp index 72a78475c..d94f1d848 100644 --- a/usermods/pwm_outputs/pwm_outputs.cpp +++ b/usermods/pwm_outputs/pwm_outputs.cpp @@ -1,4 +1,3 @@ -#pragma once #include "wled.h" #ifndef ESP32 diff --git a/usermods/quinled-an-penta/quinled-an-penta.cpp b/usermods/quinled-an-penta/quinled-an-penta.cpp index 1fbfd807e..a3b452bf1 100644 --- a/usermods/quinled-an-penta/quinled-an-penta.cpp +++ b/usermods/quinled-an-penta/quinled-an-penta.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "U8g2lib.h" #include "SHT85.h" #include "Wire.h" diff --git a/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp b/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp index 5b4e73153..1514e2307 100644 --- a/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp +++ b/usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "ESPRotary.h" #include #include "wled.h" diff --git a/usermods/sd_card/sd_card.cpp b/usermods/sd_card/sd_card.cpp index e33a643fe..4e68b97a3 100644 --- a/usermods/sd_card/sd_card.cpp +++ b/usermods/sd_card/sd_card.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" // SD connected via MMC / SPI diff --git a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp index 02f8e8d27..c203d4ee4 100644 --- a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp +++ b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp @@ -2,8 +2,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "wled.h" #include #include diff --git a/usermods/seven_segment_display/seven_segment_display.cpp b/usermods/seven_segment_display/seven_segment_display.cpp index d3aa57378..de5719b22 100644 --- a/usermods/seven_segment_display/seven_segment_display.cpp +++ b/usermods/seven_segment_display/seven_segment_display.cpp @@ -2,8 +2,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "wled.h" class SevenSegmentDisplay : public Usermod diff --git a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp b/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp index 812065d86..418e53b21 100644 --- a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp +++ b/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp @@ -2,8 +2,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "wled.h" class UsermodSSDR : public Usermod { diff --git a/usermods/sht/sht.cpp b/usermods/sht/sht.cpp index 7641bbc2e..b269433ec 100644 --- a/usermods/sht/sht.cpp +++ b/usermods/sht/sht.cpp @@ -2,8 +2,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "SHT85.h" #define USERMOD_SHT_TYPE_SHT30 0 diff --git a/usermods/smartnest/smartnest.cpp b/usermods/smartnest/smartnest.cpp index be7710abc..2ff13b36e 100644 --- a/usermods/smartnest/smartnest.cpp +++ b/usermods/smartnest/smartnest.cpp @@ -2,8 +2,6 @@ #error "This user mod requires MQTT to be enabled." #endif -#pragma once - #include "wled.h" class Smartnest : public Usermod diff --git a/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.cpp b/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.cpp index 076e91f73..84c11afcd 100644 --- a/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.cpp +++ b/usermods/usermod_rotary_brightness_color/usermod_rotary_brightness_color.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" //v2 usermod that allows to change brightness and color using a rotary encoder, diff --git a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp index 2dae867da..1b97ea94d 100644 --- a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp +++ b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" // v2 Usermod to automatically save settings diff --git a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.cpp b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.cpp index 851e378e1..93c4110c3 100644 --- a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.cpp +++ b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #undef U8X8_NO_HW_I2C // borrowed from WLEDMM: we do want I2C hardware drivers - if possible #include // from https://github.com/olikraus/u8g2/ diff --git a/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.cpp b/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.cpp index 55132b84d..71c5c45f3 100644 --- a/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.cpp +++ b/usermods/usermod_v2_klipper_percentage/usermod_v2_klipper_percentage.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" class klipper_percentage : public Usermod diff --git a/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.cpp b/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.cpp index 8212947a6..c6632b53a 100644 --- a/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.cpp +++ b/usermods/usermod_v2_ping_pong_clock/usermod_v2_ping_pong_clock.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" class PingPongClockUsermod : public Usermod diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.cpp b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.cpp index ac2cc3c4e..9d1129841 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.cpp +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" // diff --git a/usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp b/usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp index 781dd7d81..789292387 100644 --- a/usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp +++ b/usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" /* diff --git a/usermods/wireguard/wireguard.cpp b/usermods/wireguard/wireguard.cpp index 77cc952fc..f88bfeb32 100644 --- a/usermods/wireguard/wireguard.cpp +++ b/usermods/wireguard/wireguard.cpp @@ -1,5 +1,3 @@ -#pragma once - #include #include "wled.h" diff --git a/usermods/wizlights/wizlights.cpp b/usermods/wizlights/wizlights.cpp index 67c0effdb..3ac756b12 100644 --- a/usermods/wizlights/wizlights.cpp +++ b/usermods/wizlights/wizlights.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" #include diff --git a/usermods/word-clock-matrix/word-clock-matrix.cpp b/usermods/word-clock-matrix/word-clock-matrix.cpp index 6643d293b..cd8f78c3a 100644 --- a/usermods/word-clock-matrix/word-clock-matrix.cpp +++ b/usermods/word-clock-matrix/word-clock-matrix.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "wled.h" /* From 2b07be1d09f94c8ab87d6c35aee6fa10b40dc45b Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 19 Jan 2025 22:09:44 +0000 Subject: [PATCH 044/109] usermod mpu6050: Fix incorrect int type --- usermods/mpu6050_imu/mpu6050_imu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/mpu6050_imu/mpu6050_imu.cpp b/usermods/mpu6050_imu/mpu6050_imu.cpp index 529d5dde4..6df5d64e1 100644 --- a/usermods/mpu6050_imu/mpu6050_imu.cpp +++ b/usermods/mpu6050_imu/mpu6050_imu.cpp @@ -103,7 +103,7 @@ class MPU6050Driver : public Usermod { VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements VectorFloat gravity; // [x, y, z] gravity vector - uint32 sample_count; + uint32_t sample_count; // Usermod output um_data_t um_data; From 44a1a1ebde1d408fbd8a52c2219ecde03e1b6682 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 19 Jan 2025 22:15:58 +0000 Subject: [PATCH 045/109] usermods: Fix MQTT checks - Check after including wled.h - Use WLED_DISABLE_MQTT instead of WLED_ENABLE_MQTT --- usermods/BH1750_v2/BH1750_v2.cpp | 8 ++++---- usermods/BME280_v2/BME280_v2.cpp | 8 ++++---- usermods/DHT/DHT.cpp | 2 +- usermods/Enclosure_with_OLED_temp_ESP07/usermod.cpp | 9 +++++---- .../Enclosure_with_OLED_temp_ESP07/usermod_bme280.cpp | 8 ++++---- usermods/LD2410_v2/LD2410_v2.cpp | 10 ++++------ usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp | 8 ++++---- usermods/mqtt_switch_v2/mqtt_switch_v2.cpp | 2 +- usermods/sensors_to_mqtt/sensors_to_mqtt.cpp | 8 ++++---- .../seven_segment_display/seven_segment_display.cpp | 6 +++--- .../seven_segment_display_reloaded.cpp | 6 +++--- usermods/sht/sht.cpp | 7 ++++--- usermods/smartnest/smartnest.cpp | 6 +++--- 13 files changed, 44 insertions(+), 44 deletions(-) diff --git a/usermods/BH1750_v2/BH1750_v2.cpp b/usermods/BH1750_v2/BH1750_v2.cpp index ec29f5b90..f033f39ed 100644 --- a/usermods/BH1750_v2/BH1750_v2.cpp +++ b/usermods/BH1750_v2/BH1750_v2.cpp @@ -1,13 +1,13 @@ // force the compiler to show a warning to confirm that this file is included #warning **** Included USERMOD_BH1750 **** -#ifndef WLED_ENABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - #include "wled.h" #include +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + // the max frequency to check photoresistor, 10 seconds #ifndef USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL #define USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL 10000 diff --git a/usermods/BME280_v2/BME280_v2.cpp b/usermods/BME280_v2/BME280_v2.cpp index 8cc986aa0..05aeca55a 100644 --- a/usermods/BME280_v2/BME280_v2.cpp +++ b/usermods/BME280_v2/BME280_v2.cpp @@ -1,15 +1,15 @@ // force the compiler to show a warning to confirm that this file is included #warning **** Included USERMOD_BME280 version 2.0 **** -#ifndef WLED_ENABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - #include "wled.h" #include #include // BME280 sensor #include // BME280 extended measurements +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + class UsermodBME280 : public Usermod { private: diff --git a/usermods/DHT/DHT.cpp b/usermods/DHT/DHT.cpp index 0b4810649..2ed3dd0ac 100644 --- a/usermods/DHT/DHT.cpp +++ b/usermods/DHT/DHT.cpp @@ -1,5 +1,5 @@ #include "wled.h" -#ifndef WLED_ENABLE_MQTT +#ifdef WLED_DISABLE_MQTT #error "This user mod requires MQTT to be enabled." #endif diff --git a/usermods/Enclosure_with_OLED_temp_ESP07/usermod.cpp b/usermods/Enclosure_with_OLED_temp_ESP07/usermod.cpp index 823ad7472..d51ddb57c 100644 --- a/usermods/Enclosure_with_OLED_temp_ESP07/usermod.cpp +++ b/usermods/Enclosure_with_OLED_temp_ESP07/usermod.cpp @@ -1,11 +1,12 @@ -#ifndef WLED_ENABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - #include "wled.h" #include #include // from https://github.com/olikraus/u8g2/ #include //Dallastemperature sensor + +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + //The SCL and SDA pins are defined here. //Lolin32 boards use SCL=5 SDA=4 #define U8X8_PIN_SCL 5 diff --git a/usermods/Enclosure_with_OLED_temp_ESP07/usermod_bme280.cpp b/usermods/Enclosure_with_OLED_temp_ESP07/usermod_bme280.cpp index 29a4332db..ce3c659e8 100644 --- a/usermods/Enclosure_with_OLED_temp_ESP07/usermod_bme280.cpp +++ b/usermods/Enclosure_with_OLED_temp_ESP07/usermod_bme280.cpp @@ -1,13 +1,13 @@ -#ifndef WLED_ENABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - #include "wled.h" #include #include // from https://github.com/olikraus/u8g2/ #include #include //BME280 sensor +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + void UpdateBME280Data(); #define Celsius // Show temperature measurement in Celsius otherwise is in Fahrenheit diff --git a/usermods/LD2410_v2/LD2410_v2.cpp b/usermods/LD2410_v2/LD2410_v2.cpp index 7c1c36745..095da12f2 100644 --- a/usermods/LD2410_v2/LD2410_v2.cpp +++ b/usermods/LD2410_v2/LD2410_v2.cpp @@ -1,12 +1,10 @@ -#warning **** Included USERMOD_LD2410 **** - -#ifndef WLED_ENABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - #include "wled.h" #include +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + class LD2410Usermod : public Usermod { private: diff --git a/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp index 8640ceb8a..44218d596 100644 --- a/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp +++ b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp @@ -1,7 +1,3 @@ -#ifndef WLED_ENABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - // this is remixed from usermod_v2_SensorsToMqtt.h (sensors_to_mqtt usermod) // and usermod_multi_relay.h (multi_relay usermod) @@ -9,6 +5,10 @@ #include #include // EnvironmentCalculations::HeatIndex(), ::DewPoint(), ::AbsoluteHumidity() +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + Adafruit_Si7021 si7021; class Si7021_MQTT_HA : public Usermod diff --git a/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp index 36e2adaab..2d745863a 100644 --- a/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp +++ b/usermods/mqtt_switch_v2/mqtt_switch_v2.cpp @@ -1,7 +1,7 @@ #warning "This usermod is deprecated and no longer maintained. It will be removed in a future WLED release. Please use usermod multi_relay which has more features." #include "wled.h" -#ifndef WLED_ENABLE_MQTT +#ifdef WLED_DISABLE_MQTT #error "This user mod requires MQTT to be enabled." #endif diff --git a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp index c203d4ee4..adfdffa00 100644 --- a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp +++ b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp @@ -1,7 +1,3 @@ -#ifndef WLED_ENABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - #include "wled.h" #include #include @@ -9,6 +5,10 @@ #include #include +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + Adafruit_BMP280 bmp; Adafruit_Si7021 si7021; Adafruit_CCS811 ccs811; diff --git a/usermods/seven_segment_display/seven_segment_display.cpp b/usermods/seven_segment_display/seven_segment_display.cpp index de5719b22..13a6306be 100644 --- a/usermods/seven_segment_display/seven_segment_display.cpp +++ b/usermods/seven_segment_display/seven_segment_display.cpp @@ -1,9 +1,9 @@ -#ifndef WLED_ENABLE_MQTT +#include "wled.h" + +#ifdef WLED_DISABLE_MQTT #error "This user mod requires MQTT to be enabled." #endif -#include "wled.h" - class SevenSegmentDisplay : public Usermod { diff --git a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp b/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp index 418e53b21..3e6877d5d 100644 --- a/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp +++ b/usermods/seven_segment_display_reloaded/seven_segment_display_reloaded.cpp @@ -1,9 +1,9 @@ -#ifndef WLED_ENABLE_MQTT +#include "wled.h" + +#ifdef WLED_DISABLE_MQTT #error "This user mod requires MQTT to be enabled." #endif -#include "wled.h" - class UsermodSSDR : public Usermod { //#define REFRESHTIME 497 diff --git a/usermods/sht/sht.cpp b/usermods/sht/sht.cpp index b269433ec..6a0e1ec45 100644 --- a/usermods/sht/sht.cpp +++ b/usermods/sht/sht.cpp @@ -1,9 +1,10 @@ -#ifndef WLED_ENABLE_MQTT +#include "wled.h" +#include "SHT85.h" + +#ifdef WLED_DISABLE_MQTT #error "This user mod requires MQTT to be enabled." #endif -#include "SHT85.h" - #define USERMOD_SHT_TYPE_SHT30 0 #define USERMOD_SHT_TYPE_SHT31 1 #define USERMOD_SHT_TYPE_SHT35 2 diff --git a/usermods/smartnest/smartnest.cpp b/usermods/smartnest/smartnest.cpp index 2ff13b36e..d0cb92dcf 100644 --- a/usermods/smartnest/smartnest.cpp +++ b/usermods/smartnest/smartnest.cpp @@ -1,9 +1,9 @@ -#ifndef WLED_ENABLE_MQTT +#include "wled.h" + +#ifdef WLED_DISABLE_MQTT #error "This user mod requires MQTT to be enabled." #endif -#include "wled.h" - class Smartnest : public Usermod { private: From 48372bcd91ddeeb630e86a50639d3b8e1f8edc5f Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 19 Jan 2025 22:16:20 +0000 Subject: [PATCH 046/109] platformio: Fix audioreactive usermod for ESP8266 --- platformio.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index 5cddbbf90..e45a42436 100644 --- a/platformio.ini +++ b/platformio.ini @@ -363,7 +363,7 @@ build_flags = ${common.build_flags} ${esp8266.build_flags_compat} -D WLED_RELEAS extends = env:nodemcuv2 board_build.f_cpu = 160000000L build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP8266_160\" #-DWLED_DISABLE_2D - -D USERMOD_AUDIOREACTIVE +custom_usermods = audioreactive [env:esp8266_2m] board = esp_wroom_02 @@ -385,7 +385,7 @@ build_flags = ${common.build_flags} ${esp8266.build_flags_compat} -D WLED_RELEAS extends = env:esp8266_2m board_build.f_cpu = 160000000L build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP02_160\" - -D USERMOD_AUDIOREACTIVE +custom_usermods = audioreactive [env:esp01_1m_full] board = esp01_1m @@ -408,8 +408,8 @@ build_flags = ${common.build_flags} ${esp8266.build_flags_compat} -D WLED_RELEAS extends = env:esp01_1m_full board_build.f_cpu = 160000000L build_flags = ${common.build_flags} ${esp8266.build_flags} -D WLED_RELEASE_NAME=\"ESP01_160\" -D WLED_DISABLE_OTA - -D USERMOD_AUDIOREACTIVE ; -D WLED_USE_REAL_MATH ;; may fix wrong sunset/sunrise times, at the cost of 7064 bytes FLASH and 975 bytes RAM +custom_usermods = audioreactive [env:esp32dev] board = esp32dev From 0233daeda20bf75d6d1d37bbc49d9e3fdef1aae7 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 19 Jan 2025 22:17:12 +0000 Subject: [PATCH 047/109] usermods/sensors_to_mqtt: Fix char type --- usermods/sensors_to_mqtt/sensors_to_mqtt.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp index adfdffa00..343fd08b6 100644 --- a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp +++ b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp @@ -21,7 +21,7 @@ private: float SensorPressure = 0; float SensorTemperature = 0; float SensorHumidity = 0; - char *SensorIaq = "Unknown"; + const char *SensorIaq = "Unknown"; String mqttTemperatureTopic = ""; String mqttHumidityTopic = ""; String mqttPressureTopic = ""; @@ -115,7 +115,7 @@ private: /** * Credits: Bouke_Regnerus @ https://community.home-assistant.io/t/example-indoor-air-quality-text-sensor-using-ccs811-sensor/125854 */ - char *_getIaqIndex(float humidity, int tvoc, int eco2) + const char *_getIaqIndex(float humidity, int tvoc, int eco2) { int iaq_index = 0; @@ -214,6 +214,7 @@ private: { return "Excellent"; } + return "Unknown"; } public: From 30a697e708b78c325c2b508ea7192f835061d22a Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 19 Jan 2025 22:19:01 +0000 Subject: [PATCH 048/109] usermods/PWM_fan: Disable pending cross-mod check A better solution for cross-module communication is required! --- usermods/PWM_fan/{library.json => library.json.disabled} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename usermods/PWM_fan/{library.json => library.json.disabled} (100%) diff --git a/usermods/PWM_fan/library.json b/usermods/PWM_fan/library.json.disabled similarity index 100% rename from usermods/PWM_fan/library.json rename to usermods/PWM_fan/library.json.disabled From 1d558e8391bb234c8189b2c5211f9b643b70f609 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Sun, 19 Jan 2025 22:25:34 +0000 Subject: [PATCH 049/109] platformio.ini: Add extra flags for usermod test Define a couple pins, leave a note where the usermod list comes from. --- platformio.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index e45a42436..9d346fa57 100644 --- a/platformio.ini +++ b/platformio.ini @@ -630,7 +630,10 @@ board = esp32dev platform = ${esp32_idf_V4.platform} build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_USERMODS\" + -DTOUCH_CS=9 + -DMQTTSWITCHPINS=8 lib_deps = ${esp32_idf_V4.lib_deps} monitor_filters = esp32_exception_decoder board_build.flash_mode = dio -board_build.partitions = ${esp32.big_partitions} +; custom_usermods = *every folder with library.json* -- injected by pio-scripts/load_usermods.py +board_build.partitions = ${esp32.extreme_partitions} ; We're gonna need a bigger boat From 0d44e7ec272b130f7e3eccf1d1f20a5405a327fe Mon Sep 17 00:00:00 2001 From: Will Miles Date: Tue, 21 Jan 2025 00:12:37 +0000 Subject: [PATCH 050/109] Usermods: Remove libArchive This is now managed centrally. --- usermods/ADS1115_v2/library.json | 1 - usermods/AHT10_v2/library.json | 1 - usermods/Analog_Clock/library.json | 3 +-- usermods/Animated_Staircase/library.json | 3 +-- usermods/BH1750_v2/library.json | 1 - usermods/BME280_v2/library.json.disabled | 1 - usermods/Battery/library.json | 3 +-- usermods/Cronixie/library.json | 3 +-- usermods/EleksTube_IPS/library.json | 1 - usermods/Internal_Temperature_v2/library.json | 3 +-- usermods/LD2410_v2/library.json | 1 - usermods/LDR_Dusk_Dawn_v2/library.json | 3 +-- usermods/MY9291/library.json.disabled | 3 +-- usermods/PIR_sensor_switch/library.json | 3 +-- usermods/PWM_fan/library.json.disabled | 3 +-- usermods/RTC/library.json.disabled | 3 +-- usermods/SN_Photoresistor/library.json | 3 +-- usermods/ST7789_display/library.json.disabled | 3 +-- usermods/Si7021_MQTT_HA/library.json | 1 - usermods/TetrisAI_v2/library.json | 3 +-- usermods/boblight/library.json | 3 +-- usermods/buzzer/library.json | 3 +-- usermods/deep_sleep/library.json | 3 +-- usermods/mqtt_switch_v2/library.json | 3 +-- usermods/multi_relay/library.json | 3 +-- usermods/pwm_outputs/library.json | 3 +-- usermods/sd_card/library.json | 3 +-- usermods/seven_segment_display/library.json | 3 +-- usermods/seven_segment_display_reloaded/library.json | 3 +-- usermods/sht/library.json.disabled | 3 +-- usermods/smartnest/library.json | 3 +-- usermods/stairway_wipe_basic/library.json | 3 +-- usermods/usermod_rotary_brightness_color/library.json | 3 +-- usermods/usermod_v2_HttpPullLightControl/library.json.disabled | 3 +-- usermods/usermod_v2_animartrix/library.json | 1 - usermods/usermod_v2_auto_save/library.json | 3 +-- .../usermod_v2_four_line_display_ALT/library.json.disabled | 3 +-- usermods/usermod_v2_klipper_percentage/library.json | 3 +-- usermods/usermod_v2_ping_pong_clock/library.json | 3 +-- usermods/usermod_v2_rotary_encoder_ui_ALT/library.json | 3 +-- usermods/usermod_v2_word_clock/library.json | 3 +-- usermods/wizlights/library.json | 3 +-- usermods/word-clock-matrix/library.json.disabled | 3 +-- 43 files changed, 35 insertions(+), 78 deletions(-) diff --git a/usermods/ADS1115_v2/library.json b/usermods/ADS1115_v2/library.json index 0ce2039f9..0b93c9351 100644 --- a/usermods/ADS1115_v2/library.json +++ b/usermods/ADS1115_v2/library.json @@ -1,6 +1,5 @@ { "name:": "ADS1115_v2", - "build": { "libArchive": false }, "dependencies": { "Adafruit BusIO": "https://github.com/adafruit/Adafruit_BusIO#1.13.2", "Adafruit ADS1X15": "https://github.com/adafruit/Adafruit_ADS1X15#2.4.0" diff --git a/usermods/AHT10_v2/library.json b/usermods/AHT10_v2/library.json index b4501ed72..94a206c57 100644 --- a/usermods/AHT10_v2/library.json +++ b/usermods/AHT10_v2/library.json @@ -1,6 +1,5 @@ { "name:": "AHT10_v2", - "build": { "libArchive": false }, "dependencies": { "enjoyneering/AHT10":"~1.1.0" } diff --git a/usermods/Analog_Clock/library.json b/usermods/Analog_Clock/library.json index 7a2fc50d5..4936950e9 100644 --- a/usermods/Analog_Clock/library.json +++ b/usermods/Analog_Clock/library.json @@ -1,4 +1,3 @@ { - "name:": "Analog_Clock", - "build": { "libArchive": false } + "name:": "Analog_Clock" } \ No newline at end of file diff --git a/usermods/Animated_Staircase/library.json b/usermods/Animated_Staircase/library.json index 73dc3f1b6..626baa494 100644 --- a/usermods/Animated_Staircase/library.json +++ b/usermods/Animated_Staircase/library.json @@ -1,4 +1,3 @@ { - "name:": "Animated_Staircase", - "build": { "libArchive": false } + "name:": "Animated_Staircase" } \ No newline at end of file diff --git a/usermods/BH1750_v2/library.json b/usermods/BH1750_v2/library.json index 2ce4054fb..b7f006cc2 100644 --- a/usermods/BH1750_v2/library.json +++ b/usermods/BH1750_v2/library.json @@ -1,6 +1,5 @@ { "name:": "BH1750_v2", - "build": { "libArchive": false }, "dependencies": { "claws/BH1750":"^1.2.0" } diff --git a/usermods/BME280_v2/library.json.disabled b/usermods/BME280_v2/library.json.disabled index 1cb805d34..7ae712583 100644 --- a/usermods/BME280_v2/library.json.disabled +++ b/usermods/BME280_v2/library.json.disabled @@ -1,6 +1,5 @@ { "name:": "BME280_v2", - "build": { "libArchive": false }, "dependencies": { "finitespace/BME280":"~3.0.0" } diff --git a/usermods/Battery/library.json b/usermods/Battery/library.json index 85be8542b..3f4774b87 100644 --- a/usermods/Battery/library.json +++ b/usermods/Battery/library.json @@ -1,4 +1,3 @@ { - "name:": "Battery", - "build": { "libArchive": false } + "name:": "Battery" } \ No newline at end of file diff --git a/usermods/Cronixie/library.json b/usermods/Cronixie/library.json index d22bfa45f..d48327649 100644 --- a/usermods/Cronixie/library.json +++ b/usermods/Cronixie/library.json @@ -1,4 +1,3 @@ { - "name:": "Cronixie", - "build": { "libArchive": false } + "name:": "Cronixie" } \ No newline at end of file diff --git a/usermods/EleksTube_IPS/library.json b/usermods/EleksTube_IPS/library.json index 0fc259afa..2cd1de6ff 100644 --- a/usermods/EleksTube_IPS/library.json +++ b/usermods/EleksTube_IPS/library.json @@ -1,6 +1,5 @@ { "name:": "EleksTube_IPS", - "build": { "libArchive": false }, "dependencies": { "TFT_eSPI" : "2.5.33" } diff --git a/usermods/Internal_Temperature_v2/library.json b/usermods/Internal_Temperature_v2/library.json index dc0ae30a4..6c1652380 100644 --- a/usermods/Internal_Temperature_v2/library.json +++ b/usermods/Internal_Temperature_v2/library.json @@ -1,4 +1,3 @@ { - "name:": "Internal_Temperature_v2", - "build": { "libArchive": false } + "name:": "Internal_Temperature_v2" } \ No newline at end of file diff --git a/usermods/LD2410_v2/library.json b/usermods/LD2410_v2/library.json index 60d493ad9..205bb8220 100644 --- a/usermods/LD2410_v2/library.json +++ b/usermods/LD2410_v2/library.json @@ -1,6 +1,5 @@ { "name:": "LD2410_v2", - "build": { "libArchive": false }, "dependencies": { "ncmreynolds/ld2410":"^0.1.3" } diff --git a/usermods/LDR_Dusk_Dawn_v2/library.json b/usermods/LDR_Dusk_Dawn_v2/library.json index c5e986209..bb57dbd2a 100644 --- a/usermods/LDR_Dusk_Dawn_v2/library.json +++ b/usermods/LDR_Dusk_Dawn_v2/library.json @@ -1,4 +1,3 @@ { - "name:": "LDR_Dusk_Dawn_v2", - "build": { "libArchive": false } + "name:": "LDR_Dusk_Dawn_v2" } \ No newline at end of file diff --git a/usermods/MY9291/library.json.disabled b/usermods/MY9291/library.json.disabled index ddf7aa092..9324e4a02 100644 --- a/usermods/MY9291/library.json.disabled +++ b/usermods/MY9291/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "MY9291", - "build": { "libArchive": false } + "name:": "MY9291" } \ No newline at end of file diff --git a/usermods/PIR_sensor_switch/library.json b/usermods/PIR_sensor_switch/library.json index 1c08ccc13..0ee7e18b5 100644 --- a/usermods/PIR_sensor_switch/library.json +++ b/usermods/PIR_sensor_switch/library.json @@ -1,4 +1,3 @@ { - "name:": "PIR_sensor_switch", - "build": { "libArchive": false } + "name:": "PIR_sensor_switch" } \ No newline at end of file diff --git a/usermods/PWM_fan/library.json.disabled b/usermods/PWM_fan/library.json.disabled index 67f026204..904d77236 100644 --- a/usermods/PWM_fan/library.json.disabled +++ b/usermods/PWM_fan/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "PWM_fan", - "build": { "libArchive": false } + "name:": "PWM_fan" } \ No newline at end of file diff --git a/usermods/RTC/library.json.disabled b/usermods/RTC/library.json.disabled index 17bc0d532..e0c527d2c 100644 --- a/usermods/RTC/library.json.disabled +++ b/usermods/RTC/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "RTC", - "build": { "libArchive": false } + "name:": "RTC" } \ No newline at end of file diff --git a/usermods/SN_Photoresistor/library.json b/usermods/SN_Photoresistor/library.json index 8e34ed3b4..7cac93f8d 100644 --- a/usermods/SN_Photoresistor/library.json +++ b/usermods/SN_Photoresistor/library.json @@ -1,4 +1,3 @@ { - "name:": "SN_Photoresistor", - "build": { "libArchive": false } + "name:": "SN_Photoresistor" } \ No newline at end of file diff --git a/usermods/ST7789_display/library.json.disabled b/usermods/ST7789_display/library.json.disabled index 725e20a65..abcd4635c 100644 --- a/usermods/ST7789_display/library.json.disabled +++ b/usermods/ST7789_display/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "ST7789_display", - "build": { "libArchive": false } + "name:": "ST7789_display" } \ No newline at end of file diff --git a/usermods/Si7021_MQTT_HA/library.json b/usermods/Si7021_MQTT_HA/library.json index 8294c1264..7b9ac4d77 100644 --- a/usermods/Si7021_MQTT_HA/library.json +++ b/usermods/Si7021_MQTT_HA/library.json @@ -1,6 +1,5 @@ { "name:": "Si7021_MQTT_HA", - "build": { "libArchive": false }, "dependencies": { "finitespace/BME280":"3.0.0" } diff --git a/usermods/TetrisAI_v2/library.json b/usermods/TetrisAI_v2/library.json index b32822882..7163dadbf 100644 --- a/usermods/TetrisAI_v2/library.json +++ b/usermods/TetrisAI_v2/library.json @@ -1,4 +1,3 @@ { - "name:": "TetrisAI_v2", - "build": { "libArchive": false } + "name:": "TetrisAI_v2" } \ No newline at end of file diff --git a/usermods/boblight/library.json b/usermods/boblight/library.json index 34de5c8f5..741d4cb18 100644 --- a/usermods/boblight/library.json +++ b/usermods/boblight/library.json @@ -1,4 +1,3 @@ { - "name:": "boblight", - "build": { "libArchive": false } + "name:": "boblight" } \ No newline at end of file diff --git a/usermods/buzzer/library.json b/usermods/buzzer/library.json index 6208090c4..6bbcdcc34 100644 --- a/usermods/buzzer/library.json +++ b/usermods/buzzer/library.json @@ -1,4 +1,3 @@ { - "name:": "buzzer", - "build": { "libArchive": false } + "name:": "buzzer" } \ No newline at end of file diff --git a/usermods/deep_sleep/library.json b/usermods/deep_sleep/library.json index 3f4687ef9..c8f66de10 100644 --- a/usermods/deep_sleep/library.json +++ b/usermods/deep_sleep/library.json @@ -1,4 +1,3 @@ { - "name:": "deep_sleep", - "build": { "libArchive": false } + "name:": "deep_sleep" } \ No newline at end of file diff --git a/usermods/mqtt_switch_v2/library.json b/usermods/mqtt_switch_v2/library.json index d60322574..cf9abefdb 100644 --- a/usermods/mqtt_switch_v2/library.json +++ b/usermods/mqtt_switch_v2/library.json @@ -1,4 +1,3 @@ { - "name:": "mqtt_switch_v2", - "build": { "libArchive": false } + "name:": "mqtt_switch_v2" } \ No newline at end of file diff --git a/usermods/multi_relay/library.json b/usermods/multi_relay/library.json index cb9437e68..7aa764399 100644 --- a/usermods/multi_relay/library.json +++ b/usermods/multi_relay/library.json @@ -1,4 +1,3 @@ { - "name:": "multi_relay", - "build": { "libArchive": false } + "name:": "multi_relay" } \ No newline at end of file diff --git a/usermods/pwm_outputs/library.json b/usermods/pwm_outputs/library.json index bdb9937e7..4bf07777a 100644 --- a/usermods/pwm_outputs/library.json +++ b/usermods/pwm_outputs/library.json @@ -1,4 +1,3 @@ { - "name:": "pwm_outputs", - "build": { "libArchive": false } + "name:": "pwm_outputs" } \ No newline at end of file diff --git a/usermods/sd_card/library.json b/usermods/sd_card/library.json index 5b8faf162..1f123ead6 100644 --- a/usermods/sd_card/library.json +++ b/usermods/sd_card/library.json @@ -1,4 +1,3 @@ { - "name:": "sd_card", - "build": { "libArchive": false } + "name:": "sd_card" } \ No newline at end of file diff --git a/usermods/seven_segment_display/library.json b/usermods/seven_segment_display/library.json index 6a3061194..8764e92b3 100644 --- a/usermods/seven_segment_display/library.json +++ b/usermods/seven_segment_display/library.json @@ -1,4 +1,3 @@ { - "name:": "seven_segment_display", - "build": { "libArchive": false } + "name:": "seven_segment_display" } \ No newline at end of file diff --git a/usermods/seven_segment_display_reloaded/library.json b/usermods/seven_segment_display_reloaded/library.json index 5fa5037f8..fdce8b536 100644 --- a/usermods/seven_segment_display_reloaded/library.json +++ b/usermods/seven_segment_display_reloaded/library.json @@ -1,4 +1,3 @@ { - "name:": "seven_segment_display_reloaded", - "build": { "libArchive": false } + "name:": "seven_segment_display_reloaded" } \ No newline at end of file diff --git a/usermods/sht/library.json.disabled b/usermods/sht/library.json.disabled index 2788c34ac..330093bda 100644 --- a/usermods/sht/library.json.disabled +++ b/usermods/sht/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "sht", - "build": { "libArchive": false } + "name:": "sht" } \ No newline at end of file diff --git a/usermods/smartnest/library.json b/usermods/smartnest/library.json index 7a9d95dd4..e2c6ab351 100644 --- a/usermods/smartnest/library.json +++ b/usermods/smartnest/library.json @@ -1,4 +1,3 @@ { - "name:": "smartnest", - "build": { "libArchive": false } + "name:": "smartnest" } \ No newline at end of file diff --git a/usermods/stairway_wipe_basic/library.json b/usermods/stairway_wipe_basic/library.json index 801846ead..59cb5da93 100644 --- a/usermods/stairway_wipe_basic/library.json +++ b/usermods/stairway_wipe_basic/library.json @@ -1,4 +1,3 @@ { - "name:": "stairway_wipe_basic", - "build": { "libArchive": false } + "name:": "stairway_wipe_basic" } \ No newline at end of file diff --git a/usermods/usermod_rotary_brightness_color/library.json b/usermods/usermod_rotary_brightness_color/library.json index 5e6691697..777ec19c0 100644 --- a/usermods/usermod_rotary_brightness_color/library.json +++ b/usermods/usermod_rotary_brightness_color/library.json @@ -1,4 +1,3 @@ { - "name:": "usermod_rotary_brightness_color", - "build": { "libArchive": false } + "name:": "usermod_rotary_brightness_color" } \ No newline at end of file diff --git a/usermods/usermod_v2_HttpPullLightControl/library.json.disabled b/usermods/usermod_v2_HttpPullLightControl/library.json.disabled index 91735b8cd..0f66710b3 100644 --- a/usermods/usermod_v2_HttpPullLightControl/library.json.disabled +++ b/usermods/usermod_v2_HttpPullLightControl/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "usermod_v2_HttpPullLightControl", - "build": { "libArchive": false } + "name:": "usermod_v2_HttpPullLightControl" } \ No newline at end of file diff --git a/usermods/usermod_v2_animartrix/library.json b/usermods/usermod_v2_animartrix/library.json index 667572bad..4552be330 100644 --- a/usermods/usermod_v2_animartrix/library.json +++ b/usermods/usermod_v2_animartrix/library.json @@ -1,6 +1,5 @@ { "name": "animartrix", - "build": { "libArchive": false }, "dependencies": { "Animartrix": "https://github.com/netmindz/animartrix.git#b172586" } diff --git a/usermods/usermod_v2_auto_save/library.json b/usermods/usermod_v2_auto_save/library.json index 127767eb0..d703487a7 100644 --- a/usermods/usermod_v2_auto_save/library.json +++ b/usermods/usermod_v2_auto_save/library.json @@ -1,4 +1,3 @@ { - "name": "auto_save", - "build": { "libArchive": false } + "name": "auto_save" } \ No newline at end of file diff --git a/usermods/usermod_v2_four_line_display_ALT/library.json.disabled b/usermods/usermod_v2_four_line_display_ALT/library.json.disabled index 33c277bdc..56612c96e 100644 --- a/usermods/usermod_v2_four_line_display_ALT/library.json.disabled +++ b/usermods/usermod_v2_four_line_display_ALT/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "usermod_v2_four_line_display_ALT", - "build": { "libArchive": false } + "name:": "usermod_v2_four_line_display_ALT" } \ No newline at end of file diff --git a/usermods/usermod_v2_klipper_percentage/library.json b/usermods/usermod_v2_klipper_percentage/library.json index 99e0546c5..b31fb1ad1 100644 --- a/usermods/usermod_v2_klipper_percentage/library.json +++ b/usermods/usermod_v2_klipper_percentage/library.json @@ -1,4 +1,3 @@ { - "name:": "usermod_v2_klipper_percentage", - "build": { "libArchive": false } + "name:": "usermod_v2_klipper_percentage" } \ No newline at end of file diff --git a/usermods/usermod_v2_ping_pong_clock/library.json b/usermods/usermod_v2_ping_pong_clock/library.json index b3417b987..fe23cd910 100644 --- a/usermods/usermod_v2_ping_pong_clock/library.json +++ b/usermods/usermod_v2_ping_pong_clock/library.json @@ -1,4 +1,3 @@ { - "name:": "usermod_v2_ping_pong_clock", - "build": { "libArchive": false } + "name:": "usermod_v2_ping_pong_clock" } \ No newline at end of file diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json index 065c67d9a..5f857218b 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/library.json @@ -1,4 +1,3 @@ { - "name:": "usermod_v2_rotary_encoder_ui_ALT", - "build": { "libArchive": false } + "name:": "usermod_v2_rotary_encoder_ui_ALT" } \ No newline at end of file diff --git a/usermods/usermod_v2_word_clock/library.json b/usermods/usermod_v2_word_clock/library.json index 9e6a339d1..83c14dc7e 100644 --- a/usermods/usermod_v2_word_clock/library.json +++ b/usermods/usermod_v2_word_clock/library.json @@ -1,4 +1,3 @@ { - "name:": "usermod_v2_word_clock", - "build": { "libArchive": false } + "name:": "usermod_v2_word_clock" } \ No newline at end of file diff --git a/usermods/wizlights/library.json b/usermods/wizlights/library.json index 38ea759f8..687fba0f7 100644 --- a/usermods/wizlights/library.json +++ b/usermods/wizlights/library.json @@ -1,4 +1,3 @@ { - "name:": "wizlights", - "build": { "libArchive": false } + "name:": "wizlights" } \ No newline at end of file diff --git a/usermods/word-clock-matrix/library.json.disabled b/usermods/word-clock-matrix/library.json.disabled index 12a8bd7f0..d971dfff4 100644 --- a/usermods/word-clock-matrix/library.json.disabled +++ b/usermods/word-clock-matrix/library.json.disabled @@ -1,4 +1,3 @@ { - "name:": "word-clock-matrix", - "build": { "libArchive": false } + "name:": "word-clock-matrix" } \ No newline at end of file From ee7ec20f29e1dd7fc3e525314b66101634b28974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Tue, 21 Jan 2025 17:50:36 +0100 Subject: [PATCH 051/109] Convert BusManager class to namespace - use unique_ptr/make_unique for busses --- wled00/bus_manager.cpp | 67 ++++++++++--------------- wled00/bus_manager.h | 110 ++++++++++++++++++++++------------------- wled00/cfg.cpp | 3 +- wled00/set.cpp | 3 +- wled00/wled.h | 11 ++--- wled00/xml.cpp | 2 +- 6 files changed, 94 insertions(+), 102 deletions(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 3abf61412..669111bfa 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -63,6 +63,8 @@ uint8_t realtimeBroadcast(uint8_t type, IPAddress client, uint16_t length, const #define W(c) (byte((c) >> 24)) +static ColorOrderMap _colorOrderMap = {}; + bool ColorOrderMap::add(uint16_t start, uint16_t len, uint8_t colorOrder) { if (count() >= WLED_MAX_COLOR_ORDER_MAPPINGS || len == 0 || (colorOrder & 0x0F) > COL_ORDER_MAX) return false; // upper nibble contains W swap information _mappings.push_back({start,len,colorOrder}); @@ -72,10 +74,8 @@ bool ColorOrderMap::add(uint16_t start, uint16_t len, uint8_t colorOrder) { uint8_t IRAM_ATTR ColorOrderMap::getPixelColorOrder(uint16_t pix, uint8_t defaultColorOrder) const { // upper nibble contains W swap information // when ColorOrderMap's upper nibble contains value >0 then swap information is used from it, otherwise global swap is used - for (unsigned i = 0; i < count(); i++) { - if (pix >= _mappings[i].start && pix < (_mappings[i].start + _mappings[i].len)) { - return _mappings[i].colorOrder | ((_mappings[i].colorOrder >> 4) ? 0 : (defaultColorOrder & 0xF0)); - } + for (const auto& map : _mappings) { + if (pix >= map.start && pix < (map.start + map.len)) return map.colorOrder | ((map.colorOrder >> 4) ? 0 : (defaultColorOrder & 0xF0)); } return defaultColorOrder; } @@ -124,13 +124,12 @@ uint8_t *Bus::allocateData(size_t size) { } -BusDigital::BusDigital(const BusConfig &bc, uint8_t nr, const ColorOrderMap &com) +BusDigital::BusDigital(const BusConfig &bc, uint8_t nr) : Bus(bc.type, bc.start, bc.autoWhite, bc.count, bc.reversed, (bc.refreshReq || bc.type == TYPE_TM1814)) , _skip(bc.skipAmount) //sacrificial pixels , _colorOrder(bc.colorOrder) , _milliAmpsPerLed(bc.milliAmpsPerLed) , _milliAmpsMax(bc.milliAmpsMax) -, _colorOrderMap(com) { if (!isDigital(bc.type) || !bc.count) return; if (!PinManager::allocatePin(bc.pins[0], true, PinOwner::BusDigital)) return; @@ -819,13 +818,17 @@ uint32_t BusManager::memUsage(unsigned maxChannels, unsigned maxCount, unsigned int BusManager::add(const BusConfig &bc) { if (getNumBusses() - getNumVirtualBusses() >= WLED_MAX_BUSSES) return -1; if (Bus::isVirtual(bc.type)) { - busses[numBusses] = new BusNetwork(bc); + busses.push_back(make_unique(bc)); + //busses.push_back(new BusNetwork(bc)); } else if (Bus::isDigital(bc.type)) { - busses[numBusses] = new BusDigital(bc, numBusses, colorOrderMap); + busses.push_back(make_unique(bc, numDigital)); + //busses.push_back(new BusDigital(bc, numDigital)); } else if (Bus::isOnOff(bc.type)) { - busses[numBusses] = new BusOnOff(bc); + busses.push_back(make_unique(bc)); + //busses.push_back(new BusOnOff(bc)); } else { - busses[numBusses] = new BusPwm(bc); + busses.push_back(make_unique(bc)); + //busses.push_back(new BusPwm(bc)); } return numBusses++; } @@ -865,9 +868,8 @@ void BusManager::removeAll() { DEBUG_PRINTLN(F("Removing all.")); //prevents crashes due to deleting busses while in use. while (!canAllShow()) yield(); - for (unsigned i = 0; i < numBusses; i++) delete busses[i]; - numBusses = 0; - _parallelOutputs = 1; + //for (auto &bus : busses) delete bus; // needed when not using std::unique_ptr C++ >11 + busses.clear(); PolyBus::setParallelI2S1Output(false); } @@ -914,8 +916,8 @@ void BusManager::on() { uint8_t pins[2] = {255,255}; if (busses[i]->isDigital() && busses[i]->getPins(pins)) { if (pins[0] == LED_BUILTIN || pins[1] == LED_BUILTIN) { - BusDigital *bus = static_cast(busses[i]); - bus->begin(); + BusDigital &b = static_cast(*bus); + b.begin(); break; } } @@ -943,16 +945,10 @@ void BusManager::off() { } void BusManager::show() { - _milliAmpsUsed = 0; - for (unsigned i = 0; i < numBusses; i++) { - busses[i]->show(); - _milliAmpsUsed += busses[i]->getUsedCurrent(); - } -} - -void BusManager::setStatusPixel(uint32_t c) { - for (unsigned i = 0; i < numBusses; i++) { - busses[i]->setStatusPixel(c); + _gMilliAmpsUsed = 0; + for (auto &bus : busses) { + bus->show(); + _gMilliAmpsUsed += bus->getUsedCurrent(); } } @@ -995,17 +991,8 @@ bool BusManager::canAllShow() { return true; } -Bus* BusManager::getBus(uint8_t busNr) { - if (busNr >= numBusses) return nullptr; - return busses[busNr]; -} +ColorOrderMap& BusManager::getColorOrderMap() { return _colorOrderMap; } -//semi-duplicate of strip.getLengthTotal() (though that just returns strip._length, calculated in finalizeInit()) -uint16_t BusManager::getTotalLength() { - unsigned len = 0; - for (unsigned i=0; igetLength(); - return len; -} bool PolyBus::useParallelI2S = false; @@ -1016,9 +1003,7 @@ uint8_t Bus::_gAWM = 255; uint16_t BusDigital::_milliAmpsTotal = 0; -uint8_t BusManager::numBusses = 0; -Bus* BusManager::busses[WLED_MAX_BUSSES+WLED_MIN_VIRTUAL_BUSSES]; -ColorOrderMap BusManager::colorOrderMap = {}; -uint16_t BusManager::_milliAmpsUsed = 0; -uint16_t BusManager::_milliAmpsMax = ABL_MILLIAMPS_DEFAULT; -uint8_t BusManager::_parallelOutputs = 1; +std::vector> BusManager::busses; +//std::vector BusManager::busses; +uint16_t BusManager::_gMilliAmpsUsed = 0; +uint16_t BusManager::_gMilliAmpsMax = ABL_MILLIAMPS_DEFAULT; diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 9aed01308..16a708d47 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -8,6 +8,20 @@ #include "const.h" #include "pin_manager.h" #include +#include +#include + +#if __cplusplus >= 201402L +using std::make_unique; +#else +// Really simple C++11 shim for non-array case; implementation from cppreference.com +template +std::unique_ptr +make_unique(Args&&... args) +{ + return std::unique_ptr(new T(std::forward(args)...)); +} +#endif //colors.cpp uint16_t approximateKelvinFromRGB(uint32_t rgb); @@ -198,7 +212,7 @@ class Bus { class BusDigital : public Bus { public: - BusDigital(const BusConfig &bc, uint8_t nr, const ColorOrderMap &com); + BusDigital(const BusConfig &bc, uint8_t nr); ~BusDigital() { cleanup(); } void show() override; @@ -229,7 +243,6 @@ class BusDigital : public Bus { uint8_t _milliAmpsPerLed; uint16_t _milliAmpsMax; void * _busPtr; - const ColorOrderMap &_colorOrderMap; static uint16_t _milliAmpsTotal; // is overwitten/recalculated on each show() @@ -374,61 +387,58 @@ struct BusConfig { #endif #endif -class BusManager { - public: - BusManager() {}; +namespace BusManager { - //utility to get the approx. memory usage of a given BusConfig - static uint32_t memUsage(const BusConfig &bc); - static uint32_t memUsage(unsigned channels, unsigned count, unsigned buses = 1); - static uint16_t currentMilliamps() { return _milliAmpsUsed + MA_FOR_ESP; } - static uint16_t ablMilliampsMax() { return _milliAmpsMax; } + extern std::vector> busses; + //extern std::vector busses; + extern uint16_t _gMilliAmpsUsed; + extern uint16_t _gMilliAmpsMax; - static int add(const BusConfig &bc); - static void useParallelOutput(); // workaround for inaccessible PolyBus + #ifdef ESP32_DATA_IDLE_HIGH + void esp32RMTInvertIdle() ; + #endif + inline uint8_t getNumVirtualBusses() { + int j = 0; + for (const auto &bus : busses) j += bus->isVirtual(); + return j; + } - //do not call this method from system context (network callback) - static void removeAll(); + unsigned memUsage(); + inline uint16_t currentMilliamps() { return _gMilliAmpsUsed + MA_FOR_ESP; } + //inline uint16_t ablMilliampsMax() { unsigned sum = 0; for (auto &bus : busses) sum += bus->getMaxCurrent(); return sum; } + inline uint16_t ablMilliampsMax() { return _gMilliAmpsMax; } // used for compatibility reasons (and enabling virtual global ABL) + inline void setMilliampsMax(uint16_t max) { _gMilliAmpsMax = max;} - static void on(); - static void off(); + void useParallelOutput(); // workaround for inaccessible PolyBus + bool hasParallelOutput(); // workaround for inaccessible PolyBus - static void show(); - static bool canAllShow(); - static void setStatusPixel(uint32_t c); - [[gnu::hot]] static void setPixelColor(unsigned pix, uint32_t c); - static void setBrightness(uint8_t b); - // for setSegmentCCT(), cct can only be in [-1,255] range; allowWBCorrection will convert it to K - // WARNING: setSegmentCCT() is a misleading name!!! much better would be setGlobalCCT() or just setCCT() - static void setSegmentCCT(int16_t cct, bool allowWBCorrection = false); - static inline void setMilliampsMax(uint16_t max) { _milliAmpsMax = max;} - [[gnu::hot]] static uint32_t getPixelColor(unsigned pix); - static inline int16_t getSegmentCCT() { return Bus::getCCT(); } + //do not call this method from system context (network callback) + void removeAll(); + int add(const BusConfig &bc); - static Bus* getBus(uint8_t busNr); + void on(); + void off(); - //semi-duplicate of strip.getLengthTotal() (though that just returns strip._length, calculated in finalizeInit()) - static uint16_t getTotalLength(); - static inline uint8_t getNumBusses() { return numBusses; } - static String getLEDTypesJSONString(); + [[gnu::hot]] void setPixelColor(unsigned pix, uint32_t c); + [[gnu::hot]] uint32_t getPixelColor(unsigned pix); + void show(); + bool canAllShow(); + inline void setStatusPixel(uint32_t c) { for (auto &bus : busses) bus->setStatusPixel(c);} + inline void setBrightness(uint8_t b) { for (auto &bus : busses) bus->setBrightness(b); } + // for setSegmentCCT(), cct can only be in [-1,255] range; allowWBCorrection will convert it to K + // WARNING: setSegmentCCT() is a misleading name!!! much better would be setGlobalCCT() or just setCCT() + void setSegmentCCT(int16_t cct, bool allowWBCorrection = false); + inline int16_t getSegmentCCT() { return Bus::getCCT(); } + inline Bus& getBus(uint8_t busNr) { return *busses[std::min((size_t)busNr, busses.size()-1)]; } + inline uint8_t getNumBusses() { return busses.size(); } - static inline ColorOrderMap& getColorOrderMap() { return colorOrderMap; } - - private: - static uint8_t numBusses; - static Bus* busses[WLED_MAX_BUSSES+WLED_MIN_VIRTUAL_BUSSES]; - static ColorOrderMap colorOrderMap; - static uint16_t _milliAmpsUsed; - static uint16_t _milliAmpsMax; - static uint8_t _parallelOutputs; - - #ifdef ESP32_DATA_IDLE_HIGH - static void esp32RMTInvertIdle() ; - #endif - static uint8_t getNumVirtualBusses() { - int j = 0; - for (int i=0; iisVirtual()) j++; - return j; - } + //semi-duplicate of strip.getLengthTotal() (though that just returns strip._length, calculated in finalizeInit()) + inline uint16_t getTotalLength(bool onlyPhysical = false) { + unsigned len = 0; + for (const auto &bus : busses) if (!(bus->isVirtual() && onlyPhysical)) len += bus->getLength(); + return len; + } + String getLEDTypesJSONString(); + ColorOrderMap& getColorOrderMap(); }; #endif diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 00cfc60d7..352b6c773 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -876,8 +876,7 @@ void serializeConfig() { const ColorOrderMap& com = BusManager::getColorOrderMap(); for (size_t s = 0; s < com.count(); s++) { const ColorOrderMapEntry *entry = com.get(s); - if (!entry) break; - + if (!entry || !entry->len) break; JsonObject co = hw_com.createNestedObject(); co["start"] = entry->start; co["len"] = entry->len; diff --git a/wled00/set.cpp b/wled00/set.cpp index c0977f262..f7be16e0f 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -208,8 +208,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) type |= request->hasArg(rf) << 7; // off refresh override // actual finalization is done in WLED::loop() (removing old busses and adding new) // this may happen even before this loop is finished so we do "doInitBusses" after the loop - if (busConfigs[s] != nullptr) delete busConfigs[s]; - busConfigs[s] = new(std::nothrow) BusConfig(type, pins, start, length, colorOrder | (channelSwap<<4), request->hasArg(cv), skip, awmode, freq, useGlobalLedBuffer, maPerLed, maMax); + busConfigs.emplace_back(type, pins, start, length, colorOrder | (channelSwap<<4), request->hasArg(cv), skip, awmode, freq, useGlobalLedBuffer, maPerLed, maMax); busesChanged = true; } //doInitBusses = busesChanged; // we will do that below to ensure all input data is processed diff --git a/wled00/wled.h b/wled00/wled.h index a18199446..80d319856 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -891,12 +891,11 @@ WLED_GLOBAL ESPAsyncE131 ddp _INIT_N(((handleE131Packet))); WLED_GLOBAL bool e131NewData _INIT(false); // led fx library object -WLED_GLOBAL BusManager busses _INIT(BusManager()); -WLED_GLOBAL WS2812FX strip _INIT(WS2812FX()); -WLED_GLOBAL BusConfig* busConfigs[WLED_MAX_BUSSES+WLED_MIN_VIRTUAL_BUSSES] _INIT({nullptr}); //temporary, to remember values from network callback until after -WLED_GLOBAL bool doInitBusses _INIT(false); -WLED_GLOBAL int8_t loadLedmap _INIT(-1); -WLED_GLOBAL uint8_t currentLedmap _INIT(0); +WLED_GLOBAL WS2812FX strip _INIT(WS2812FX()); +WLED_GLOBAL std::vector busConfigs; //temporary, to remember values from network callback until after +WLED_GLOBAL bool doInitBusses _INIT(false); +WLED_GLOBAL int8_t loadLedmap _INIT(-1); +WLED_GLOBAL uint8_t currentLedmap _INIT(0); #ifndef ESP8266 WLED_GLOBAL char *ledmapNames[WLED_MAX_LEDMAPS-1] _INIT_N(({nullptr})); #endif diff --git a/wled00/xml.cpp b/wled00/xml.cpp index 78d2d7d56..b53958c4f 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -357,7 +357,7 @@ void getSettingsJS(byte subPage, Print& settingsScript) const ColorOrderMap& com = BusManager::getColorOrderMap(); for (int s = 0; s < com.count(); s++) { const ColorOrderMapEntry* entry = com.get(s); - if (entry == nullptr) break; + if (!entry || !entry->len) break; settingsScript.printf_P(PSTR("addCOM(%d,%d,%d);"), entry->start, entry->len, entry->colorOrder); } From bf69d37cbe6bc4430093d275a6200e3780cb941e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Tue, 21 Jan 2025 20:14:20 +0100 Subject: [PATCH 052/109] Revert getBus() changes --- wled00/FX_fcn.cpp | 31 +++++++++++++++---------------- wled00/bus_manager.cpp | 15 ++++++++++++--- wled00/bus_manager.h | 2 +- wled00/cfg.cpp | 35 +++++++++++++++++++++++------------ wled00/xml.cpp | 6 +++--- 5 files changed, 54 insertions(+), 35 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index cf37a46c2..031381420 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -1117,12 +1117,9 @@ void Segment::refreshLightCapabilities() { } for (unsigned b = 0; b < BusManager::getNumBusses(); b++) { - Bus *bus = BusManager::getBus(b); - if (bus == nullptr || bus->getLength()==0) break; - if (!bus->isOk()) continue; - if (bus->getStart() >= segStopIdx) continue; - if (bus->getStart() + bus->getLength() <= segStartIdx) continue; - + const Bus *bus = BusManager::getBus(b); + if (!bus || !bus->isOk()) break; + if (bus->getStart() >= segStopIdx || bus->getStart() + bus->getLength() <= segStartIdx) continue; if (bus->hasRGB() || (strip.cctFromRgb && bus->hasCCT())) capabilities |= SEG_CAPABILITY_RGB; if (!strip.cctFromRgb && bus->hasCCT()) capabilities |= SEG_CAPABILITY_CCT; if (strip.correctWB && (bus->hasRGB() || bus->hasCCT())) capabilities |= SEG_CAPABILITY_CCT; //white balance correction (CCT slider) @@ -1397,8 +1394,7 @@ void WS2812FX::finalizeInit() { _length = 0; for (int i=0; igetStart() + bus->getLength() > MAX_LEDS) break; + if (!bus || !bus->isOk() || bus->getStart() + bus->getLength() > MAX_LEDS) break; //RGBW mode is enabled if at least one of the strips is RGBW _hasWhiteChannel |= bus->hasWhite(); //refresh is required to remain off if at least one of the strips requires the refresh. @@ -1408,6 +1404,7 @@ void WS2812FX::finalizeInit() { // This must be done after all buses have been created, as some kinds (parallel I2S) interact bus->begin(); + bus->setBrightness(bri); } Segment::maxWidth = _length; @@ -1691,8 +1688,8 @@ uint16_t WS2812FX::getLengthPhysical() const { //not influenced by auto-white mode, also true if white slider does not affect output white channel bool WS2812FX::hasRGBWBus() const { for (size_t b = 0; b < BusManager::getNumBusses(); b++) { - Bus *bus = BusManager::getBus(b); - if (bus == nullptr || bus->getLength()==0) break; + const Bus *bus = BusManager::getBus(b); + if (!bus || !bus->isOk()) break; if (bus->hasRGB() && bus->hasWhite()) return true; } return false; @@ -1701,8 +1698,8 @@ bool WS2812FX::hasRGBWBus() const { bool WS2812FX::hasCCTBus() const { if (cctFromRgb && !correctWB) return false; for (size_t b = 0; b < BusManager::getNumBusses(); b++) { - Bus *bus = BusManager::getBus(b); - if (bus == nullptr || bus->getLength()==0) break; + const Bus *bus = BusManager::getBus(b); + if (!bus || !bus->isOk()) break; if (bus->hasCCT()) return true; } return false; @@ -1755,10 +1752,11 @@ void WS2812FX::makeAutoSegments(bool forceReset) { #endif for (size_t i = s; i < BusManager::getNumBusses(); i++) { - Bus* b = BusManager::getBus(i); + const Bus *bus = BusManager::getBus(i); + if (!bus || !bus->isOk()) break; - segStarts[s] = b->getStart(); - segStops[s] = segStarts[s] + b->getLength(); + segStarts[s] = bus->getStart(); + segStops[s] = segStarts[s] + bus->getLength(); #ifndef WLED_DISABLE_2D if (isMatrix && segStops[s] <= Segment::maxWidth*Segment::maxHeight) continue; // ignore buses comprising matrix @@ -1848,7 +1846,8 @@ bool WS2812FX::checkSegmentAlignment() const { bool aligned = false; for (const segment &seg : _segments) { for (unsigned b = 0; bisOk()) break; if (seg.start == bus->getStart() && seg.stop == bus->getStart() + bus->getLength()) aligned = true; } if (seg.start == 0 && seg.stop == _length) aligned = true; diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 669111bfa..6807f4381 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -153,8 +153,17 @@ BusDigital::BusDigital(const BusConfig &bc, uint8_t nr) uint16_t lenToCreate = bc.count; if (bc.type == TYPE_WS2812_1CH_X3) lenToCreate = NUM_ICS_WS2812_1CH_3X(bc.count); // only needs a third of "RGB" LEDs for NeoPixelBus _busPtr = PolyBus::create(_iType, _pins, lenToCreate + _skip, nr); - _valid = (_busPtr != nullptr); - DEBUG_PRINTF_P(PSTR("%successfully inited strip %u (len %u) with type %u and pins %u,%u (itype %u). mA=%d/%d\n"), _valid?"S":"Uns", nr, bc.count, bc.type, _pins[0], is2Pin(bc.type)?_pins[1]:255, _iType, _milliAmpsPerLed, _milliAmpsMax); + _valid = (_busPtr != nullptr) && bc.count > 0; + DEBUG_PRINTF_P(PSTR("Bus: %successfully inited #%u (len:%u, type:%u (RGB:%d, W:%d, CCT:%d), pins:%u,%u [itype:%u] mA=%d/%d)\n"), + _valid?"S":"Uns", + (int)nr, + (int)bc.count, + (int)bc.type, + (int)_hasRgb, (int)_hasWhite, (int)_hasCCT, + (unsigned)_pins[0], is2Pin(bc.type)?(unsigned)_pins[1]:255U, + (unsigned)_iType, + (int)_milliAmpsPerLed, (int)_milliAmpsMax + ); } //DISCLAIMER @@ -734,7 +743,7 @@ BusNetwork::BusNetwork(const BusConfig &bc) _hasCCT = false; _UDPchannels = _hasWhite + 3; _client = IPAddress(bc.pins[0],bc.pins[1],bc.pins[2],bc.pins[3]); - _valid = (allocateData(_len * _UDPchannels) != nullptr); + _valid = (allocateData(_len * _UDPchannels) != nullptr) && bc.count > 0; DEBUG_PRINTF_P(PSTR("%successfully inited virtual strip with type %u and IP %u.%u.%u.%u\n"), _valid?"S":"Uns", bc.type, bc.pins[0], bc.pins[1], bc.pins[2], bc.pins[3]); } diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 16a708d47..8f4906eae 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -429,7 +429,7 @@ namespace BusManager { // WARNING: setSegmentCCT() is a misleading name!!! much better would be setGlobalCCT() or just setCCT() void setSegmentCCT(int16_t cct, bool allowWBCorrection = false); inline int16_t getSegmentCCT() { return Bus::getCCT(); } - inline Bus& getBus(uint8_t busNr) { return *busses[std::min((size_t)busNr, busses.size()-1)]; } + inline Bus* getBus(size_t busNr) { return busNr < busses.size() ? busses[busNr].get() : nullptr; } inline uint8_t getNumBusses() { return busses.size(); } //semi-duplicate of strip.getLengthTotal() (though that just returns strip._length, calculated in finalizeInit()) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 352b6c773..0d3165e0e 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -239,7 +239,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { DEBUG_PRINTF_P(PSTR("LED buffer size: %uB\n"), mem); DEBUG_PRINTF_P(PSTR("Heap after buses: %d\n"), ESP.getFreeHeap()); } - if (hw_led["rev"]) BusManager::getBus(0)->setReversed(true); //set 0.11 global reversed setting for first bus + if (hw_led["rev"] && BusManager::getNumBusses()) BusManager::getBus(0)->setReversed(true); //set 0.11 global reversed setting for first bus // read color order map configuration JsonArray hw_com = hw[F("com")]; @@ -852,24 +852,35 @@ void serializeConfig() { JsonArray hw_led_ins = hw_led.createNestedArray("ins"); for (size_t s = 0; s < BusManager::getNumBusses(); s++) { - Bus *bus = BusManager::getBus(s); - if (!bus || bus->getLength()==0) break; + DEBUG_PRINTF_P(PSTR("Cfg: Saving bus #%u\n"), s); + const Bus *bus = BusManager::getBus(s); + if (!bus || !bus->isOk()) break; + DEBUG_PRINTF_P(PSTR(" (%d-%d, type:%d, CO:%d, rev:%d, skip:%d, AW:%d kHz:%d, mA:%d/%d)\n"), + (int)bus->getStart(), (int)(bus->getStart()+bus->getLength()), + (int)(bus->getType() & 0x7F), + (int)bus->getColorOrder(), + (int)bus->isReversed(), + (int)bus->skippedLeds(), + (int)bus->getAutoWhiteMode(), + (int)bus->getFrequency(), + (int)bus->getLEDCurrent(), (int)bus->getMaxCurrent() + ); JsonObject ins = hw_led_ins.createNestedObject(); ins["start"] = bus->getStart(); - ins["len"] = bus->getLength(); + ins["len"] = bus->getLength(); JsonArray ins_pin = ins.createNestedArray("pin"); uint8_t pins[5]; uint8_t nPins = bus->getPins(pins); for (int i = 0; i < nPins; i++) ins_pin.add(pins[i]); - ins[F("order")] = bus->getColorOrder(); - ins["rev"] = bus->isReversed(); - ins[F("skip")] = bus->skippedLeds(); - ins["type"] = bus->getType() & 0x7F; - ins["ref"] = bus->isOffRefreshRequired(); - ins[F("rgbwm")] = bus->getAutoWhiteMode(); - ins[F("freq")] = bus->getFrequency(); + ins[F("order")] = bus->getColorOrder(); + ins["rev"] = bus->isReversed(); + ins[F("skip")] = bus->skippedLeds(); + ins["type"] = bus->getType() & 0x7F; + ins["ref"] = bus->isOffRefreshRequired(); + ins[F("rgbwm")] = bus->getAutoWhiteMode(); + ins[F("freq")] = bus->getFrequency(); ins[F("maxpwr")] = bus->getMaxCurrent(); - ins[F("ledma")] = bus->getLEDCurrent(); + ins[F("ledma")] = bus->getLEDCurrent(); } JsonArray hw_com = hw.createNestedArray(F("com")); diff --git a/wled00/xml.cpp b/wled00/xml.cpp index b53958c4f..a31b13072 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -292,8 +292,8 @@ void getSettingsJS(byte subPage, Print& settingsScript) unsigned sumMa = 0; for (int s = 0; s < BusManager::getNumBusses(); s++) { - Bus* bus = BusManager::getBus(s); - if (bus == nullptr) continue; + const Bus *bus = BusManager::getBus(s); + if (!bus || !bus->isOk()) break; // should not happen but for safety int offset = s < 10 ? 48 : 55; char lp[4] = "L0"; lp[2] = offset+s; lp[3] = 0; //ascii 0-9 //strip data pin char lc[4] = "LC"; lc[2] = offset+s; lc[3] = 0; //strip length @@ -312,7 +312,7 @@ void getSettingsJS(byte subPage, Print& settingsScript) uint8_t pins[5]; int nPins = bus->getPins(pins); for (int i = 0; i < nPins; i++) { - lp[1] = offset+i; + lp[1] = '0'+i; if (PinManager::isPinOk(pins[i]) || bus->isVirtual()) printSetFormValue(settingsScript,lp,pins[i]); } printSetFormValue(settingsScript,lc,bus->getLength()); From 70042db2dea8ff7a1b4b00430b250a60c30f3ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Wed, 22 Jan 2025 20:33:56 +0100 Subject: [PATCH 053/109] Allow "unlimited" virtual buses - added config upload options - number of buses it limited to 36 (0-9+A-Z identifiers) - WRNING web server may not support that many variables --- wled00/cfg.cpp | 22 +++------- wled00/const.h | 24 ++++++----- wled00/data/settings_leds.htm | 76 ++++++++++++++++++++++++----------- wled00/set.cpp | 4 +- wled00/xml.cpp | 2 +- 5 files changed, 75 insertions(+), 53 deletions(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 0d3165e0e..3e8782a99 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -192,7 +192,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { #endif for (JsonObject elm : ins) { - if (s >= WLED_MAX_BUSSES+WLED_MIN_VIRTUAL_BUSSES) break; + if (s >= WLED_MAX_BUSSES) break; uint8_t pins[5] = {255, 255, 255, 255, 255}; JsonArray pinArr = elm["pin"]; if (pinArr.size() == 0) continue; @@ -220,21 +220,11 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { maMax = 0; } ledType |= refresh << 7; // hack bit 7 to indicate strip requires off refresh - if (fromFS) { - BusConfig bc = BusConfig(ledType, pins, start, length, colorOrder, reversed, skipFirst, AWmode, freqkHz, useGlobalLedBuffer, maPerLed, maMax); - if (useParallel && s < 8) { - // if for some unexplained reason the above pre-calculation was wrong, update - unsigned memT = BusManager::memUsage(bc); // includes x8 memory allocation for parallel I2S - if (memT > mem) mem = memT; // if we have unequal LED count use the largest - } else - mem += BusManager::memUsage(bc); // includes global buffer - if (mem <= MAX_LED_MEMORY) if (BusManager::add(bc) == -1) break; // finalization will be done in WLED::beginStrip() - } else { - if (busConfigs[s] != nullptr) delete busConfigs[s]; - busConfigs[s] = new BusConfig(ledType, pins, start, length, colorOrder, reversed, skipFirst, AWmode, freqkHz, useGlobalLedBuffer, maPerLed, maMax); - doInitBusses = true; // finalization done in beginStrip() - } - s++; + + //busConfigs.push_back(std::move(BusConfig(ledType, pins, start, length, colorOrder, reversed, skipFirst, AWmode, freqkHz, useGlobalLedBuffer, maPerLed, maMax))); + busConfigs.emplace_back(ledType, pins, start, length, colorOrder, reversed, skipFirst, AWmode, freqkHz, useGlobalLedBuffer, maPerLed, maMax); + doInitBusses = true; // finalization done in beginStrip() + if (!Bus::isVirtual(ledType)) s++; // have as many virtual buses as you want } DEBUG_PRINTF_P(PSTR("LED buffer size: %uB\n"), mem); DEBUG_PRINTF_P(PSTR("Heap after buses: %d\n"), ESP.getFreeHeap()); diff --git a/wled00/const.h b/wled00/const.h index 1ebcb9397..0f0fc4f99 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -49,31 +49,31 @@ #define WLED_MAX_DIGITAL_CHANNELS 3 #define WLED_MAX_ANALOG_CHANNELS 5 #define WLED_MAX_BUSSES 4 // will allow 3 digital & 1 analog RGB - #define WLED_MIN_VIRTUAL_BUSSES 2 + #define WLED_MIN_VIRTUAL_BUSSES 3 // no longer used for bus creation but used to distinguish S2/S3 in UI #else #define WLED_MAX_ANALOG_CHANNELS (LEDC_CHANNEL_MAX*LEDC_SPEED_MODE_MAX) #if defined(CONFIG_IDF_TARGET_ESP32C3) // 2 RMT, 6 LEDC, only has 1 I2S but NPB does not support it ATM #define WLED_MAX_BUSSES 6 // will allow 2 digital & 2 analog RGB or 6 PWM white #define WLED_MAX_DIGITAL_CHANNELS 2 //#define WLED_MAX_ANALOG_CHANNELS 6 - #define WLED_MIN_VIRTUAL_BUSSES 3 + #define WLED_MIN_VIRTUAL_BUSSES 4 // no longer used for bus creation but used to distinguish S2/S3 in UI #elif defined(CONFIG_IDF_TARGET_ESP32S2) // 4 RMT, 8 LEDC, only has 1 I2S bus, supported in NPB // the 5th bus (I2S) will prevent Audioreactive usermod from functioning (it is last used though) #define WLED_MAX_BUSSES 7 // will allow 5 digital & 2 analog RGB #define WLED_MAX_DIGITAL_CHANNELS 5 //#define WLED_MAX_ANALOG_CHANNELS 8 - #define WLED_MIN_VIRTUAL_BUSSES 3 - #elif defined(CONFIG_IDF_TARGET_ESP32S3) // 4 RMT, 8 LEDC, has 2 I2S but NPB does not support them ATM - #define WLED_MAX_BUSSES 6 // will allow 4 digital & 2 analog RGB - #define WLED_MAX_DIGITAL_CHANNELS 4 + #define WLED_MIN_VIRTUAL_BUSSES 4 // no longer used for bus creation but used to distinguish S2/S3 in UI + #elif defined(CONFIG_IDF_TARGET_ESP32S3) // 4 RMT, 8 LEDC, has 2 I2S but NPB supports parallel x8 LCD on I2S1 + #define WLED_MAX_BUSSES 14 // will allow 12 digital & 2 analog RGB + #define WLED_MAX_DIGITAL_CHANNELS 12 // x4 RMT + x8 I2S-LCD //#define WLED_MAX_ANALOG_CHANNELS 8 - #define WLED_MIN_VIRTUAL_BUSSES 4 + #define WLED_MIN_VIRTUAL_BUSSES 6 // no longer used for bus creation but used to distinguish S2/S3 in UI #else // the last digital bus (I2S0) will prevent Audioreactive usermod from functioning #define WLED_MAX_BUSSES 20 // will allow 17 digital & 3 analog RGB #define WLED_MAX_DIGITAL_CHANNELS 17 //#define WLED_MAX_ANALOG_CHANNELS 16 - #define WLED_MIN_VIRTUAL_BUSSES 4 + #define WLED_MIN_VIRTUAL_BUSSES 6 // no longer used for bus creation but used to distinguish S2/S3 in UI #endif #endif #else @@ -87,7 +87,7 @@ #ifndef WLED_MAX_DIGITAL_CHANNELS #error You must also define WLED_MAX_DIGITAL_CHANNELS. #endif - #define WLED_MIN_VIRTUAL_BUSSES (5-WLED_MAX_BUSSES) + #define WLED_MIN_VIRTUAL_BUSSES 3 #else #if WLED_MAX_BUSSES > 20 #error Maximum number of buses is 20. @@ -98,7 +98,11 @@ #ifndef WLED_MAX_DIGITAL_CHANNELS #error You must also define WLED_MAX_DIGITAL_CHANNELS. #endif - #define WLED_MIN_VIRTUAL_BUSSES (20-WLED_MAX_BUSSES) + #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) + #define WLED_MIN_VIRTUAL_BUSSES 4 + #else + #define WLED_MIN_VIRTUAL_BUSSES 6 + #endif #endif #endif diff --git a/wled00/data/settings_leds.htm b/wled00/data/settings_leds.htm index 02ebb6ed0..87e76e9b6 100644 --- a/wled00/data/settings_leds.htm +++ b/wled00/data/settings_leds.htm @@ -42,10 +42,10 @@ if (loc) d.Sf.action = getURL('/settings/leds'); } function bLimits(b,v,p,m,l,o=5,d=2,a=6) { - oMaxB = maxB = b; // maxB - max buses (can be changed if using ESP32 parallel I2S) - maxD = d; // maxD - max digital channels (can be changed if using ESP32 parallel I2S) - maxA = a; // maxA - max analog channels - maxV = v; // maxV - min virtual buses + oMaxB = maxB = b; // maxB - max buses (can be changed if using ESP32 parallel I2S): 20 - ESP32, 14 - S3/S2, 6 - C3, 4 - 8266 + maxD = d; // maxD - max digital channels (can be changed if using ESP32 parallel I2S): 17 - ESP32, 12 - S3/S2, 2 - C3, 3 - 8266 + maxA = a; // maxA - max analog channels: 16 - ESP32, 8 - S3/S2, 6 - C3, 5 - 8266 + maxV = v; // maxV - min virtual buses: 6 - ESP32/S3, 4 - S2/C3, 3 - ESP8266 (only used to distinguish S2/S3) maxPB = p; // maxPB - max LEDs per bus maxM = m; // maxM - max LED memory maxL = l; // maxL - max LEDs (will serve to determine ESP >1664 == ESP32) @@ -350,6 +350,18 @@ else LC.style.color = d.ro_gpio.some((e)=>e==parseInt(LC.value)) ? "orange" : "#fff"; } }); + const S2 = (oMaxB == 14) && (maxV == 4); + const S3 = (oMaxB == 14) && (maxV == 6); + if (oMaxB == 19 || S2 || S3) { // TODO: crude ESP32 & S2/S3 detection + if (maxLC > 300 || dC <= 2) { + d.Sf["PR"].checked = false; + gId("prl").classList.add("hide"); + } else + gId("prl").classList.remove("hide"); + // S2 supports mono I2S as well as parallel so we need to take that into account; S3 only supports parallel + maxD = (S2 || S3 ? 4 : 8) + (d.Sf["PR"].checked ? 8 : S2); // TODO: use bLimits() : 4/8RMT + (x1/x8 parallel) I2S1 + maxB = oMaxB - (d.Sf["PR"].checked ? 0 : 7 + S3); // S2 (maxV==4) does support mono I2S + } // distribute ABL current if not using PPL enPPL(sDI); @@ -409,8 +421,8 @@ if (isVir(t)) virtB++; }); - if ((n==1 && i>=maxB+maxV) || (n==-1 && i==0)) return; - var s = String.fromCharCode((i<10?48:55)+i); + if ((n==1 && i>=36) || (n==-1 && i==0)) return; // used to be i>=maxB+maxV when virtual buses were limited (now :"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") + var s = chrID(i); if (n==1) { // npm run build has trouble minimizing spaces inside string @@ -484,7 +496,7 @@ mA/LED: function receivedText(e) { let lines = e.target.result; - var c = JSON.parse(lines); + let c = JSON.parse(lines); if (c.hw) { if (c.hw.led) { - for (var i=0; i<10; i++) addLEDs(-1); - var l = c.hw.led; + // remove all existing outputs + for (const i=0; i<36; i++) addLEDs(-1); // was i{ addLEDs(1); for (var j=0; j>4) & 0x0F; + d.getElementsByName("SP"+i)[0].value = v.freq; + d.getElementsByName("LA"+i)[0].value = v.ledma; + d.getElementsByName("MA"+i)[0].value = v.maxpwr; }); + d.getElementsByName("PR")[0].checked = l.prl | 0; + d.getElementsByName("LD")[0].checked = l.ld; + d.getElementsByName("MA")[0].value = l.maxpwr; + d.getElementsByName("ABL")[0].checked = l.maxpwr > 0; } if(c.hw.com) { resetCOM(); @@ -626,22 +648,28 @@ Swap: or a video demo . -## Adding Dependencies - -I2Cdev and MPU6050 must be installed. - -To install them, add electroniccats/MPU6050@1.0.1 to lib_deps in the platformio.ini file. - -For example: - -``` -lib_deps = - FastLED@3.3.2 - NeoPixelBus@2.5.7 - ESPAsyncTCP@1.2.0 - ESPAsyncUDP@697c75a025 - AsyncTCP@1.0.3 - Esp Async WebServer@1.2.0 - IRremoteESP8266@2.7.3 - electroniccats/MPU6050@1.0.1 -``` - ## Wiring The connections needed to the MPU6050 are as follows: @@ -74,18 +54,13 @@ to the info object ## Usermod installation -1. Copy the file `usermod_mpu6050_imu.h` to the `wled00` directory. -2. Register the usermod by adding `#include "usermod_mpu6050_imu.h"` in the top and `registerUsermod(new MPU6050Driver());` in the bottom of `usermods_list.cpp`. +Add `mpu6050_imu` to `custom_usermods` in your platformio_override.ini. -Example **usermods_list.cpp**: +Example **platformio_override.ini**: -```cpp -#include "wled.h" - -#include "usermod_mpu6050_imu.h" - -void registerUsermods() -{ - UsermodManager::add(new MPU6050Driver()); -} +```ini +[env:usermod_mpu6050_imu_esp32dev] +extends = env:esp32dev +custom_usermods = ${env:esp32dev.custom_usermods} + mpu6050_imu ``` diff --git a/usermods/multi_relay/readme.md b/usermods/multi_relay/readme.md index eaa069ae7..543809d8c 100644 --- a/usermods/multi_relay/readme.md +++ b/usermods/multi_relay/readme.md @@ -41,9 +41,7 @@ When a relay is switched, a message is published: ## Usermod installation -1. Register the usermod by adding `#include "../usermods/multi_relay/usermod_multi_relay.h"` at the top and `UsermodManager::add(new MultiRelay());` at the bottom of `usermods_list.cpp`. -or -2. Use `#define USERMOD_MULTI_RELAY` in wled.h or `-D USERMOD_MULTI_RELAY` in your platformio.ini +Add `multi_relay` to the `custom_usermods` of your platformio.ini environment. You can override the default maximum number of relays (which is 4) by defining MULTI_RELAY_MAX_RELAYS. @@ -65,38 +63,6 @@ The following definitions should be a list of values (maximum number of entries ``` These can be set via your `platformio_override.ini` file or as `#define` in your `my_config.h` (remember to set `WLED_USE_MY_CONFIG` in your `platformio_override.ini`) -Example **usermods_list.cpp**: - -```cpp -#include "wled.h" -/* - * Register your v2 usermods here! - * (for v1 usermods using just usermod.cpp, you can ignore this file) - */ - -/* - * Add/uncomment your usermod filename here (and once more below) - * || || || - * \/ \/ \/ - */ -//#include "usermod_v2_example.h" -//#include "usermod_temperature.h" -#include "../usermods/usermod_multi_relay.h" - -void registerUsermods() -{ - /* - * Add your usermod class name here - * || || || - * \/ \/ \/ - */ - //UsermodManager::add(new MyExampleUsermod()); - //UsermodManager::add(new UsermodTemperature()); - UsermodManager::add(new MultiRelay()); - -} -``` - ## Configuration Usermod can be configured via the Usermods settings page. From 7a40ef74c6f721258ff200208ff0bab1724e32df Mon Sep 17 00:00:00 2001 From: Will Miles Date: Fri, 31 Jan 2025 23:59:37 +0000 Subject: [PATCH 062/109] Fix up PWM_fan Use a custom setup script to check for the dependencies and pass along the required compile flags to the module; also split the object definitions for the target modules from their source so as to allow #including them. --- usermods/PWM_fan/PWM_fan.cpp | 10 +- usermods/PWM_fan/library.json | 6 ++ usermods/PWM_fan/library.json.disabled | 3 - usermods/PWM_fan/readme.md | 4 +- usermods/PWM_fan/setup_deps.py | 12 +++ usermods/Temperature/Temperature.cpp | 107 +----------------- usermods/Temperature/UsermodTemperature.h | 108 +++++++++++++++++++ usermods/Temperature/platformio_override.ini | 1 - usermods/sht/ShtUsermod.h | 71 ++++++++++++ usermods/sht/library.json | 6 ++ usermods/sht/library.json.disabled | 3 - usermods/sht/readme.md | 13 +-- usermods/sht/sht.cpp | 71 +----------- 13 files changed, 220 insertions(+), 195 deletions(-) create mode 100644 usermods/PWM_fan/library.json delete mode 100644 usermods/PWM_fan/library.json.disabled create mode 100644 usermods/PWM_fan/setup_deps.py create mode 100644 usermods/Temperature/UsermodTemperature.h create mode 100644 usermods/sht/ShtUsermod.h create mode 100644 usermods/sht/library.json delete mode 100644 usermods/sht/library.json.disabled diff --git a/usermods/PWM_fan/PWM_fan.cpp b/usermods/PWM_fan/PWM_fan.cpp index a89a1f323..a0939f085 100644 --- a/usermods/PWM_fan/PWM_fan.cpp +++ b/usermods/PWM_fan/PWM_fan.cpp @@ -1,8 +1,14 @@ -#if !defined(USERMOD_DALLASTEMPERATURE) && !defined(USERMOD_SHT) +#include "wled.h" + +#if defined(USERMOD_DALLASTEMPERATURE) +#include "UsermodTemperature.h" +#elif defined(USERMOD_SHT) +#include "ShtUsermod.h" +#else #error The "PWM fan" usermod requires "Dallas Temeprature" or "SHT" usermod to function properly. #endif -#include "wled.h" + // PWM & tacho code curtesy of @KlausMu // https://github.com/KlausMu/esp32-fan-controller/tree/main/src diff --git a/usermods/PWM_fan/library.json b/usermods/PWM_fan/library.json new file mode 100644 index 000000000..a0e53b21f --- /dev/null +++ b/usermods/PWM_fan/library.json @@ -0,0 +1,6 @@ +{ + "name:": "PWM_fan", + "build": { + "extraScript": "setup_deps.py" + } +} \ No newline at end of file diff --git a/usermods/PWM_fan/library.json.disabled b/usermods/PWM_fan/library.json.disabled deleted file mode 100644 index 904d77236..000000000 --- a/usermods/PWM_fan/library.json.disabled +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name:": "PWM_fan" -} \ No newline at end of file diff --git a/usermods/PWM_fan/readme.md b/usermods/PWM_fan/readme.md index 6a44acf3b..9fecaabf2 100644 --- a/usermods/PWM_fan/readme.md +++ b/usermods/PWM_fan/readme.md @@ -11,8 +11,8 @@ If the _tachometer_ is supported, the current speed (in RPM) will be displayed o ## Installation -Add the compile-time option `-D USERMOD_PWM_FAN` to your `platformio.ini` (or `platformio_override.ini`) or use `#define USERMOD_PWM_FAN` in `myconfig.h`. -You will also need `-D USERMOD_DALLASTEMPERATURE`. +Add the `PWM_fan` to `custom_usermods` in your `platformio.ini` (or `platformio_override.ini`) +You will also need `Temperature` or `sht`. ### Define Your Options diff --git a/usermods/PWM_fan/setup_deps.py b/usermods/PWM_fan/setup_deps.py new file mode 100644 index 000000000..dd29e464e --- /dev/null +++ b/usermods/PWM_fan/setup_deps.py @@ -0,0 +1,12 @@ +Import('env') + + +usermods = env.GetProjectOption("custom_usermods","").split(" ") +# Check for dependencies +if "Temperature" in usermods: + env.Append(CPPDEFINES=[("USERMOD_DALLASTEMPERATURE")]) +elif "sht" in usermods: + env.Append(CPPDEFINES=[("USERMOD_SHT")]) +else: + raise RuntimeError("PWM_fan usermod requires Temperature or sht to be enabled") + diff --git a/usermods/Temperature/Temperature.cpp b/usermods/Temperature/Temperature.cpp index 8c925eb15..a2e0ea91d 100644 --- a/usermods/Temperature/Temperature.cpp +++ b/usermods/Temperature/Temperature.cpp @@ -1,112 +1,7 @@ -#include "wled.h" -#include "OneWire.h" - -//Pin defaults for QuinLed Dig-Uno if not overriden -#ifndef TEMPERATURE_PIN - #ifdef ARDUINO_ARCH_ESP32 - #define TEMPERATURE_PIN 18 - #else //ESP8266 boards - #define TEMPERATURE_PIN 14 - #endif -#endif - -// the frequency to check temperature, 1 minute -#ifndef USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL -#define USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL 60000 -#endif +#include "UsermodTemperature.h" static uint16_t mode_temperature(); -class UsermodTemperature : public Usermod { - - private: - - bool initDone = false; - OneWire *oneWire; - // GPIO pin used for sensor (with a default compile-time fallback) - int8_t temperaturePin = TEMPERATURE_PIN; - // measurement unit (true==°C, false==°F) - bool degC = true; - // using parasite power on the sensor - bool parasite = false; - int8_t parasitePin = -1; - // how often do we read from sensor? - unsigned long readingInterval = USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL; - // set last reading as "40 sec before boot", so first reading is taken after 20 sec - unsigned long lastMeasurement = UINT32_MAX - USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL; - // last time requestTemperatures was called - // used to determine when we can read the sensors temperature - // we have to wait at least 93.75 ms after requestTemperatures() is called - unsigned long lastTemperaturesRequest; - float temperature; - // indicates requestTemperatures has been called but the sensor measurement is not complete - bool waitingForConversion = false; - // flag set at startup if DS18B20 sensor not found, avoids trying to keep getting - // temperature if flashed to a board without a sensor attached - byte sensorFound; - - bool enabled = true; - - bool HApublished = false; - int16_t idx = -1; // Domoticz virtual sensor idx - - // strings to reduce flash memory usage (used more than twice) - static const char _name[]; - static const char _enabled[]; - static const char _readInterval[]; - static const char _parasite[]; - static const char _parasitePin[]; - static const char _domoticzIDX[]; - static const char _sensor[]; - static const char _temperature[]; - static const char _Temperature[]; - static const char _data_fx[]; - - //Dallas sensor quick (& dirty) reading. Credit to - Author: Peter Scargill, August 17th, 2013 - float readDallas(); - void requestTemperatures(); - void readTemperature(); - bool findSensor(); -#ifndef WLED_DISABLE_MQTT - void publishHomeAssistantAutodiscovery(); -#endif - - static UsermodTemperature* _instance; // to overcome nonstatic getTemperatureC() method and avoid UsermodManager::lookup(USERMOD_ID_TEMPERATURE); - - public: - - UsermodTemperature() { _instance = this; } - static UsermodTemperature *getInstance() { return UsermodTemperature::_instance; } - - /* - * API calls te enable data exchange between WLED modules - */ - inline float getTemperatureC() { return temperature; } - inline float getTemperatureF() { return temperature * 1.8f + 32.0f; } - float getTemperature(); - const char *getTemperatureUnit(); - uint16_t getId() override { return USERMOD_ID_TEMPERATURE; } - - void setup() override; - void loop() override; - //void connected() override; -#ifndef WLED_DISABLE_MQTT - void onMqttConnect(bool sessionPresent) override; -#endif - //void onUpdateBegin(bool init) override; - - //bool handleButton(uint8_t b) override; - //void handleOverlayDraw() override; - - void addToJsonInfo(JsonObject& root) override; - //void addToJsonState(JsonObject &root) override; - //void readFromJsonState(JsonObject &root) override; - void addToConfig(JsonObject &root) override; - bool readFromConfig(JsonObject &root) override; - - void appendConfigData() override; -}; - //Dallas sensor quick (& dirty) reading. Credit to - Author: Peter Scargill, August 17th, 2013 float UsermodTemperature::readDallas() { byte data[9]; diff --git a/usermods/Temperature/UsermodTemperature.h b/usermods/Temperature/UsermodTemperature.h new file mode 100644 index 000000000..2517a2b81 --- /dev/null +++ b/usermods/Temperature/UsermodTemperature.h @@ -0,0 +1,108 @@ +#pragma once +#include "wled.h" +#include "OneWire.h" + +//Pin defaults for QuinLed Dig-Uno if not overriden +#ifndef TEMPERATURE_PIN + #ifdef ARDUINO_ARCH_ESP32 + #define TEMPERATURE_PIN 18 + #else //ESP8266 boards + #define TEMPERATURE_PIN 14 + #endif +#endif + +// the frequency to check temperature, 1 minute +#ifndef USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL +#define USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL 60000 +#endif + +class UsermodTemperature : public Usermod { + + private: + + bool initDone = false; + OneWire *oneWire; + // GPIO pin used for sensor (with a default compile-time fallback) + int8_t temperaturePin = TEMPERATURE_PIN; + // measurement unit (true==°C, false==°F) + bool degC = true; + // using parasite power on the sensor + bool parasite = false; + int8_t parasitePin = -1; + // how often do we read from sensor? + unsigned long readingInterval = USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL; + // set last reading as "40 sec before boot", so first reading is taken after 20 sec + unsigned long lastMeasurement = UINT32_MAX - USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL; + // last time requestTemperatures was called + // used to determine when we can read the sensors temperature + // we have to wait at least 93.75 ms after requestTemperatures() is called + unsigned long lastTemperaturesRequest; + float temperature; + // indicates requestTemperatures has been called but the sensor measurement is not complete + bool waitingForConversion = false; + // flag set at startup if DS18B20 sensor not found, avoids trying to keep getting + // temperature if flashed to a board without a sensor attached + byte sensorFound; + + bool enabled = true; + + bool HApublished = false; + int16_t idx = -1; // Domoticz virtual sensor idx + + // strings to reduce flash memory usage (used more than twice) + static const char _name[]; + static const char _enabled[]; + static const char _readInterval[]; + static const char _parasite[]; + static const char _parasitePin[]; + static const char _domoticzIDX[]; + static const char _sensor[]; + static const char _temperature[]; + static const char _Temperature[]; + static const char _data_fx[]; + + //Dallas sensor quick (& dirty) reading. Credit to - Author: Peter Scargill, August 17th, 2013 + float readDallas(); + void requestTemperatures(); + void readTemperature(); + bool findSensor(); +#ifndef WLED_DISABLE_MQTT + void publishHomeAssistantAutodiscovery(); +#endif + + static UsermodTemperature* _instance; // to overcome nonstatic getTemperatureC() method and avoid UsermodManager::lookup(USERMOD_ID_TEMPERATURE); + + public: + + UsermodTemperature() { _instance = this; } + static UsermodTemperature *getInstance() { return UsermodTemperature::_instance; } + + /* + * API calls te enable data exchange between WLED modules + */ + inline float getTemperatureC() { return temperature; } + inline float getTemperatureF() { return temperature * 1.8f + 32.0f; } + float getTemperature(); + const char *getTemperatureUnit(); + uint16_t getId() override { return USERMOD_ID_TEMPERATURE; } + + void setup() override; + void loop() override; + //void connected() override; +#ifndef WLED_DISABLE_MQTT + void onMqttConnect(bool sessionPresent) override; +#endif + //void onUpdateBegin(bool init) override; + + //bool handleButton(uint8_t b) override; + //void handleOverlayDraw() override; + + void addToJsonInfo(JsonObject& root) override; + //void addToJsonState(JsonObject &root) override; + //void readFromJsonState(JsonObject &root) override; + void addToConfig(JsonObject &root) override; + bool readFromConfig(JsonObject &root) override; + + void appendConfigData() override; +}; + diff --git a/usermods/Temperature/platformio_override.ini b/usermods/Temperature/platformio_override.ini index ed35b7d49..a53b5974d 100644 --- a/usermods/Temperature/platformio_override.ini +++ b/usermods/Temperature/platformio_override.ini @@ -1,6 +1,5 @@ ; Options ; ------- -; USERMOD_DALLASTEMPERATURE - define this to have this user mod included wled00\usermods_list.cpp ; USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds ; diff --git a/usermods/sht/ShtUsermod.h b/usermods/sht/ShtUsermod.h new file mode 100644 index 000000000..5dd83f46d --- /dev/null +++ b/usermods/sht/ShtUsermod.h @@ -0,0 +1,71 @@ +#pragma once +#include "wled.h" + +#ifdef WLED_DISABLE_MQTT +#error "This user mod requires MQTT to be enabled." +#endif + +#define USERMOD_SHT_TYPE_SHT30 0 +#define USERMOD_SHT_TYPE_SHT31 1 +#define USERMOD_SHT_TYPE_SHT35 2 +#define USERMOD_SHT_TYPE_SHT85 3 + +class SHT; + +class ShtUsermod : public Usermod +{ + private: + bool enabled = false; // Is usermod enabled or not + bool firstRunDone = false; // Remembers if the first config load run had been done + bool initDone = false; // Remembers if the mod has been completely initialised + bool haMqttDiscovery = false; // Is MQTT discovery enabled or not + bool haMqttDiscoveryDone = false; // Remembers if we already published the HA discovery topics + + // SHT vars + SHT *shtTempHumidSensor = nullptr; // Instance of SHT lib + byte shtType = 0; // SHT sensor type to be used. Default: SHT30 + byte unitOfTemp = 0; // Temperature unit to be used. Default: Celsius (0 = Celsius, 1 = Fahrenheit) + bool shtInitDone = false; // Remembers if SHT sensor has been initialised + bool shtReadDataSuccess = false; // Did we have a successful data read and is a valid temperature and humidity available? + const byte shtI2cAddress = 0x44; // i2c address of the sensor. 0x44 is the default for all SHT sensors. Change this, if needed + unsigned long shtLastTimeUpdated = 0; // Remembers when we read data the last time + bool shtDataRequested = false; // Reading data is done async. This remembers if we asked the sensor to read data + float shtCurrentTempC = 0.0f; // Last read temperature in Celsius + float shtCurrentHumidity = 0.0f; // Last read humidity in RH% + + + void initShtTempHumiditySensor(); + void cleanupShtTempHumiditySensor(); + void cleanup(); + inline bool isShtReady() { return shtInitDone; } // Checks if the SHT sensor has been initialised. + + void publishTemperatureAndHumidityViaMqtt(); + void publishHomeAssistantAutodiscovery(); + void appendDeviceToMqttDiscoveryMessage(JsonDocument& root); + + public: + // Strings to reduce flash memory usage (used more than twice) + static const char _name[]; + static const char _enabled[]; + static const char _shtType[]; + static const char _unitOfTemp[]; + static const char _haMqttDiscovery[]; + + void setup(); + void loop(); + void onMqttConnect(bool sessionPresent); + void appendConfigData(); + void addToConfig(JsonObject &root); + bool readFromConfig(JsonObject &root); + void addToJsonInfo(JsonObject& root); + + bool isEnabled() { return enabled; } + + float getTemperature(); + float getTemperatureC() { return roundf(shtCurrentTempC * 10.0f) / 10.0f; } + float getTemperatureF() { return (getTemperatureC() * 1.8f) + 32.0f; } + float getHumidity() { return roundf(shtCurrentHumidity * 10.0f) / 10.0f; } + const char* getUnitString(); + + uint16_t getId() { return USERMOD_ID_SHT; } +}; diff --git a/usermods/sht/library.json b/usermods/sht/library.json new file mode 100644 index 000000000..fc62941a3 --- /dev/null +++ b/usermods/sht/library.json @@ -0,0 +1,6 @@ +{ + "name:": "sht", + "dependencies": { + "robtillaart/SHT85": "~0.3.3" + } +} \ No newline at end of file diff --git a/usermods/sht/library.json.disabled b/usermods/sht/library.json.disabled deleted file mode 100644 index 330093bda..000000000 --- a/usermods/sht/library.json.disabled +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name:": "sht" -} \ No newline at end of file diff --git a/usermods/sht/readme.md b/usermods/sht/readme.md index 0337805b3..c2cc5a1f8 100644 --- a/usermods/sht/readme.md +++ b/usermods/sht/readme.md @@ -5,26 +5,21 @@ Usermod to support various SHT i2c sensors like the SHT30, SHT31, SHT35 and SHT8 * "SHT85" by Rob Tillaart, v0.2 or higher: https://github.com/RobTillaart/SHT85 ## Usermod installation -Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one, add the buildflag `-D USERMOD_SHT` and the below library dependencies. + +Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one, add the custom_usermod `sht`. ESP32: ``` [env:custom_esp32dev_usermod_sht] extends = env:esp32dev -build_flags = ${common.build_flags_esp32} - -D USERMOD_SHT -lib_deps = ${esp32.lib_deps} - robtillaart/SHT85@~0.3.3 +custom_usermods = ${env:esp32dev.custom_usermods} sht ``` ESP8266: ``` [env:custom_d1_mini_usermod_sht] extends = env:d1_mini -build_flags = ${common.build_flags_esp8266} - -D USERMOD_SHT -lib_deps = ${esp8266.lib_deps} - robtillaart/SHT85@~0.3.3 +custom_usermods = ${env:d1_mini.custom_usermods} sht ``` ## MQTT Discovery for Home Assistant diff --git a/usermods/sht/sht.cpp b/usermods/sht/sht.cpp index 6a0e1ec45..e1eb9e885 100644 --- a/usermods/sht/sht.cpp +++ b/usermods/sht/sht.cpp @@ -1,73 +1,6 @@ -#include "wled.h" +#include "ShtUsermod.h" #include "SHT85.h" -#ifdef WLED_DISABLE_MQTT -#error "This user mod requires MQTT to be enabled." -#endif - -#define USERMOD_SHT_TYPE_SHT30 0 -#define USERMOD_SHT_TYPE_SHT31 1 -#define USERMOD_SHT_TYPE_SHT35 2 -#define USERMOD_SHT_TYPE_SHT85 3 - -class ShtUsermod : public Usermod -{ - private: - bool enabled = false; // Is usermod enabled or not - bool firstRunDone = false; // Remembers if the first config load run had been done - bool initDone = false; // Remembers if the mod has been completely initialised - bool haMqttDiscovery = false; // Is MQTT discovery enabled or not - bool haMqttDiscoveryDone = false; // Remembers if we already published the HA discovery topics - - // SHT vars - SHT *shtTempHumidSensor = nullptr; // Instance of SHT lib - byte shtType = 0; // SHT sensor type to be used. Default: SHT30 - byte unitOfTemp = 0; // Temperature unit to be used. Default: Celsius (0 = Celsius, 1 = Fahrenheit) - bool shtInitDone = false; // Remembers if SHT sensor has been initialised - bool shtReadDataSuccess = false; // Did we have a successful data read and is a valid temperature and humidity available? - const byte shtI2cAddress = 0x44; // i2c address of the sensor. 0x44 is the default for all SHT sensors. Change this, if needed - unsigned long shtLastTimeUpdated = 0; // Remembers when we read data the last time - bool shtDataRequested = false; // Reading data is done async. This remembers if we asked the sensor to read data - float shtCurrentTempC = 0.0f; // Last read temperature in Celsius - float shtCurrentHumidity = 0.0f; // Last read humidity in RH% - - - void initShtTempHumiditySensor(); - void cleanupShtTempHumiditySensor(); - void cleanup(); - inline bool isShtReady() { return shtInitDone; } // Checks if the SHT sensor has been initialised. - - void publishTemperatureAndHumidityViaMqtt(); - void publishHomeAssistantAutodiscovery(); - void appendDeviceToMqttDiscoveryMessage(JsonDocument& root); - - public: - // Strings to reduce flash memory usage (used more than twice) - static const char _name[]; - static const char _enabled[]; - static const char _shtType[]; - static const char _unitOfTemp[]; - static const char _haMqttDiscovery[]; - - void setup(); - void loop(); - void onMqttConnect(bool sessionPresent); - void appendConfigData(); - void addToConfig(JsonObject &root); - bool readFromConfig(JsonObject &root); - void addToJsonInfo(JsonObject& root); - - bool isEnabled() { return enabled; } - - float getTemperature(); - float getTemperatureC() { return roundf(shtCurrentTempC * 10.0f) / 10.0f; } - float getTemperatureF() { return (getTemperatureC() * 1.8f) + 32.0f; } - float getHumidity() { return roundf(shtCurrentHumidity * 10.0f) / 10.0f; } - const char* getUnitString(); - - uint16_t getId() { return USERMOD_ID_SHT; } -}; - // Strings to reduce flash memory usage (used more than twice) const char ShtUsermod::_name[] PROGMEM = "SHT-Sensor"; const char ShtUsermod::_enabled[] PROGMEM = "Enabled"; @@ -479,4 +412,4 @@ const char* ShtUsermod::getUnitString() { } static ShtUsermod sht; -REGISTER_USERMOD(sht); \ No newline at end of file +REGISTER_USERMOD(sht); From 1db3359b84ce25129729bbcf35ed5425e9bb12c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sat, 1 Feb 2025 12:04:24 +0100 Subject: [PATCH 063/109] Replace unsigned with size_t --- wled00/bus_manager.cpp | 18 +++++++++--------- wled00/bus_manager.h | 41 ++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index f7661c226..69cc63bed 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -384,13 +384,13 @@ uint32_t IRAM_ATTR BusDigital::getPixelColor(unsigned pix) const { } } -unsigned BusDigital::getPins(uint8_t* pinArray) const { +size_t BusDigital::getPins(uint8_t* pinArray) const { unsigned numPins = is2Pin(_type) + 1; if (pinArray) for (unsigned i = 0; i < numPins; i++) pinArray[i] = _pins[i]; return numPins; } -unsigned BusDigital::getBusSize() const { +size_t BusDigital::getBusSize() const { return sizeof(BusDigital) + (isOk() ? PolyBus::getDataSize(_busPtr, _iType) + (_data ? _len * getNumberOfChannels() : 0) : 0); } @@ -573,7 +573,7 @@ uint32_t BusPwm::getPixelColor(unsigned pix) const { void BusPwm::show() { if (!_valid) return; - const unsigned numPins = getPins(); + const size_t numPins = getPins(); #ifdef ESP8266 const unsigned analogPeriod = F_CPU / _frequency; const unsigned maxBri = analogPeriod; // compute to clock cycle accuracy @@ -640,7 +640,7 @@ void BusPwm::show() { } } -unsigned BusPwm::getPins(uint8_t* pinArray) const { +size_t BusPwm::getPins(uint8_t* pinArray) const { if (!_valid) return 0; unsigned numPins = numPWMPins(_type); if (pinArray) for (unsigned i = 0; i < numPins; i++) pinArray[i] = _pins[i]; @@ -660,7 +660,7 @@ std::vector BusPwm::getLEDTypes() { } void BusPwm::deallocatePins() { - unsigned numPins = getPins(); + size_t numPins = getPins(); for (unsigned i = 0; i < numPins; i++) { PinManager::deallocatePin(_pins[i], PinOwner::BusPwm); if (!PinManager::isPinOk(_pins[i])) continue; @@ -716,7 +716,7 @@ void BusOnOff::show() { digitalWrite(_pin, _reversed ? !(bool)_data[0] : (bool)_data[0]); } -unsigned BusOnOff::getPins(uint8_t* pinArray) const { +size_t BusOnOff::getPins(uint8_t* pinArray) const { if (!_valid) return 0; if (pinArray) pinArray[0] = _pin; return 1; @@ -780,7 +780,7 @@ void BusNetwork::show() { _broadcastLock = false; } -unsigned BusNetwork::getPins(uint8_t* pinArray) const { +size_t BusNetwork::getPins(uint8_t* pinArray) const { if (pinArray) for (unsigned i = 0; i < 4; i++) pinArray[i] = _client[i]; return 4; } @@ -808,7 +808,7 @@ void BusNetwork::cleanup() { //utility to get the approx. memory usage of a given BusConfig -unsigned BusConfig::memUsage(unsigned nr) const { +size_t BusConfig::memUsage(unsigned nr) const { if (Bus::isVirtual(type)) { return sizeof(BusNetwork) + (count * Bus::getNumberOfChannels(type)); } else if (Bus::isDigital(type)) { @@ -821,7 +821,7 @@ unsigned BusConfig::memUsage(unsigned nr) const { } -unsigned BusManager::memUsage() { +size_t BusManager::memUsage() { // when ESP32, S2 & S3 use parallel I2S only the largest bus determines the total memory requirements for back buffers // front buffers are always allocated per bus unsigned size = 0; diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 74dfd4cff..65724003b 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -10,7 +10,6 @@ #include "pin_manager.h" #include #include -#include #if __cplusplus >= 201402L using std::make_unique; @@ -103,7 +102,7 @@ class Bus { virtual void setBrightness(uint8_t b) { _bri = b; }; virtual void setColorOrder(uint8_t co) {} virtual uint32_t getPixelColor(unsigned pix) const { return 0; } - virtual unsigned getPins(uint8_t* pinArray = nullptr) const { return 0; } + virtual size_t getPins(uint8_t* pinArray = nullptr) const { return 0; } virtual uint16_t getLength() const { return isOk() ? _len : 0; } virtual uint8_t getColorOrder() const { return COL_ORDER_RGB; } virtual unsigned skippedLeds() const { return 0; } @@ -111,7 +110,7 @@ class Bus { virtual uint16_t getLEDCurrent() const { return 0; } virtual uint16_t getUsedCurrent() const { return 0; } virtual uint16_t getMaxCurrent() const { return 0; } - virtual unsigned getBusSize() const { return sizeof(Bus); } + virtual size_t getBusSize() const { return sizeof(Bus); } inline bool hasRGB() const { return _hasRgb; } inline bool hasWhite() const { return _hasWhite; } @@ -127,7 +126,7 @@ class Bus { inline void setStart(uint16_t start) { _start = start; } inline void setAutoWhiteMode(uint8_t m) { if (m < 5) _autoWhiteMode = m; } inline uint8_t getAutoWhiteMode() const { return _autoWhiteMode; } - inline unsigned getNumberOfChannels() const { return hasWhite() + 3*hasRGB() + hasCCT(); } + inline size_t getNumberOfChannels() const { return hasWhite() + 3*hasRGB() + hasCCT(); } inline uint16_t getStart() const { return _start; } inline uint8_t getType() const { return _type; } inline bool isOk() const { return _valid; } @@ -136,8 +135,8 @@ class Bus { inline bool containsPixel(uint16_t pix) const { return pix >= _start && pix < _start + _len; } static inline std::vector getLEDTypes() { return {{TYPE_NONE, "", PSTR("None")}}; } // not used. just for reference for derived classes - static constexpr unsigned getNumberOfPins(uint8_t type) { return isVirtual(type) ? 4 : isPWM(type) ? numPWMPins(type) : is2Pin(type) + 1; } // credit @PaoloTK - static constexpr unsigned getNumberOfChannels(uint8_t type) { return hasWhite(type) + 3*hasRGB(type) + hasCCT(type); } + static constexpr size_t getNumberOfPins(uint8_t type) { return isVirtual(type) ? 4 : isPWM(type) ? numPWMPins(type) : is2Pin(type) + 1; } // credit @PaoloTK + static constexpr size_t getNumberOfChannels(uint8_t type) { return hasWhite(type) + 3*hasRGB(type) + hasCCT(type); } static constexpr bool hasRGB(uint8_t type) { return !((type >= TYPE_WS2812_1CH && type <= TYPE_WS2812_WWA) || type == TYPE_ANALOG_1CH || type == TYPE_ANALOG_2CH || type == TYPE_ONOFF); } @@ -225,13 +224,13 @@ class BusDigital : public Bus { void setColorOrder(uint8_t colorOrder) override; [[gnu::hot]] uint32_t getPixelColor(unsigned pix) const override; uint8_t getColorOrder() const override { return _colorOrder; } - unsigned getPins(uint8_t* pinArray = nullptr) const override; + size_t getPins(uint8_t* pinArray = nullptr) const override; unsigned skippedLeds() const override { return _skip; } uint16_t getFrequency() const override { return _frequencykHz; } uint16_t getLEDCurrent() const override { return _milliAmpsPerLed; } uint16_t getUsedCurrent() const override { return _milliAmpsTotal; } uint16_t getMaxCurrent() const override { return _milliAmpsMax; } - unsigned getBusSize() const override; + size_t getBusSize() const override; void begin() override; void cleanup(); @@ -271,9 +270,9 @@ class BusPwm : public Bus { void setPixelColor(unsigned pix, uint32_t c) override; uint32_t getPixelColor(unsigned pix) const override; //does no index check - unsigned getPins(uint8_t* pinArray = nullptr) const override; + size_t getPins(uint8_t* pinArray = nullptr) const override; uint16_t getFrequency() const override { return _frequency; } - unsigned getBusSize() const override { return sizeof(BusPwm); } + size_t getBusSize() const override { return sizeof(BusPwm); } void show() override; inline void cleanup() { deallocatePins(); _data = nullptr; } @@ -299,8 +298,8 @@ class BusOnOff : public Bus { void setPixelColor(unsigned pix, uint32_t c) override; uint32_t getPixelColor(unsigned pix) const override; - unsigned getPins(uint8_t* pinArray) const override; - unsigned getBusSize() const override { return sizeof(BusOnOff); } + size_t getPins(uint8_t* pinArray) const override; + size_t getBusSize() const override { return sizeof(BusOnOff); } void show() override; inline void cleanup() { PinManager::deallocatePin(_pin, PinOwner::BusOnOff); _data = nullptr; } @@ -320,10 +319,10 @@ class BusNetwork : public Bus { bool canShow() const override { return !_broadcastLock; } // this should be a return value from UDP routine if it is still sending data out [[gnu::hot]] void setPixelColor(unsigned pix, uint32_t c) override; [[gnu::hot]] uint32_t getPixelColor(unsigned pix) const override; - unsigned getPins(uint8_t* pinArray = nullptr) const override; - unsigned getBusSize() const override { return sizeof(BusNetwork) + (isOk() ? _len * _UDPchannels : 0); } - void show() override; - void cleanup(); + size_t getPins(uint8_t* pinArray = nullptr) const override; + size_t getBusSize() const override { return sizeof(BusNetwork) + (isOk() ? _len * _UDPchannels : 0); } + void show() override; + void cleanup(); static std::vector getLEDTypes(); @@ -381,7 +380,7 @@ struct BusConfig { return true; } - unsigned memUsage(unsigned nr = 0) const; + size_t memUsage(unsigned nr = 0) const; }; @@ -405,13 +404,13 @@ namespace BusManager { #ifdef ESP32_DATA_IDLE_HIGH void esp32RMTInvertIdle() ; #endif - inline uint8_t getNumVirtualBusses() { - int j = 0; + inline size_t getNumVirtualBusses() { + size_t j = 0; for (const auto &bus : busses) j += bus->isVirtual(); return j; } - unsigned memUsage(); + size_t memUsage(); inline uint16_t currentMilliamps() { return _gMilliAmpsUsed + MA_FOR_ESP; } //inline uint16_t ablMilliampsMax() { unsigned sum = 0; for (auto &bus : busses) sum += bus->getMaxCurrent(); return sum; } inline uint16_t ablMilliampsMax() { return _gMilliAmpsMax; } // used for compatibility reasons (and enabling virtual global ABL) @@ -438,7 +437,7 @@ namespace BusManager { void setSegmentCCT(int16_t cct, bool allowWBCorrection = false); inline int16_t getSegmentCCT() { return Bus::getCCT(); } inline Bus* getBus(size_t busNr) { return busNr < busses.size() ? busses[busNr].get() : nullptr; } - inline uint8_t getNumBusses() { return busses.size(); } + inline size_t getNumBusses() { return busses.size(); } //semi-duplicate of strip.getLengthTotal() (though that just returns strip._length, calculated in finalizeInit()) inline uint16_t getTotalLength(bool onlyPhysical = false) { From d56ded8c18a5f46a4e9e9067a1b50b58fd5b07e5 Mon Sep 17 00:00:00 2001 From: Woody <27882680+w00000dy@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:52:31 +0100 Subject: [PATCH 064/109] npm update --- package-lock.json | 32 ++++++++++++++++---------------- package.json | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index a7beb9c40..4630280d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,14 +11,14 @@ "dependencies": { "clean-css": "^5.3.3", "html-minifier-terser": "^7.2.0", - "nodemon": "^3.1.7", + "nodemon": "^3.1.9", "web-resource-inliner": "^7.0.0" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -215,9 +215,9 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -549,9 +549,9 @@ } }, "node_modules/nodemon": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz", - "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", + "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", "license": "MIT", "dependencies": { "chokidar": "^3.5.2", @@ -645,9 +645,9 @@ } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -700,9 +700,9 @@ } }, "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", + "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", diff --git a/package.json b/package.json index eb05066ea..78bd4036c 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,6 @@ "clean-css": "^5.3.3", "html-minifier-terser": "^7.2.0", "web-resource-inliner": "^7.0.0", - "nodemon": "^3.1.7" + "nodemon": "^3.1.9" } } From 58962f84707e53f3d87e8bd66343d0cf73997adc Mon Sep 17 00:00:00 2001 From: Woody <27882680+w00000dy@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:56:06 +0100 Subject: [PATCH 065/109] npm update --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ebc6a995..b5e14158d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wled", - "version": "0.16.0-dev", + "version": "0.16.0-alpha", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "wled", - "version": "0.16.0-dev", + "version": "0.16.0-alpha", "license": "ISC", "dependencies": { "clean-css": "^5.3.3", From 2eff6b7a3a202638ac96b33121cea8b5ee3b1fd9 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Mon, 3 Feb 2025 17:57:09 +0000 Subject: [PATCH 066/109] usermod/sensors_to_mqtt: Add explicit dep This mod includes a header from the Adafruit Unified Sensor library inherited by its target sensor libraries. This isn't reliably picked up by PlatformIO's dependency finder. Add an explicit dep to ensure build stability. --- usermods/sensors_to_mqtt/library.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usermods/sensors_to_mqtt/library.json b/usermods/sensors_to_mqtt/library.json index 731f57b2b..d38c794e4 100644 --- a/usermods/sensors_to_mqtt/library.json +++ b/usermods/sensors_to_mqtt/library.json @@ -4,6 +4,7 @@ "dependencies": { "adafruit/Adafruit BMP280 Library":"2.6.8", "adafruit/Adafruit CCS811 Library":"1.1.3", - "adafruit/Adafruit Si7021 Library":"1.5.3" + "adafruit/Adafruit Si7021 Library":"1.5.3", + "adafruit/Adafruit Unified Sensor":"^1.1.15" } } From 1688546519a4bcc130a3d1936dfe09109e576450 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Mon, 3 Feb 2025 18:48:07 +0000 Subject: [PATCH 067/109] Fix RTC usermod --- usermods/RTC/{library.json.disabled => library.json} | 0 wled00/src/dependencies/time/DS1307RTC.h | 1 + 2 files changed, 1 insertion(+) rename usermods/RTC/{library.json.disabled => library.json} (100%) diff --git a/usermods/RTC/library.json.disabled b/usermods/RTC/library.json similarity index 100% rename from usermods/RTC/library.json.disabled rename to usermods/RTC/library.json diff --git a/wled00/src/dependencies/time/DS1307RTC.h b/wled00/src/dependencies/time/DS1307RTC.h index 551ae9965..bc272701f 100644 --- a/wled00/src/dependencies/time/DS1307RTC.h +++ b/wled00/src/dependencies/time/DS1307RTC.h @@ -7,6 +7,7 @@ #define DS1307RTC_h #include "TimeLib.h" +#include "Wire.h" // library interface description class DS1307RTC From f72b5d04e8318fb43505217d6ce3d168a1a540a1 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Mon, 3 Feb 2025 19:35:12 +0000 Subject: [PATCH 068/109] usermod/pixels_dice_try: Add missing dep The "arduino-pixels-dice" library needs the ESP32 BLE subsystem, but doesn't explicitly depend on it. --- usermods/pixels_dice_tray/library.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usermods/pixels_dice_tray/library.json b/usermods/pixels_dice_tray/library.json index ce08b801f..e052fd60a 100644 --- a/usermods/pixels_dice_tray/library.json +++ b/usermods/pixels_dice_tray/library.json @@ -2,6 +2,7 @@ "name:": "pixels_dice_tray", "build": { "libArchive": false}, "dependencies": { - "arduino-pixels-dice":"https://github.com/axlan/arduino-pixels-dice.git" + "arduino-pixels-dice":"https://github.com/axlan/arduino-pixels-dice.git", + "ESP32 BLE Arduino":"*" } } From 2431f2058b14c1cbcbb0e1212e83a485a48e571e Mon Sep 17 00:00:00 2001 From: Will Miles Date: Thu, 6 Feb 2025 22:23:12 -0500 Subject: [PATCH 069/109] load_usermods: Split on any whitespace This allows the common newline syntax in platformio --- pio-scripts/load_usermods.py | 2 +- usermods/PWM_fan/setup_deps.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pio-scripts/load_usermods.py b/pio-scripts/load_usermods.py index 4ac57ba3a..ab3c6476a 100644 --- a/pio-scripts/load_usermods.py +++ b/pio-scripts/load_usermods.py @@ -35,7 +35,7 @@ if usermods: deps = env.GetProjectOption('lib_deps') src_dir = proj.get("platformio", "src_dir") src_dir = src_dir.replace('\\','/') - mod_paths = {mod: find_usermod(mod) for mod in usermods.split(" ")} + mod_paths = {mod: find_usermod(mod) for mod in usermods.split()} usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()] proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods) # Force usermods to be installed in to the environment build state before the LDF runs diff --git a/usermods/PWM_fan/setup_deps.py b/usermods/PWM_fan/setup_deps.py index dd29e464e..2f76ba857 100644 --- a/usermods/PWM_fan/setup_deps.py +++ b/usermods/PWM_fan/setup_deps.py @@ -1,7 +1,7 @@ Import('env') -usermods = env.GetProjectOption("custom_usermods","").split(" ") +usermods = env.GetProjectOption("custom_usermods","").split() # Check for dependencies if "Temperature" in usermods: env.Append(CPPDEFINES=[("USERMOD_DALLASTEMPERATURE")]) From d0b599781df00bc3ef2b6e24181116bb818361a9 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Thu, 6 Feb 2025 22:24:53 -0500 Subject: [PATCH 070/109] Fix up BME280_v2 usermod Minor compile correctness tweak --- usermods/BME280_v2/BME280_v2.cpp | 10 +++++----- usermods/BME280_v2/README.md | 11 ++--------- .../BME280_v2/{library.json.disabled => library.json} | 0 3 files changed, 7 insertions(+), 14 deletions(-) rename usermods/BME280_v2/{library.json.disabled => library.json} (100%) diff --git a/usermods/BME280_v2/BME280_v2.cpp b/usermods/BME280_v2/BME280_v2.cpp index 05aeca55a..dd5859044 100644 --- a/usermods/BME280_v2/BME280_v2.cpp +++ b/usermods/BME280_v2/BME280_v2.cpp @@ -239,7 +239,7 @@ public: // from the UI and values read from sensor, then publish to broker if (temperature != lastTemperature || PublishAlways) { - publishMqtt("temperature", String(temperature, TemperatureDecimals).c_str()); + publishMqtt("temperature", String(temperature, (unsigned) TemperatureDecimals).c_str()); } lastTemperature = temperature; // Update last sensor temperature for next loop @@ -252,17 +252,17 @@ public: if (humidity != lastHumidity || PublishAlways) { - publishMqtt("humidity", String(humidity, HumidityDecimals).c_str()); + publishMqtt("humidity", String(humidity, (unsigned) HumidityDecimals).c_str()); } if (heatIndex != lastHeatIndex || PublishAlways) { - publishMqtt("heat_index", String(heatIndex, TemperatureDecimals).c_str()); + publishMqtt("heat_index", String(heatIndex, (unsigned) TemperatureDecimals).c_str()); } if (dewPoint != lastDewPoint || PublishAlways) { - publishMqtt("dew_point", String(dewPoint, TemperatureDecimals).c_str()); + publishMqtt("dew_point", String(dewPoint, (unsigned) TemperatureDecimals).c_str()); } lastHumidity = humidity; @@ -279,7 +279,7 @@ public: if (pressure != lastPressure || PublishAlways) { - publishMqtt("pressure", String(pressure, PressureDecimals).c_str()); + publishMqtt("pressure", String(pressure, (unsigned) PressureDecimals).c_str()); } lastPressure = pressure; diff --git a/usermods/BME280_v2/README.md b/usermods/BME280_v2/README.md index a4fc229a3..0daea5825 100644 --- a/usermods/BME280_v2/README.md +++ b/usermods/BME280_v2/README.md @@ -22,7 +22,6 @@ Dependencies - Libraries - `BME280@~3.0.0` (by [finitespace](https://github.com/finitespace/BME280)) - `Wire` - - These must be added under `lib_deps` in your `platform.ini` (or `platform_override.ini`). - Data is published over MQTT - make sure you've enabled the MQTT sync interface. - This usermod also writes to serial (GPIO1 on ESP8266). Please make sure nothing else is listening to the serial TX pin or your board will get confused by log messages! @@ -40,17 +39,11 @@ Methods also exist to read the read/calculated values from other WLED modules th # Compiling -To enable, compile with `USERMOD_BME280` defined (e.g. in `platformio_override.ini`) +To enable, add `BME280_v2` to your `custom_usermods` (e.g. in `platformio_override.ini`) ```ini [env:usermod_bme280_d1_mini] extends = env:d1_mini -build_flags = - ${common.build_flags_esp8266} - -D USERMOD_BME280 -lib_deps = - ${esp8266.lib_deps} - BME280@~3.0.0 - Wire +custom_usermods = ${env:d1_mini.custom_usermods} BME280_v2 ``` diff --git a/usermods/BME280_v2/library.json.disabled b/usermods/BME280_v2/library.json similarity index 100% rename from usermods/BME280_v2/library.json.disabled rename to usermods/BME280_v2/library.json From e6910f732f645512425ded8dfd2d757ea9082c14 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Thu, 6 Feb 2025 22:25:39 -0500 Subject: [PATCH 071/109] Disable EleksTube_IPS usermod For some reason, building it seems to consume 300kb of SRAM?? Probably there's still something wrong with the configuration. --- usermods/EleksTube_IPS/{library.json => library.json.disabled} | 1 + 1 file changed, 1 insertion(+) rename usermods/EleksTube_IPS/{library.json => library.json.disabled} (63%) diff --git a/usermods/EleksTube_IPS/library.json b/usermods/EleksTube_IPS/library.json.disabled similarity index 63% rename from usermods/EleksTube_IPS/library.json rename to usermods/EleksTube_IPS/library.json.disabled index 2cd1de6ff..eddd12b88 100644 --- a/usermods/EleksTube_IPS/library.json +++ b/usermods/EleksTube_IPS/library.json.disabled @@ -4,3 +4,4 @@ "TFT_eSPI" : "2.5.33" } } +# Seems to add 300kb to the RAM requirement??? From c57be770397c3d974b54e8bb8974af361a41c403 Mon Sep 17 00:00:00 2001 From: Will Miles Date: Thu, 6 Feb 2025 22:26:45 -0500 Subject: [PATCH 072/109] Fix sensor usermod globals These can be static locals instead; allows these usermods to build and link together. --- usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp | 2 +- usermods/Si7021_MQTT_HA/library.json | 3 ++- usermods/sensors_to_mqtt/sensors_to_mqtt.cpp | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp index 44218d596..7845658ad 100644 --- a/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp +++ b/usermods/Si7021_MQTT_HA/Si7021_MQTT_HA.cpp @@ -9,7 +9,7 @@ #error "This user mod requires MQTT to be enabled." #endif -Adafruit_Si7021 si7021; +static Adafruit_Si7021 si7021; class Si7021_MQTT_HA : public Usermod { diff --git a/usermods/Si7021_MQTT_HA/library.json b/usermods/Si7021_MQTT_HA/library.json index 7b9ac4d77..5d7aa300a 100644 --- a/usermods/Si7021_MQTT_HA/library.json +++ b/usermods/Si7021_MQTT_HA/library.json @@ -1,6 +1,7 @@ { "name:": "Si7021_MQTT_HA", "dependencies": { - "finitespace/BME280":"3.0.0" + "finitespace/BME280":"3.0.0", + "adafruit/Adafruit Si7021 Library" : "1.5.3" } } \ No newline at end of file diff --git a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp index 343fd08b6..5f7da97a9 100644 --- a/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp +++ b/usermods/sensors_to_mqtt/sensors_to_mqtt.cpp @@ -9,9 +9,9 @@ #error "This user mod requires MQTT to be enabled." #endif -Adafruit_BMP280 bmp; -Adafruit_Si7021 si7021; -Adafruit_CCS811 ccs811; +static Adafruit_BMP280 bmp; +static Adafruit_Si7021 si7021; +static Adafruit_CCS811 ccs811; class UserMod_SensorsToMQTT : public Usermod { From 078a054dbdb173f447e0c9eadb174b4898178b5d Mon Sep 17 00:00:00 2001 From: Will Miles Date: Fri, 7 Feb 2025 04:12:07 +0000 Subject: [PATCH 073/109] usermods/pixels_dice_tray: Fix BLE dependency --- usermods/pixels_dice_tray/library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermods/pixels_dice_tray/library.json b/usermods/pixels_dice_tray/library.json index e052fd60a..5043c0cfd 100644 --- a/usermods/pixels_dice_tray/library.json +++ b/usermods/pixels_dice_tray/library.json @@ -3,6 +3,6 @@ "build": { "libArchive": false}, "dependencies": { "arduino-pixels-dice":"https://github.com/axlan/arduino-pixels-dice.git", - "ESP32 BLE Arduino":"*" + "BLE":"*" } } From c43d09c8b18f02a5a9142f000b6449948c9335bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Fri, 7 Feb 2025 15:02:27 +0100 Subject: [PATCH 074/109] Move _data and allocation to derived class - as suggested by @TripleWhy - minimum length guard Conflicts: wled00/bus_manager.cpp wled00/bus_manager.h --- wled00/bus_manager.cpp | 46 ++++++++++++++++++------------------------ wled00/bus_manager.h | 34 +++++++++++++++---------------- 2 files changed, 36 insertions(+), 44 deletions(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 69cc63bed..68a58d5a4 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -91,7 +91,7 @@ void Bus::calculateCCT(uint32_t c, uint8_t &ww, uint8_t &cw) { } else { cct = (approximateKelvinFromRGB(c) - 1900) >> 5; // convert K (from RGB value) to relative format } - + //0 - linear (CCT 127 = 50% warm, 50% cold), 127 - additive CCT blending (CCT 127 = 100% warm, 100% cold) if (cct < _cctBlend) ww = 255; else ww = ((255-cct) * 255) / (255 - _cctBlend); @@ -118,16 +118,6 @@ uint32_t Bus::autoWhiteCalc(uint32_t c) const { return RGBW32(r, g, b, w); } -uint8_t *Bus::allocateData(size_t size) { - freeData(); // should not happen, but for safety - return _data = (uint8_t *)(size>0 ? calloc(size, sizeof(uint8_t)) : nullptr); -} - -void Bus::freeData() { - if (_data) free(_data); - _data = nullptr; -} - BusDigital::BusDigital(const BusConfig &bc, uint8_t nr) : Bus(bc.type, bc.start, bc.autoWhite, bc.count, bc.reversed, (bc.refreshReq || bc.type == TYPE_TM1814)) @@ -153,8 +143,10 @@ BusDigital::BusDigital(const BusConfig &bc, uint8_t nr) _hasRgb = hasRGB(bc.type); _hasWhite = hasWhite(bc.type); _hasCCT = hasCCT(bc.type); - if (bc.doubleBuffer && !allocateData(bc.count * Bus::getNumberOfChannels(bc.type))) return; - //_buffering = bc.doubleBuffer; + if (bc.doubleBuffer) { + _data = (uint8_t*)d_calloc(_len, Bus::getNumberOfChannels(_type)); + if (!_data) DEBUG_PRINTLN(F("Bus: Buffer allocation failed!")); + } uint16_t lenToCreate = bc.count; if (bc.type == TYPE_WS2812_1CH_X3) lenToCreate = NUM_ICS_WS2812_1CH_3X(bc.count); // only needs a third of "RGB" LEDs for NeoPixelBus _busPtr = PolyBus::create(_iType, _pins, lenToCreate + _skip, nr); @@ -285,7 +277,7 @@ void BusDigital::show() { } } } - PolyBus::show(_busPtr, _iType, !_data); // faster if buffer consistency is not important (use !_buffering this causes 20% FPS drop) + PolyBus::show(_busPtr, _iType, !_data); // faster if buffer consistency is not important // restore bus brightness to its original value // this is done right after show, so this is only OK if LED updates are completed before show() returns // or async show has a separate buffer (ESP32 RMT and I2S are ok) @@ -434,10 +426,11 @@ void BusDigital::begin() { void BusDigital::cleanup() { DEBUG_PRINTLN(F("Digital Cleanup.")); PolyBus::cleanup(_busPtr, _iType); + free(_data); + _data = nullptr; _iType = I_NONE; _valid = false; _busPtr = nullptr; - if (_data != nullptr) freeData(); PinManager::deallocatePin(_pins[1], PinOwner::BusDigital); PinManager::deallocatePin(_pins[0], PinOwner::BusDigital); } @@ -461,7 +454,7 @@ void BusDigital::cleanup() { #else #ifdef SOC_LEDC_TIMER_BIT_WIDE_NUM // C6/H2/P4: 20 bit, S2/S3/C2/C3: 14 bit - #define MAX_BIT_WIDTH SOC_LEDC_TIMER_BIT_WIDE_NUM + #define MAX_BIT_WIDTH SOC_LEDC_TIMER_BIT_WIDE_NUM #else // ESP32: 20 bit (but in reality we would never go beyond 16 bit as the frequency would be to low) #define MAX_BIT_WIDTH 14 @@ -509,7 +502,6 @@ BusPwm::BusPwm(const BusConfig &bc) _hasRgb = hasRGB(bc.type); _hasWhite = hasWhite(bc.type); _hasCCT = hasCCT(bc.type); - _data = _pwmdata; // avoid malloc() and use stack _valid = true; DEBUG_PRINTF_P(PSTR("%successfully inited PWM strip with type %u, frequency %u, bit depth %u and pins %u,%u,%u,%u,%u\n"), _valid?"S":"Uns", bc.type, _frequency, _depth, _pins[0], _pins[1], _pins[2], _pins[3], _pins[4]); } @@ -583,7 +575,7 @@ void BusPwm::show() { // if _needsRefresh is true (UI hack) we are using dithering (credit @dedehai & @zalatnaicsongor) // https://github.com/Aircoookie/WLED/pull/4115 and https://github.com/zalatnaicsongor/WLED/pull/1) const bool dithering = _needsRefresh; // avoid working with bitfield - const unsigned maxBri = (1<<_depth); // possible values: 16384 (14), 8192 (13), 4096 (12), 2048 (11), 1024 (10), 512 (9) and 256 (8) + const unsigned maxBri = (1<<_depth); // possible values: 16384 (14), 8192 (13), 4096 (12), 2048 (11), 1024 (10), 512 (9) and 256 (8) const unsigned bitShift = dithering * 4; // if dithering, _depth is 12 bit but LEDC channel is set to 8 bit (using 4 fractional bits) #endif // use CIE brightness formula (linear + cubic) to approximate human eye perceived brightness @@ -599,7 +591,7 @@ void BusPwm::show() { [[maybe_unused]] unsigned hPoint = 0; // phase shift (0 - maxBri) // we will be phase shifting every channel by previous pulse length (plus dead time if required) - // phase shifting is only mandatory when using H-bridge to drive reverse-polarity PWM CCT (2 wire) LED type + // phase shifting is only mandatory when using H-bridge to drive reverse-polarity PWM CCT (2 wire) LED type // CCT additive blending must be 0 (WW & CW will not overlap) otherwise signals *will* overlap // for all other cases it will just try to "spread" the load on PSU // Phase shifting requires that LEDC timers are synchronised (see setup()). For PWM CCT (and H-bridge) it is @@ -678,7 +670,7 @@ void BusPwm::deallocatePins() { BusOnOff::BusOnOff(const BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite, 1, bc.reversed) -, _onoffdata(0) +, _data(0) { if (!Bus::isOnOff(bc.type)) return; @@ -691,7 +683,6 @@ BusOnOff::BusOnOff(const BusConfig &bc) _hasRgb = false; _hasWhite = false; _hasCCT = false; - _data = &_onoffdata; // avoid malloc() and use stack _valid = true; DEBUG_PRINTF_P(PSTR("%successfully inited On/Off strip with pin %u\n"), _valid?"S":"Uns", _pin); } @@ -703,17 +694,17 @@ void BusOnOff::setPixelColor(unsigned pix, uint32_t c) { uint8_t g = G(c); uint8_t b = B(c); uint8_t w = W(c); - _data[0] = bool(r|g|b|w) && bool(_bri) ? 0xFF : 0; + _data = bool(r|g|b|w) && bool(_bri) ? 0xFF : 0; } uint32_t BusOnOff::getPixelColor(unsigned pix) const { if (!_valid) return 0; - return RGBW32(_data[0], _data[0], _data[0], _data[0]); + return RGBW32(_data, _data, _data, _data); } void BusOnOff::show() { if (!_valid) return; - digitalWrite(_pin, _reversed ? !(bool)_data[0] : (bool)_data[0]); + digitalWrite(_pin, _reversed ? !(bool)_data : (bool)_data); } size_t BusOnOff::getPins(uint8_t* pinArray) const { @@ -752,7 +743,8 @@ BusNetwork::BusNetwork(const BusConfig &bc) _hasCCT = false; _UDPchannels = _hasWhite + 3; _client = IPAddress(bc.pins[0],bc.pins[1],bc.pins[2],bc.pins[3]); - _valid = (allocateData(_len * _UDPchannels) != nullptr) && bc.count > 0; + _data = (uint8_t*)d_calloc(_len, _UDPchannels); + _valid = (_data != nullptr); DEBUG_PRINTF_P(PSTR("%successfully inited virtual strip with type %u and IP %u.%u.%u.%u\n"), _valid?"S":"Uns", bc.type, bc.pins[0], bc.pins[1], bc.pins[2], bc.pins[3]); } @@ -801,9 +793,11 @@ std::vector BusNetwork::getLEDTypes() { } void BusNetwork::cleanup() { + DEBUG_PRINTLN(F("Virtual Cleanup.")); + free(_data); + _data = nullptr; _type = I_NONE; _valid = false; - freeData(); } diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 65724003b..60b96048d 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -83,20 +83,19 @@ class Bus { : _type(type) , _bri(255) , _start(start) - , _len(len) + , _len(std::max(len,(uint16_t)1)) , _reversed(reversed) , _valid(false) , _needsRefresh(refresh) - , _data(nullptr) // keep data access consistent across all types of buses { _autoWhiteMode = Bus::hasWhite(type) ? aw : RGBW_MODE_MANUAL_ONLY; }; - virtual ~Bus() {} //throw the bus under the bus (derived class needs to freeData()) + virtual ~Bus() {} //throw the bus under the bus virtual void begin() {}; virtual void show() = 0; - virtual bool canShow() const { return true; } + virtual bool canShow() const { return true; } virtual void setStatusPixel(uint32_t c) {} virtual void setPixelColor(unsigned pix, uint32_t c) = 0; virtual void setBrightness(uint8_t b) { _bri = b; }; @@ -191,7 +190,6 @@ class Bus { bool _hasCCT;// : 1; //} __attribute__ ((packed)); uint8_t _autoWhiteMode; - uint8_t *_data; // global Auto White Calculation override static uint8_t _gAWM; // _cct has the following menaings (see calculateCCT() & BusManager::setSegmentCCT()): @@ -206,8 +204,6 @@ class Bus { static uint8_t _cctBlend; uint32_t autoWhiteCalc(uint32_t c) const; - uint8_t *allocateData(size_t size = 1); - void freeData(); }; @@ -237,14 +233,15 @@ class BusDigital : public Bus { static std::vector getLEDTypes(); private: - uint8_t _skip; - uint8_t _colorOrder; - uint8_t _pins[2]; - uint8_t _iType; + uint8_t _skip; + uint8_t _colorOrder; + uint8_t _pins[2]; + uint8_t _iType; uint16_t _frequencykHz; - uint8_t _milliAmpsPerLed; + uint8_t _milliAmpsPerLed; uint16_t _milliAmpsMax; - void * _busPtr; + uint8_t *_data; + void *_busPtr; static uint16_t _milliAmpsTotal; // is overwitten/recalculated on each show() @@ -274,13 +271,13 @@ class BusPwm : public Bus { uint16_t getFrequency() const override { return _frequency; } size_t getBusSize() const override { return sizeof(BusPwm); } void show() override; - inline void cleanup() { deallocatePins(); _data = nullptr; } + inline void cleanup() { deallocatePins(); } static std::vector getLEDTypes(); private: uint8_t _pins[OUTPUT_MAX_PINS]; - uint8_t _pwmdata[OUTPUT_MAX_PINS]; + uint8_t _data[OUTPUT_MAX_PINS]; #ifdef ARDUINO_ARCH_ESP32 uint8_t _ledcStart; #endif @@ -301,13 +298,13 @@ class BusOnOff : public Bus { size_t getPins(uint8_t* pinArray) const override; size_t getBusSize() const override { return sizeof(BusOnOff); } void show() override; - inline void cleanup() { PinManager::deallocatePin(_pin, PinOwner::BusOnOff); _data = nullptr; } + inline void cleanup() { PinManager::deallocatePin(_pin, PinOwner::BusOnOff); } static std::vector getLEDTypes(); private: uint8_t _pin; - uint8_t _onoffdata; + uint8_t _data; }; @@ -331,6 +328,7 @@ class BusNetwork : public Bus { uint8_t _UDPtype; uint8_t _UDPchannels; bool _broadcastLock; + uint8_t *_data; }; @@ -351,7 +349,7 @@ struct BusConfig { uint16_t milliAmpsMax; BusConfig(uint8_t busType, uint8_t* ppins, uint16_t pstart, uint16_t len = 1, uint8_t pcolorOrder = COL_ORDER_GRB, bool rev = false, uint8_t skip = 0, byte aw=RGBW_MODE_MANUAL_ONLY, uint16_t clock_kHz=0U, bool dblBfr=false, uint8_t maPerLed=LED_MILLIAMPS_DEFAULT, uint16_t maMax=ABL_MILLIAMPS_DEFAULT) - : count(len) + : count(std::max(len,(uint16_t)1)) , start(pstart) , colorOrder(pcolorOrder) , reversed(rev) From ed91c54654e7bd4ecf40b121a3900180836796b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sun, 9 Feb 2025 18:13:55 +0100 Subject: [PATCH 075/109] Uninitialised _data bugfix --- wled00/bus_manager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 68a58d5a4..2a7dce4f6 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -125,6 +125,7 @@ BusDigital::BusDigital(const BusConfig &bc, uint8_t nr) , _colorOrder(bc.colorOrder) , _milliAmpsPerLed(bc.milliAmpsPerLed) , _milliAmpsMax(bc.milliAmpsMax) +, _data(nullptr) { if (!isDigital(bc.type) || !bc.count) return; if (!PinManager::allocatePin(bc.pins[0], true, PinOwner::BusDigital)) return; From f3de45c6ad7f8a64788ea320212ee4ca933120db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sun, 9 Feb 2025 21:43:35 +0100 Subject: [PATCH 076/109] Remove reference to custom allocators --- wled00/bus_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 2a7dce4f6..cdb00b0b3 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -145,7 +145,7 @@ BusDigital::BusDigital(const BusConfig &bc, uint8_t nr) _hasWhite = hasWhite(bc.type); _hasCCT = hasCCT(bc.type); if (bc.doubleBuffer) { - _data = (uint8_t*)d_calloc(_len, Bus::getNumberOfChannels(_type)); + _data = (uint8_t*)calloc(_len, Bus::getNumberOfChannels(_type)); if (!_data) DEBUG_PRINTLN(F("Bus: Buffer allocation failed!")); } uint16_t lenToCreate = bc.count; @@ -744,7 +744,7 @@ BusNetwork::BusNetwork(const BusConfig &bc) _hasCCT = false; _UDPchannels = _hasWhite + 3; _client = IPAddress(bc.pins[0],bc.pins[1],bc.pins[2],bc.pins[3]); - _data = (uint8_t*)d_calloc(_len, _UDPchannels); + _data = (uint8_t*)calloc(_len, _UDPchannels); _valid = (_data != nullptr); DEBUG_PRINTF_P(PSTR("%successfully inited virtual strip with type %u and IP %u.%u.%u.%u\n"), _valid?"S":"Uns", bc.type, bc.pins[0], bc.pins[1], bc.pins[2], bc.pins[3]); } From f4e7202dd01039482e864d5a68ed9405b3762e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sun, 29 Dec 2024 19:50:08 +0100 Subject: [PATCH 077/109] UI info --- wled00/data/index.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index f3648d3b5..eeea74d4c 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -775,8 +775,8 @@ function populateSegments(s) } let segp = `
`+ - ``+ - `
`+ + ``+ + `
`+ ``+ `
`+ `
`+ @@ -814,7 +814,7 @@ function populateSegments(s) cn += `
`+ ``+ `
`+ `&#x${inst.frz ? (li.live && li.liveseg==i?'e410':'e0e8') : 'e325'};`+ @@ -1666,13 +1666,17 @@ function setEffectParameters(idx) paOnOff[0] = paOnOff[0].substring(0,dPos); } if (paOnOff.length>0 && paOnOff[0] != "!") text = paOnOff[0]; + gId("adPal").classList.remove("hide"); + if (lastinfo.cpalcount>0) gId("rmPal").classList.remove("hide"); } else { // disable palette list text += ' not used'; palw.style.display = "none"; + gId("adPal").classList.add("hide"); + gId("rmPal").classList.add("hide"); // Close palette dialog if not available - if (gId("palw").lastElementChild.tagName == "DIALOG") { - gId("palw").lastElementChild.close(); + if (palw.lastElementChild.tagName == "DIALOG") { + palw.lastElementChild.close(); } } pall.innerHTML = icon + text; @@ -1887,7 +1891,7 @@ function makeSeg() function resetUtil(off=false) { gId('segutil').innerHTML = `
` - + '' + + '' + `
Add segment
` + '
' + `` From a8cde3289ad5de00cf74f1cca726a570ce86551e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sun, 29 Dec 2024 19:52:11 +0100 Subject: [PATCH 078/109] Minor speed & size tweaks - new function fadeToSecondaryBy() --- wled00/FX.h | 1 + wled00/FX_fcn.cpp | 36 +++++++++++++++++++++++++++++------- wled00/colors.cpp | 29 ++++++++++++++++------------- 3 files changed, 46 insertions(+), 20 deletions(-) diff --git a/wled00/FX.h b/wled00/FX.h index 3544e1fa7..b334a1185 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -678,6 +678,7 @@ typedef struct Segment { void blur(uint8_t, bool smear = false); void fill(uint32_t c); void fade_out(uint8_t r); + void fadeToSecondaryBy(uint8_t fadeBy); void fadeToBlackBy(uint8_t fadeBy); inline void blendPixelColor(int n, uint32_t color, uint8_t blend) { setPixelColor(n, color_blend(getPixelColor(n), color, blend)); } inline void blendPixelColor(int n, CRGB c, uint8_t blend) { blendPixelColor(n, RGBW32(c.r,c.g,c.b,0), blend); } diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index f92b65543..1034e18dd 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -1178,6 +1178,8 @@ void Segment::fill(uint32_t c) { /* * fade out function, higher rate = quicker fade + * fading is highly dependant on frame rate (higher frame rates, faster fading) + * each frame will fade at max 9% or as little as 0.8% */ void Segment::fade_out(uint8_t rate) { if (!isActive()) return; // not active @@ -1185,7 +1187,8 @@ void Segment::fade_out(uint8_t rate) { const int rows = vHeight(); // will be 1 for 1D rate = (255-rate) >> 1; - float mappedRate = 1.0f / (float(rate) + 1.1f); + //float mappedRate = 1.0f / (float(rate) + 1.1f); // mappedRate is in (nonlinear) range ~ [0.0078,0.9091] so roughly 1% to 91% + int mappedRate = 256 / (rate + 1); uint32_t color = colors[1]; // SEGCOLOR(1); // target color int w2 = W(color); @@ -1201,10 +1204,14 @@ void Segment::fade_out(uint8_t rate) { int g1 = G(color); int b1 = B(color); - int wdelta = (w2 - w1) * mappedRate; - int rdelta = (r2 - r1) * mappedRate; - int gdelta = (g2 - g1) * mappedRate; - int bdelta = (b2 - b1) * mappedRate; + //int wdelta = (w2 - w1) * mappedRate; + //int rdelta = (r2 - r1) * mappedRate; + //int gdelta = (g2 - g1) * mappedRate; + //int bdelta = (b2 - b1) * mappedRate; + int wdelta = ((w2 - w1) * mappedRate) >> 8; + int rdelta = ((r2 - r1) * mappedRate) >> 8; + int gdelta = ((g2 - g1) * mappedRate) >> 8; + int bdelta = ((b2 - b1) * mappedRate) >> 8; // if fade isn't complete, make sure delta is at least 1 (fixes rounding issues) wdelta += (w2 == w1) ? 0 : (w2 > w1) ? 1 : -1; @@ -1212,8 +1219,23 @@ void Segment::fade_out(uint8_t rate) { gdelta += (g2 == g1) ? 0 : (g2 > g1) ? 1 : -1; bdelta += (b2 == b1) ? 0 : (b2 > b1) ? 1 : -1; - if (is2D()) setPixelColorXY(x, y, r1 + rdelta, g1 + gdelta, b1 + bdelta, w1 + wdelta); - else setPixelColor(x, r1 + rdelta, g1 + gdelta, b1 + bdelta, w1 + wdelta); + //if (is2D()) setPixelColorXY(x, y, r1 + rdelta, g1 + gdelta, b1 + bdelta, w1 + wdelta); + //else setPixelColor(x, r1 + rdelta, g1 + gdelta, b1 + bdelta, w1 + wdelta); + uint32_t newColor = RGBW32(r1 + rdelta, g1 + gdelta, b1 + bdelta, w1 + wdelta); + if (is2D()) setPixelColorXY(x, y, newColor); + else setPixelColor(x, newColor); + } +} + +// fades all pixels to secondary color +void Segment::fadeToSecondaryBy(uint8_t fadeBy) { + if (!isActive() || fadeBy == 0) return; // optimization - no scaling to apply + const int cols = is2D() ? vWidth() : vLength(); + const int rows = vHeight(); // will be 1 for 1D + + for (int y = 0; y < rows; y++) for (int x = 0; x < cols; x++) { + if (is2D()) setPixelColorXY(x, y, color_blend(getPixelColorXY(x,y), colors[1], fadeBy)); + else setPixelColor(x, color_blend(getPixelColor(x), colors[1], fadeBy)); } } diff --git a/wled00/colors.cpp b/wled00/colors.cpp index 7bfd71c29..8e28c54a2 100644 --- a/wled00/colors.cpp +++ b/wled00/colors.cpp @@ -10,12 +10,13 @@ */ uint32_t color_blend(uint32_t color1, uint32_t color2, uint8_t blend) { // min / max blend checking is omitted: calls with 0 or 255 are rare, checking lowers overall performance - uint32_t rb1 = color1 & 0x00FF00FF; - uint32_t wg1 = (color1>>8) & 0x00FF00FF; - uint32_t rb2 = color2 & 0x00FF00FF; - uint32_t wg2 = (color2>>8) & 0x00FF00FF; - uint32_t rb3 = ((((rb1 << 8) | rb2) + (rb2 * blend) - (rb1 * blend)) >> 8) & 0x00FF00FF; - uint32_t wg3 = ((((wg1 << 8) | wg2) + (wg2 * blend) - (wg1 * blend))) & 0xFF00FF00; + const uint32_t mask = 0x00FF00FF; + uint32_t rb1 = color1 & mask; + uint32_t wg1 = (color1 >> 8) & mask; + uint32_t rb2 = color2 & mask; + uint32_t wg2 = (color2 >> 8) & mask; + uint32_t rb3 = ((((rb1 << 8) | rb2) + (rb2 * blend) - (rb1 * blend)) >> 8) & mask; + uint32_t wg3 = ((((wg1 << 8) | wg2) + (wg2 * blend) - (wg1 * blend))) & mask; return rb3 | wg3; } @@ -28,8 +29,9 @@ uint32_t color_add(uint32_t c1, uint32_t c2, bool preserveCR) { if (c1 == BLACK) return c2; if (c2 == BLACK) return c1; - uint32_t rb = (c1 & 0x00FF00FF) + (c2 & 0x00FF00FF); // mask and add two colors at once - uint32_t wg = ((c1>>8) & 0x00FF00FF) + ((c2>>8) & 0x00FF00FF); + const uint32_t mask = 0x00FF00FF; + uint32_t rb = (c1 & mask) + (c2 & mask); // mask and add two colors at once + uint32_t wg = ((c1>>8) & mask) + ((c2>>8) & mask); uint32_t r = rb >> 16; // extract single color values uint32_t b = rb & 0xFFFF; uint32_t w = wg >> 16; @@ -44,9 +46,9 @@ uint32_t color_add(uint32_t c1, uint32_t c2, bool preserveCR) //max = b > max ? b : max; //max = w > max ? w : max; if (max > 255) { - uint32_t scale = (uint32_t(255)<<8) / max; // division of two 8bit (shifted) values does not work -> use bit shifts and multiplaction instead - rb = ((rb * scale) >> 8) & 0x00FF00FF; // - wg = (wg * scale) & 0xFF00FF00; + const uint32_t scale = (uint32_t(255)<<8) / max; // division of two 8bit (shifted) values does not work -> use bit shifts and multiplaction instead + rb = ((rb * scale) >> 8) & mask; // + wg = (wg * scale) & mask; } else wg = wg << 8; //shift white and green back to correct position return rb | wg; } else { @@ -77,8 +79,9 @@ uint32_t color_fade(uint32_t c1, uint8_t amount, bool video) addRemains |= B(c1) ? 0x00000001 : 0; addRemains |= W(c1) ? 0x01000000 : 0; } - uint32_t rb = (((c1 & 0x00FF00FF) * scale) >> 8) & 0x00FF00FF; // scale red and blue - uint32_t wg = (((c1 & 0xFF00FF00) >> 8) * scale) & 0xFF00FF00; // scale white and green + const uint32_t mask = 0x00FF00FF; + uint32_t rb = (((c1 & mask) * scale) >> 8) & mask; // scale red and blue + uint32_t wg = (((c1 >> 8) & mask) * scale) & (mask << 8); // scale white and green scaledcolor = (rb | wg) + addRemains; return scaledcolor; } From 7b56e53c4704c28917d85e797446d3ea205c5a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Thu, 12 Dec 2024 19:30:56 +0100 Subject: [PATCH 079/109] Nested playlist --- wled00/data/index.js | 33 +++++++++++++++++-------------- wled00/fcn_declare.h | 1 + wled00/led.cpp | 7 ++++--- wled00/playlist.cpp | 46 ++++++++++++++++++++++++++++++++------------ wled00/presets.cpp | 6 +++++- wled00/wled.cpp | 7 +++++-- 6 files changed, 68 insertions(+), 32 deletions(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index eeea74d4c..c430ed2a8 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -409,7 +409,9 @@ function pName(i) function isPlaylist(i) { - return pJson[i].playlist && pJson[i].playlist.ps; + if (isNumeric(i)) return pJson[i].playlist && pJson[i].playlist.ps; + if (isObj(i)) return i.playlist && i.playlist.ps; + return false; } function papiVal(i) @@ -1905,15 +1907,16 @@ function resetUtil(off=false) if (lSeg>2) d.querySelectorAll("#Segments .pop").forEach((e)=>{e.classList.remove("hide");}); } -function makePlSel(el, incPl=false) +function makePlSel(p, el) { var plSelContent = ""; delete pJson["0"]; // remove filler preset Object.entries(pJson).sort(cmpP).forEach((a)=>{ var n = a[1].n ? a[1].n : "Preset " + a[0]; + if (isPlaylist(a[1])) n += ' ▶'; // mark playlist if (cfg.comp.idsort) n = a[0] + ' ' + n; - if (!(!incPl && a[1].playlist && a[1].playlist.ps)) // skip playlists, sub-playlists not yet supported - plSelContent += ``; + // skip endless playlists and itself + if (!isPlaylist(a[1]) || (a[1].playlist.repeat > 0 && a[0]!=p)) plSelContent += ``; }); return plSelContent; } @@ -1938,21 +1941,23 @@ function refreshPlE(p) }); } -// p: preset ID, i: ps index +// p: preset ID, i: playlist item index function addPl(p,i) { - plJson[p].ps.splice(i+1,0,0); - plJson[p].dur.splice(i+1,0,plJson[p].dur[i]); - plJson[p].transition.splice(i+1,0,plJson[p].transition[i]); + const pl = plJson[p]; + pl.ps.splice(i+1,0,1); + pl.dur.splice(i+1,0,pl.dur[i]); + pl.transition.splice(i+1,0,pl.transition[i]); refreshPlE(p); } function delPl(p,i) { - if (plJson[p].ps.length < 2) return; - plJson[p].ps.splice(i,1); - plJson[p].dur.splice(i,1); - plJson[p].transition.splice(i,1); + const pl = plJson[p]; + if (pl.ps.length < 2) return; + pl.ps.splice(i,1); + pl.dur.splice(i,1); + pl.transition.splice(i,1); refreshPlE(p); } @@ -2017,7 +2022,7 @@ function makeP(i,pl)
`; @@ -2096,7 +2101,7 @@ function makePlEntry(p,i)
diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index cf187bacd..f8580eb77 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -325,6 +325,7 @@ void serializePlaylist(JsonObject obj); //presets.cpp const char *getPresetsFileName(bool persistent = true); +bool presetNeedsSaving(); void initPresetsFile(); void handlePresets(); bool applyPreset(byte index, byte callMode = CALL_MODE_DIRECT_CHANGE); diff --git a/wled00/led.cpp b/wled00/led.cpp index 9731da655..72c78a1af 100644 --- a/wled00/led.cpp +++ b/wled00/led.cpp @@ -112,10 +112,11 @@ void stateUpdated(byte callMode) { } } + unsigned long now = millis(); if (callMode != CALL_MODE_NO_NOTIFY && nightlightActive && (nightlightMode == NL_MODE_FADE || nightlightMode == NL_MODE_COLORFADE)) { briNlT = bri; - nightlightDelayMs -= (millis() - nightlightStartTime); - nightlightStartTime = millis(); + nightlightDelayMs -= (now - nightlightStartTime); + nightlightStartTime = now; } if (briT == 0) { if (callMode != CALL_MODE_NOTIFICATION) strip.resetTimebase(); //effect start from beginning @@ -141,7 +142,7 @@ void stateUpdated(byte callMode) { } else strip.setTransitionMode(true); // force all segments to transition mode transitionActive = true; - transitionStartTime = millis(); + transitionStartTime = now; } diff --git a/wled00/playlist.cpp b/wled00/playlist.cpp index 1908334d7..0897eddad 100644 --- a/wled00/playlist.cpp +++ b/wled00/playlist.cpp @@ -10,19 +10,19 @@ typedef struct PlaylistEntry { uint16_t tr; //Duration of the transition TO this entry (in tenths of seconds) } ple; -byte playlistRepeat = 1; //how many times to repeat the playlist (0 = infinitely) -byte playlistEndPreset = 0; //what preset to apply after playlist end (0 = stay on last preset) -byte playlistOptions = 0; //bit 0: shuffle playlist after each iteration. bits 1-7 TBD +static byte playlistRepeat = 1; //how many times to repeat the playlist (0 = infinitely) +static byte playlistEndPreset = 0; //what preset to apply after playlist end (0 = stay on last preset) +static byte playlistOptions = 0; //bit 0: shuffle playlist after each iteration. bits 1-7 TBD -PlaylistEntry *playlistEntries = nullptr; -byte playlistLen; //number of playlist entries -int8_t playlistIndex = -1; -uint16_t playlistEntryDur = 0; //duration of the current entry in tenths of seconds +static PlaylistEntry *playlistEntries = nullptr; +static byte playlistLen; //number of playlist entries +static int8_t playlistIndex = -1; +static uint16_t playlistEntryDur = 0; //duration of the current entry in tenths of seconds //values we need to keep about the parent playlist while inside sub-playlist -//int8_t parentPlaylistIndex = -1; -//byte parentPlaylistRepeat = 0; -//byte parentPlaylistPresetId = 0; //for re-loading +static int16_t parentPlaylistIndex = -1; +static byte parentPlaylistRepeat = 0; +static byte parentPlaylistPresetId = 0; //for re-loading void shufflePlaylist() { @@ -54,6 +54,12 @@ void unloadPlaylist() { int16_t loadPlaylist(JsonObject playlistObj, byte presetId) { + if (currentPlaylist > 0 && parentPlaylistPresetId > 0) return; // we are already in nested playlist, do nothing + if (currentPlaylist > 0) { + parentPlaylistIndex = playlistIndex; + parentPlaylistRepeat = playlistRepeat; + parentPlaylistPresetId = currentPlaylist; + } unloadPlaylist(); JsonArray presets = playlistObj["ps"]; @@ -117,6 +123,19 @@ int16_t loadPlaylist(JsonObject playlistObj, byte presetId) { shuffle = shuffle || playlistObj["r"]; if (shuffle) playlistOptions |= PL_OPTION_SHUFFLE; + if (parentPlaylistPresetId == 0 && parentPlaylistIndex > -1) { + // we are re-loading playlist when returning from nested playlist + playlistIndex = parentPlaylistIndex; + playlistRepeat = parentPlaylistRepeat; + parentPlaylistIndex = -1; + parentPlaylistRepeat = 0; + } else if (rep == 0) { + // endless playlist will never return to parent so erase parent information if it was called from it + parentPlaylistPresetId = 0; + parentPlaylistIndex = -1; + parentPlaylistRepeat = 0; + } + currentPlaylist = presetId; DEBUG_PRINTLN(F("Playlist loaded.")); return currentPlaylist; @@ -127,7 +146,7 @@ void handlePlaylist() { static unsigned long presetCycledTime = 0; if (currentPlaylist < 0 || playlistEntries == nullptr) return; -if (millis() - presetCycledTime > (100 * playlistEntryDur) || doAdvancePlaylist) { + if (millis() - presetCycledTime > (100 * playlistEntryDur) || doAdvancePlaylist) { presetCycledTime = millis(); if (bri == 0 || nightlightActive) return; @@ -137,7 +156,10 @@ if (millis() - presetCycledTime > (100 * playlistEntryDur) || doAdvancePlaylist) if (!playlistIndex) { if (playlistRepeat == 1) { //stop if all repetitions are done unloadPlaylist(); - if (playlistEndPreset) applyPresetFromPlaylist(playlistEndPreset); + if (parentPlaylistPresetId > 0) { + applyPresetFromPlaylist(parentPlaylistPresetId); // reload previous playlist (unfortunately asynchronous) + parentPlaylistPresetId = 0; // reset previous playlist but do not reset Index or Repeat (they will be loaded & reset in loadPlaylist()) + } else if (playlistEndPreset) applyPresetFromPlaylist(playlistEndPreset); return; } if (playlistRepeat > 1) playlistRepeat--; // decrease repeat count on each index reset if not an endless playlist diff --git a/wled00/presets.cpp b/wled00/presets.cpp index 15eed3e46..54f052637 100644 --- a/wled00/presets.cpp +++ b/wled00/presets.cpp @@ -22,6 +22,10 @@ const char *getPresetsFileName(bool persistent) { return persistent ? presets_json : tmp_json; } +bool presetNeedsSaving() { + return presetToSave; +} + static void doSaveState() { bool persist = (presetToSave < 251); @@ -269,7 +273,7 @@ void savePreset(byte index, const char* pname, JsonObject sObj) quickLoad = nullptr; } else { // store playlist - // WARNING: playlist will be loaded in json.cpp after this call and will have repeat counter increased by 1 + // WARNING: playlist will be loaded in json.cpp after this call and will have repeat counter increased by 1 it will also be randomised if selected includeBri = true; // !sObj["on"].isNull(); playlistSave = true; } diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 2a5902d1b..2cb6da411 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -109,7 +109,6 @@ void WLED::loop() if (WLED_CONNECTED && aOtaEnabled && !otaLock && correctPIN) ArduinoOTA.handle(); #endif handleNightlight(); - handlePlaylist(); yield(); #ifndef WLED_DISABLE_HUESYNC @@ -117,6 +116,10 @@ void WLED::loop() yield(); #endif + if (!presetNeedsSaving()) { + handlePlaylist(); + yield(); + } handlePresets(); yield(); @@ -553,10 +556,10 @@ void WLED::beginStrip() strip.fill(BLACK); strip.show(); } + colorUpdated(CALL_MODE_INIT); // will not send notification but will initiate transition if (bootPreset > 0) { applyPreset(bootPreset, CALL_MODE_INIT); } - colorUpdated(CALL_MODE_INIT); // will not send notification // init relay pin if (rlyPin >= 0) { From 6dfbd07e86d80e27164fd9a2e6b6ef53c265e6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Thu, 12 Dec 2024 22:08:21 +0100 Subject: [PATCH 080/109] retrun value fix --- wled00/playlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/playlist.cpp b/wled00/playlist.cpp index 0897eddad..bacfbc1a2 100644 --- a/wled00/playlist.cpp +++ b/wled00/playlist.cpp @@ -54,7 +54,7 @@ void unloadPlaylist() { int16_t loadPlaylist(JsonObject playlistObj, byte presetId) { - if (currentPlaylist > 0 && parentPlaylistPresetId > 0) return; // we are already in nested playlist, do nothing + if (currentPlaylist > 0 && parentPlaylistPresetId > 0) return -1; // we are already in nested playlist, do nothing if (currentPlaylist > 0) { parentPlaylistIndex = playlistIndex; parentPlaylistRepeat = playlistRepeat; From 7be460e8b14437102601cd5684fa5429b5b59955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sat, 7 Dec 2024 10:14:11 +0100 Subject: [PATCH 081/109] Incorrect limit fix From 05cd7d753e18a52cca012b8c58db6e7d2f2b6521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Tue, 31 Dec 2024 17:28:32 +0100 Subject: [PATCH 082/109] Bugfix for color_blend --- wled00/colors.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/colors.cpp b/wled00/colors.cpp index 8e28c54a2..f298c6584 100644 --- a/wled00/colors.cpp +++ b/wled00/colors.cpp @@ -16,7 +16,7 @@ uint32_t color_blend(uint32_t color1, uint32_t color2, uint8_t blend) { uint32_t rb2 = color2 & mask; uint32_t wg2 = (color2 >> 8) & mask; uint32_t rb3 = ((((rb1 << 8) | rb2) + (rb2 * blend) - (rb1 * blend)) >> 8) & mask; - uint32_t wg3 = ((((wg1 << 8) | wg2) + (wg2 * blend) - (wg1 * blend))) & mask; + uint32_t wg3 = ((((wg1 << 8) | wg2) + (wg2 * blend) - (wg1 * blend))) & ~mask; return rb3 | wg3; } @@ -48,7 +48,7 @@ uint32_t color_add(uint32_t c1, uint32_t c2, bool preserveCR) if (max > 255) { const uint32_t scale = (uint32_t(255)<<8) / max; // division of two 8bit (shifted) values does not work -> use bit shifts and multiplaction instead rb = ((rb * scale) >> 8) & mask; // - wg = (wg * scale) & mask; + wg = (wg * scale) & ~mask; } else wg = wg << 8; //shift white and green back to correct position return rb | wg; } else { @@ -81,7 +81,7 @@ uint32_t color_fade(uint32_t c1, uint8_t amount, bool video) } const uint32_t mask = 0x00FF00FF; uint32_t rb = (((c1 & mask) * scale) >> 8) & mask; // scale red and blue - uint32_t wg = (((c1 >> 8) & mask) * scale) & (mask << 8); // scale white and green + uint32_t wg = (((c1 >> 8) & mask) * scale) & ~mask; // scale white and green scaledcolor = (rb | wg) + addRemains; return scaledcolor; } From 409b4b1963430c88adb6610eac849846ea926c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Tue, 31 Dec 2024 17:31:34 +0100 Subject: [PATCH 083/109] Clear spaced segment - also wait for strip before updating segment --- wled00/FX.h | 1 + wled00/FX_fcn.cpp | 50 +++++++++++++++++-------- wled00/json.cpp | 95 +++++++++++++++++++++++++---------------------- 3 files changed, 86 insertions(+), 60 deletions(-) diff --git a/wled00/FX.h b/wled00/FX.h index b334a1185..1f8a315a6 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -676,6 +676,7 @@ typedef struct Segment { [[gnu::hot]] uint32_t getPixelColor(int i) const; // 1D support functions (some implement 2D as well) void blur(uint8_t, bool smear = false); + void clear(); void fill(uint32_t c); void fade_out(uint8_t r); void fadeToSecondaryBy(uint8_t fadeBy); diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 1034e18dd..e4c121198 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -270,7 +270,7 @@ void Segment::startTransition(uint16_t dur) { _t->_briT = on ? opacity : 0; _t->_cctT = cct; #ifndef WLED_DISABLE_MODE_BLEND - swapSegenv(_t->_segT); + swapSegenv(_t->_segT); // copy runtime data to temporary _t->_modeT = mode; _t->_segT._dataLenT = 0; _t->_segT._dataT = nullptr; @@ -282,6 +282,13 @@ void Segment::startTransition(uint16_t dur) { _t->_segT._dataLenT = _dataLen; } } + DEBUG_PRINTF_P(PSTR("-- pal: %d, bri: %d, C:[%08X,%08X,%08X], m: %d\n"), + (int)_t->_palTid, + (int)_t->_briT, + _t->_segT._colorT[0], + _t->_segT._colorT[1], + _t->_segT._colorT[2], + (int)_t->_modeT); #else for (size_t i=0; i_colorT[i] = colors[i]; #endif @@ -502,21 +509,17 @@ void Segment::setGeometry(uint16_t i1, uint16_t i2, uint8_t grp, uint8_t spc, ui #ifndef WLED_DISABLE_2D if (Segment::maxHeight>1) boundsUnchanged &= (startY == i1Y && stopY == i2Y); // 2D #endif + + if (stop && (spc > 0 || m12 != map1D2D)) clear(); +/* if (boundsUnchanged && (!grp || (grouping == grp && spacing == spc)) && (ofs == UINT16_MAX || ofs == offset) && (m12 == map1D2D) ) return; - +*/ stateChanged = true; // send UDP/WS broadcast - if (stop || spc != spacing || m12 != map1D2D) { - _vWidth = virtualWidth(); - _vHeight = virtualHeight(); - _vLength = virtualLength(); - _segBri = currentBri(); - fill(BLACK); // turn old segment range off or clears pixels if changing spacing (requires _vWidth/_vHeight/_vLength/_segBri) - } if (grp) { // prevent assignment of 0 grouping = grp; spacing = spc; @@ -527,10 +530,7 @@ void Segment::setGeometry(uint16_t i1, uint16_t i2, uint8_t grp, uint8_t spc, ui if (ofs < UINT16_MAX) offset = ofs; map1D2D = constrain(m12, 0, 7); - DEBUG_PRINT(F("setUp segment: ")); DEBUG_PRINT(i1); - DEBUG_PRINT(','); DEBUG_PRINT(i2); - DEBUG_PRINT(F(" -> ")); DEBUG_PRINT(i1Y); - DEBUG_PRINT(','); DEBUG_PRINTLN(i2Y); + DEBUG_PRINTF_P(PSTR("Segment geometry: %d,%d -> %d,%d\n"), (int)i1, (int)i2, (int)i1Y, (int)i2Y); markForReset(); if (boundsUnchanged) return; @@ -1159,6 +1159,26 @@ void Segment::refreshLightCapabilities() { _capabilities = capabilities; } +/* + * Fills segment with black + */ +void Segment::clear() { + if (!isActive()) return; // not active + unsigned oldVW = _vWidth; + unsigned oldVH = _vHeight; + unsigned oldVL = _vLength; + unsigned oldSB = _segBri; + _vWidth = virtualWidth(); + _vHeight = virtualHeight(); + _vLength = virtualLength(); + _segBri = currentBri(); + fill(BLACK); + _vWidth = oldVW; + _vHeight = oldVH; + _vLength = oldVL; + _segBri = oldSB; +} + /* * Fills segment with color */ @@ -1512,7 +1532,7 @@ void WS2812FX::service() { _segment_index = 0; for (segment &seg : _segments) { - if (_suspend) return; // immediately stop processing segments if suspend requested during service() + if (_suspend) break; // immediately stop processing segments if suspend requested during service() // process transition (mode changes in the middle of transition) seg.handleTransition(); @@ -1633,8 +1653,8 @@ void WS2812FX::service() { if (doShow) { yield(); Segment::handleRandomPalette(); // slowly transition random palette; move it into for loop when each segment has individual random palette - show(); _lastServiceShow = nowUp; // update timestamp, for precise FPS control + if (!_suspend) show(); } #ifdef WLED_DEBUG if ((_targetFps != FPS_UNLIMITED) && (millis() - nowUp > _frametime)) DEBUG_PRINTF_P(PSTR("Slow strip %u/%d.\n"), (unsigned)(millis()-nowUp), (int)_frametime); diff --git a/wled00/json.cpp b/wled00/json.cpp index 200307464..24988be15 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -91,14 +91,20 @@ bool deserializeSegment(JsonObject elem, byte it, byte presetId) } } - uint16_t grp = elem["grp"] | seg.grouping; - uint16_t spc = elem[F("spc")] | seg.spacing; - uint16_t of = seg.offset; - uint8_t soundSim = elem["si"] | seg.soundSim; - uint8_t map1D2D = elem["m12"] | seg.map1D2D; - uint8_t set = elem[F("set")] | seg.set; - seg.set = constrain(set, 0, 3); - seg.soundSim = constrain(soundSim, 0, 3); + uint16_t grp = elem["grp"] | seg.grouping; + uint16_t spc = elem[F("spc")] | seg.spacing; + uint16_t of = seg.offset; + uint8_t soundSim = elem["si"] | seg.soundSim; + uint8_t map1D2D = elem["m12"] | seg.map1D2D; + uint8_t set = elem[F("set")] | seg.set; + bool selected = getBoolVal(elem["sel"], seg.selected); + bool reverse = getBoolVal(elem["rev"], seg.reverse); + bool mirror = getBoolVal(elem["mi"] , seg.mirror); + #ifndef WLED_DISABLE_2D + bool reverse_y = getBoolVal(elem["rY"] , seg.reverse_y); + bool mirror_y = getBoolVal(elem["mY"] , seg.mirror_y); + bool transpose = getBoolVal(elem[F("tp")], seg.transpose); + #endif int len = (stop > start) ? stop - start : 1; int offset = elem[F("of")] | INT32_MAX; @@ -200,20 +206,16 @@ bool deserializeSegment(JsonObject elem, byte it, byte presetId) } #endif + //seg.map1D2D = constrain(map1D2D, 0, 7); // done in setGeometry() + seg.set = constrain(set, 0, 3); + seg.soundSim = constrain(soundSim, 0, 3); + seg.selected = selected; + seg.reverse = reverse; + seg.mirror = mirror; #ifndef WLED_DISABLE_2D - bool reverse = seg.reverse; - bool mirror = seg.mirror; - #endif - seg.selected = getBoolVal(elem["sel"], seg.selected); - seg.reverse = getBoolVal(elem["rev"], seg.reverse); - seg.mirror = getBoolVal(elem["mi"] , seg.mirror); - #ifndef WLED_DISABLE_2D - bool reverse_y = seg.reverse_y; - bool mirror_y = seg.mirror_y; - seg.reverse_y = getBoolVal(elem["rY"] , seg.reverse_y); - seg.mirror_y = getBoolVal(elem["mY"] , seg.mirror_y); - seg.transpose = getBoolVal(elem[F("tp")], seg.transpose); - if (seg.is2D() && seg.map1D2D == M12_pArc && (reverse != seg.reverse || reverse_y != seg.reverse_y || mirror != seg.mirror || mirror_y != seg.mirror_y)) seg.fill(BLACK); // clear entire segment (in case of Arc 1D to 2D expansion) + seg.reverse_y = reverse_y; + seg.mirror_y = mirror_y; + seg.transpose = transpose; #endif byte fx = seg.mode; @@ -392,35 +394,38 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId) int it = 0; JsonVariant segVar = root["seg"]; - if (!segVar.isNull()) strip.suspend(); - if (segVar.is()) - { - int id = segVar["id"] | -1; - //if "seg" is not an array and ID not specified, apply to all selected/checked segments - if (id < 0) { - //apply all selected segments - //bool didSet = false; - for (size_t s = 0; s < strip.getSegmentsNum(); s++) { - Segment &sg = strip.getSegment(s); - if (sg.isActive() && sg.isSelected()) { - deserializeSegment(segVar, s, presetId); - //didSet = true; + if (!segVar.isNull()) { + // we may be called during strip.service() so we must not modify segments while effects are executing + strip.suspend(); + const unsigned long start = millis(); + while (strip.isServicing() && millis() - start < strip.getFrameTime()) yield(); // wait until frame is over + #ifdef WLED_DEBUG + if (millis() - start > 0) DEBUG_PRINTLN(F("JSON: Waited for strip to finish servicing.")); + #endif + if (segVar.is()) { + int id = segVar["id"] | -1; + //if "seg" is not an array and ID not specified, apply to all selected/checked segments + if (id < 0) { + //apply all selected segments + for (size_t s = 0; s < strip.getSegmentsNum(); s++) { + Segment &sg = strip.getSegment(s); + if (sg.isActive() && sg.isSelected()) { + deserializeSegment(segVar, s, presetId); + } } + } else { + deserializeSegment(segVar, id, presetId); //apply only the segment with the specified ID } - //TODO: not sure if it is good idea to change first active but unselected segment - //if (!didSet) deserializeSegment(segVar, strip.getMainSegmentId(), presetId); } else { - deserializeSegment(segVar, id, presetId); //apply only the segment with the specified ID + size_t deleted = 0; + JsonArray segs = segVar.as(); + for (JsonObject elem : segs) { + if (deserializeSegment(elem, it++, presetId) && !elem["stop"].isNull() && elem["stop"]==0) deleted++; + } + if (strip.getSegmentsNum() > 3 && deleted >= strip.getSegmentsNum()/2U) strip.purgeSegments(); // batch deleting more than half segments } - } else { - size_t deleted = 0; - JsonArray segs = segVar.as(); - for (JsonObject elem : segs) { - if (deserializeSegment(elem, it++, presetId) && !elem["stop"].isNull() && elem["stop"]==0) deleted++; - } - if (strip.getSegmentsNum() > 3 && deleted >= strip.getSegmentsNum()/2U) strip.purgeSegments(); // batch deleting more than half segments + strip.resume(); } - strip.resume(); UsermodManager::readFromJsonState(root); From 7ce96c190fd7ed7d123c387337f40d23de698f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sat, 4 Jan 2025 14:56:50 +0100 Subject: [PATCH 084/109] Manual advance playlist --- wled00/data/index.js | 32 ++++++++++++++++++++++++++++---- wled00/playlist.cpp | 6 +++--- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index c430ed2a8..55fc86046 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -1974,6 +1974,13 @@ function pleDur(p,i,field) function pleTr(p,i,field) { + const du = gId(`pl${p}du${i}`); + const dv = parseFloat(du.value); + if (dv > 0) { + field.max = dv; + if (parseFloat(field.value) > dv) + field.value = du.value; + } if (field.validity.valid) plJson[p].transition[i] = Math.floor(field.value*10); } @@ -1993,6 +2000,17 @@ function plR(p) } } +function plM(p) +{ + const man = gId(`pl${p}manual`).checked; + plJson[p].dur.forEach((e,i)=>{ + const d = gId(`pl${p}du${i}`); + plJson[p].dur[i] = e = man ? 0 : 100; + d.value = e/10; // 10s default + d.readOnly = man; + }); +} + function makeP(i,pl) { var content = ""; @@ -2006,12 +2024,17 @@ function makeP(i,pl) r: false, end: 0 }; - var rep = plJson[i].repeat ? plJson[i].repeat : 0; + const rep = plJson[i].repeat ? plJson[i].repeat : 0; + const man = plJson[i].dur == 0; content = `
+