Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
605816e
Plugin dummy
fxedel Apr 5, 2017
7d749d5
Merge branch 'master' into dmxcontrol3
fxedel Apr 5, 2017
fa8b4e9
Add basic fixture information
fxedel Apr 5, 2017
324f90c
Merge branch 'master' into dmxcontrol3
fxedel Apr 12, 2017
8aa4a52
Merge branch 'master' into dmxcontrol3
fxedel Apr 12, 2017
03362ee
Merge branch 'master' into dmxcontrol3
fxedel Apr 12, 2017
fab33bd
Correctly parse dimmer and colortemp functions
fxedel Apr 18, 2017
f01f5fc
Add raw function, warn unknown children, several fixes
fxedel Apr 18, 2017
7c0c2da
Added support for defaultval and steps
fxedel Apr 18, 2017
c30873d
Added 'Indigo' to available channel colors in schema
fxedel Apr 18, 2017
7300b72
Support rgb functions
fxedel Apr 18, 2017
2ed7915
Support cmy functions
fxedel Apr 18, 2017
af7f5c2
Duration channels are also of type 'Speed'
fxedel Apr 18, 2017
3959c61
Support strobe functions
fxedel Apr 18, 2017
e74e40b
Support position function (with pan and tilt)
fxedel Apr 18, 2017
84cc6dc
Merge branch 'master' into dmxcontrol3
fxedel Apr 18, 2017
292e03f
Support shutter functions and merge channels with the same dmxchannel
fxedel Apr 18, 2017
35b5b40
Fix lots of Codacy's issues
fxedel Apr 21, 2017
a55b7ef
Some more Codacy fixes
fxedel Apr 21, 2017
cfb458b
Support <const> & other fixes
fxedel Apr 21, 2017
2e0cf59
Support <rawstep> & refactor cap naming
fxedel Apr 21, 2017
4573faa
Fix mindmx/maxdmx swapping
fxedel Apr 21, 2017
2da1f1a
Support <rotation> & refactor channel type
fxedel Apr 21, 2017
647137c
Support <hsv>
fxedel Apr 21, 2017
d51aa4e
Support <fog>
fxedel Apr 21, 2017
2e47108
Support <ptspeed>
fxedel Apr 21, 2017
27e3612
Add <strobo> as alias for <strobe>
fxedel Apr 21, 2017
7be0483
Support <zoom>
fxedel Apr 21, 2017
a907c7e
Support <frost>
fxedel Apr 21, 2017
3487fcb
Support <iris>
fxedel Apr 21, 2017
50188c6
Support <focus>
fxedel Apr 21, 2017
5b2567a
Support <fan> and <switch>
fxedel Apr 22, 2017
6f97e93
Fix Codacy issue
fxedel Apr 22, 2017
c848b22
Some more Codacy issues fixed
fxedel Apr 22, 2017
51b13c1
Merge branch 'master' into dmxcontrol3
FloEdelmann Apr 22, 2017
653e1d6
Support <matrix>
fxedel Apr 22, 2017
a6a6ce5
Merge branch 'dmxcontrol3' of github.com:FloEdelmann/open-fixture-lib…
fxedel Apr 22, 2017
6a3ca97
Support <blades>
fxedel Apr 22, 2017
7b298ff
Support <colorwheel>
fxedel Apr 26, 2017
158db42
Support monochrome matrices
fxedel Apr 26, 2017
4aaa7b4
Merge branch 'master' into dmxcontrol3
fxedel Apr 29, 2017
c887513
Merge branch 'master' into dmxcontrol3
fxedel Apr 29, 2017
97d8cb9
Support <goborotation> inside of <gobowheel>
fxedel Apr 29, 2017
c7d6510
Merge branch 'master' into dmxcontrol3
fxedel Jun 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions cli-test-dmxcontrol-import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/node

const fs = require('fs');
const path = require('path');
const dmxcontrol = require(path.join(__dirname, 'plugins', 'dmxcontrol3'));
const checkFixture = require(path.join(__dirname, 'tests', 'fixture_valid')).checkFixture;

if (process.argv.length !== 3) {
return;
}

const fixturesDir = path.join(process.env.PWD, process.argv[2]);

const promises = [];
for (const file of fs.readdirSync(fixturesDir)) {
const filename = path.join(fixturesDir, file);

if (!fs.lstatSync(filename).isDirectory()) {
promises.push(
new Promise((resolve, reject) => {
fs.readFile(filename, 'utf8', (error, data) => {
if (error) {
console.error('read error', error);
process.exit(1);
return;
}
resolve(data);
});
})
.then(data => {
return new Promise((resolve, reject) => {
dmxcontrol.import(data, file, resolve, reject);
});
})
);
}
}
Promise.all(promises).then(fixtures => {
const result = {
warnings: {},
errors: {}
};
for (const fixture of fixtures) {
fixture.errors = {};

for (const fixKey in fixture.warnings) {
const checkResult = checkFixture(fixture.fixtures[fixKey]);

fixture.warnings[fixKey] = fixture.warnings[fixKey].concat(checkResult.warnings);
fixture.errors[fixKey] = checkResult.errors;

const warnings = fixture.warnings[fixKey];
if (warnings.length > 0) {
if (!(fixKey in result.warnings)) {
result.warnings[fixKey] = {};
}
result.warnings[fixKey][fixture.fixtures[fixKey].modes[0].name] = warnings;
}

const errors = fixture.errors[fixKey];
if (errors.length > 0) {
if (!(fixKey in result.errors)) {
result.errors[fixKey] = {};
}
result.errors[fixKey][fixture.fixtures[fixKey].modes[0].name] = errors;
}
}
}
console.log(JSON.stringify(result, null, 2));
}).catch(error => {
console.error(error);
});
Loading