Commit d1ef9625 authored by mad's avatar mad
Browse files

Fix spots finally really now

parent 53976582
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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) {
+0 −4
Original line number Diff line number Diff line
@@ -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();