Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
light_state_t Struct Reference
#include <
lights.h
>
The parameters that can be set for a given light.
Not all lights must support all parameters. If you can do something backward-compatible, you should.
Definition at line
145
of file
lights.h
.
Policy used by the framework to manage the light's brightness. Currently the values are BRIGHTNESS_MODE_USER and BRIGHTNESS_MODE_SENSOR.
Definition at line
173
of file
lights.h
.
The color of the LED in ARGB.
Do your best here.
-
If your light can only do red or green, if they ask for blue, you should do green.
-
If you can only do a brightness ramp, then use this formula: unsigned char brightness = ((77*((color>>16)&0x00ff))
-
(150*((color>>8)&0x00ff)) + (29*(color&0x00ff))) >> 8;
-
If you can only do on or off, 0 is off, anything else is on.
The high byte should be ignored. Callers will set it to 0xff (which would correspond to 255 alpha).
Definition at line
160
of file
lights.h
.
See the LIGHT_FLASH_* constants
Definition at line
165
of file
lights.h
.
The documentation for this struct was generated from the following file:
-
hardware/libhardware/include/hardware/
lights.h
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2019-10-02 (UTC).
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Benötigte Informationen nicht gefunden"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Zu umständlich/zu viele Schritte"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Nicht mehr aktuell"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Problem mit der Übersetzung"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Problem mit Beispielen/Code"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Sonstiges"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Leicht verständlich"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Mein Problem wurde gelöst"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Sonstiges"
}]