public void TurnOnAllPads(LedIntensity intensity)
 {
     if (MidiOutPortValid())
     {
         _midiOut.SendMessage(new MidiControlChangeMessage(OutputMidiChannel, 0x00, (byte)intensity));
     }
 }
Beispiel #2
0
        public void initLedControl(bool ledOn, LedIntensity ledIntensity)
        {
            this.chbLEDControl.Checked = ledOn;
            switch (ledIntensity)
            {
                case LedIntensity.Low:
                    this.rdbLED37.Checked = true;
                    return;

                case LedIntensity.Medium:
                    this.rdbLED60.Checked = true;
                    return;

                case LedIntensity.High:
                    this.rdbLED97.Checked = true;
                    return;
            }
            this.rdbLEDoff.Checked = true;
        }
Beispiel #3
0
        private void led_SetLedControl(bool ledOn, LedIntensity ledIntensity)
        {
            byte[][] bufferArray3 = new byte[2][];
            byte[] buffer = new byte[3];
            buffer[0] = 0x11;
            buffer[1] = 0x11;
            bufferArray3[0] = buffer;
            byte[] buffer2 = new byte[2];
            buffer2[0] = 0x13;
            bufferArray3[1] = buffer2;
            byte[][] rfCommandSet = bufferArray3;
            if (ledOn)
            {
                rfCommandSet[1][1] = (byte) (rfCommandSet[1][1] | 1);
            }
            switch (ledIntensity)
            {
                case LedIntensity.Low:
                    rfCommandSet[0][2] = (byte) (rfCommandSet[0][2] | 1);
                    break;

                case LedIntensity.Medium:
                    rfCommandSet[0][2] = (byte) (rfCommandSet[0][2] | 2);
                    break;

                case LedIntensity.High:
                    rfCommandSet[0][2] = (byte) (rfCommandSet[0][2] | 3);
                    break;
            }
            byte[][] dcpPrefixCommandSet = new byte[rfCommandSet.Length][];
            for (int i = 0; i < dcpPrefixCommandSet.Length; i++)
            {
                dcpPrefixCommandSet[i] = new byte[] { 0x27, 0x70, (byte) rfCommandSet[i].Length };
            }
            TelegramContainer container = this.createSeries(Task.ExecutingCommand, rfCommandSet.Length, dcpPrefixCommandSet, rfCommandSet, new Telegram.Callback(this.processSimpleCommunicationReplyTelegram), new bool[rfCommandSet.Length]);
            for (int j = 0; j < container.Count; j++)
            {
                container[j].telegram.UserDataExt.addUserData("SentData", "> " + WDSConverters.ToHexString(container[j].telegram.data.Buf, container[j].telegram.data.Buf.Length));
            }
            this.sbProgressBar.Reset();
            this.sbProgressBar.EndPoint = container.Count;
            this.sbDeviceStatePane.Text = this.getStatusString((Task) container[0].telegram.UserDataExt.StoredUserData["Task"]);
            if (this._ioph.telegramSeriesFromMainWin(container, SeriesExecutionState.Run, true) == -1)
            {
                MessageBox.Show("Device is BUSY!");
            }
        }