Commit d1ef9625 authored by mad's avatar mad

Fix spots finally really now

parent 53976582
......@@ -10,11 +10,13 @@ ledspot.create = function(id, identifier, address, dmx) {
spot.on = function() {
spot.buffer[6] = 255;
spot.isOn = true;
dmx.setChannels(address, spot.buffer);
}
spot.off = function() {
spot.buffer[6] = 0;
spot.isOn = false;
dmx.setChannels(address, spot.buffer);
}
spot.setColor = function(colorArray) {
......
......@@ -37,9 +37,7 @@ mqttclient.on('message', function (topic, message) {
lights_by_name["Sft"].on();
} else if ( message == "spot off" ) {
lights_by_name["Stt"].off();
// lights_by_name["Stt"].setColor([0, 0, 0]);
lights_by_name["Sft"].off();
// lights_by_name["Sft"].setColor([0, 0, 0]);
};
};
});
......@@ -113,9 +111,7 @@ io.on('connection', function(socket) {
break;
case 3:
lights_by_name["Stt"].off();
//lights_by_name["Stt"].setColor([0, 0, 0]);
lights_by_name["Sft"].off();
//lights_by_name["Sft"].setColor([0, 0, 0]);
break;
case 2:
lights_by_name["Stt"].on();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment