send LED pattern as override, using OreoLED conventions
330674
def cmd_oreoled(self, args):
        ''''''
        if len(args) < 4:
            print("Usage: oreoled LEDNUM RED GREEN BLUE <RATE>")
            return
        lednum = int(args[0])
        pattern = [0] * 24
        pattern[0] = ord('R')
        pattern[1] = ord('G')
        pattern[2] = ord('B')
        pattern[3] = ord('0')
        pattern[4] = 0
        pattern[5] = int(args[1])
        pattern[6] = int(args[2])
        pattern[7] = int(args[3])
        
        self.master.mav.led_control_send(self.settings.target_system,
                                         self.settings.target_component,
                                         lednum, 255, 8, pattern)
381296
function _Overlay_sendEvent(eventName, detail) {
                    if (this._disposed) {
                        return;
                    }
                    var event = _Global.document.createEvent("CustomEvent");
                    event.initEvent(eventName, true, true, (detail || {}));
                    this._element.dispatchEvent(event);
                }
611616
def brighten(self):
        """"""
        brighten_command = StandardSend(
            self._address, COMMAND_LIGHT_BRIGHTEN_ONE_STEP_0X15_0X00)
        self._send_method(brighten_command)
814178
def _gen_packet_setcolor(self, sequence, hue, sat, bri, kel, fade):
        
        hue = min(max(hue, HUE_MIN), HUE_MAX)
        sat = min(max(sat, SATURATION_MIN), SATURATION_MAX)
        bri = min(max(bri, BRIGHTNESS_MIN), BRIGHTNESS_MAX)
        kel = min(max(kel, TEMP_MIN), TEMP_MAX)

        reserved1 = pack("<B", 0)
        hue = pack("<H", hue)
        saturation = pack("<H", sat)
        brightness = pack("<H", bri)
        kelvin = pack("<H", kel)
        duration = pack("<I", fade)

        # assemble payload
        payload = bytearray(reserved1)
        payload.extend(hue)
        payload.extend(saturation)
        payload.extend(brightness)
        payload.extend(kelvin)
        payload.extend(duration)

        return self._gen_packet(sequence, PayloadType.SETCOLOR, payload)
1116647
def change(self, fn, edge=edges.BOTH):
        """"""

        def wrapped(pin):
            fn(self.value)

        GPIO.add_event_callback(self._pin, wrapped)
482840
def set_brightness(host, did, value, token=None):
    """"""
    urllib3.disable_warnings()
    if token:
        scheme = "https"
    if not token:
        scheme = "http"
        token = "1234567890"
    url = (
            scheme + '://' + host + '/gwr/gop.php?cmd=DeviceSendCommand&data=<gip><version>1</version><token>' + token + '</token><did>' + did + '</did><value>' + str(
        value) + '</value><type>level</type></gip>&fmt=xml')
    response = requests.get(url, verify=False)
    if response.status_code == '200':
        return True
    else:
        return False
1257974
def set_led(self, state):        
        """"""
        if self.connected:            
            reports = self.device.find_output_reports()
            for report in reports:
                if self.led_usage in report:
                    report[self.led_usage] = state
                    report.send()
878047
def switch_led_off(self, ids):
        
        self._set_LED(dict(zip(ids, itertools.repeat(False))))
50577
function markUniformsLightsNeedsUpdate( uniforms, value ) {

		uniforms.ambientLightColor.needsUpdate = value;

		uniforms.directionalLights.needsUpdate = value;
		uniforms.pointLights.needsUpdate = value;
		uniforms.spotLights.needsUpdate = value;
		uniforms.rectAreaLights.needsUpdate = value;
		uniforms.hemisphereLights.needsUpdate = value;

	}
249256
def makeLEDPacket(ID, color):
	
	# pkt = [255, 255, 253, 0, ID, 11, 0, 3, 25, 0, 2 crc_l, crc_h]
	pkt = makeWritePacket(ID, xl320.XL320_LED, [color])
	return pkt
380001
def setOverlayDualAnalogTransform(self, ulOverlay, eWhich, fRadius):
        """"""

        fn = self.function_table.setOverlayDualAnalogTransform
        pvCenter = HmdVector2_t()
        result = fn(ulOverlay, eWhich, byref(pvCenter), fRadius)
        return result, pvCenter
447065
def setOverlayWidthInMeters(self, ulOverlayHandle, fWidthInMeters):
        """"""

        fn = self.function_table.setOverlayWidthInMeters
        result = fn(ulOverlayHandle, fWidthInMeters)
        return result
531921
public void setLed(LedColor color) {
        Buffer buffer = new Buffer();
        buffer.writeByte(color.red());
        buffer.writeByte(color.green());
        buffer.writeByte(color.blue());
        sendMessage(BeanMessageID.CC_LED_WRITE_ALL, buffer);
    }
141975
def set_custom_colorset(self):
        """"""
        cmd.set_color('myorange', '[253, 174, 97]')
        cmd.set_color('mygreen', '[171, 221, 164]')
        cmd.set_color('myred', '[215, 25, 28]')
        cmd.set_color('myblue', '[43, 131, 186]')
        cmd.set_color('mylightblue', '[158, 202, 225]')
        cmd.set_color('mylightgreen', '[229, 245, 224]')
776887
def setOverlayTransformTrackedDeviceComponent(self, ulOverlayHandle, unDeviceIndex, pchComponentName):
        

        fn = self.function_table.setOverlayTransformTrackedDeviceComponent
        result = fn(ulOverlayHandle, unDeviceIndex, pchComponentName)
        return result
401390
private void updateLight(float tpf) {
        if (sun != null && calendar != null) {
            hour = calendar.getHourOfDay();
            minute = calendar.getMinute();

            float xAngle = 0f;
            float yAngle = 0f;
            float zAngle = 0f;
            if (12 > hour && hour >= 6) {
                yAngle = -(hour - 6f) * (1f / 6f);
                yAngle -= minute * (1f / (6f * 60f));
                xAngle = 1f + yAngle;
                zAngle = -(0.2f + yAngle * 0.8f);
            } else if (18 > hour && hour >= 12) {
                yAngle = -(18f - hour) * (1f / 6f);
                yAngle += minute * (1f / (6f * 60f));
                xAngle = -1f - yAngle;
                zAngle = -(0.2f + yAngle * 0.8f);
            }
            sun.getDirection().set(xAngle, yAngle, zAngle);
            //System.out.println(hour+":"+minute+" -> "+sun.getDirection());
            sun.getDirection().normalizeLocal();
        }
    }
261066
def add_led(self, led):
    """"""
    self._leds.append(led)
    self._components[led.component_number] = led