forked from Blendman974/faceclaw
Custom auto-brightness, and fade in/out effects
This commit is contained in:
1 parent
f66e0b025f
commit
4f3ad37c20
29 files changed
+589
-93
No files matched your search
@@ -443,11 +443,15 @@ export class FaceclawCommunicatorBridge {
|
||||
await this.enqueueNativeCall(() => this.communicator.setFirmwareDebugFlagsEnabled(Boolean(enabled)));
|
||||
}
|
||||
|
||||
/** Set lens brightness: auto (ambient sensor) or an explicit 0-100 level. */
|
||||
/** Set lens brightness: Faceclaw auto or a fixed level (clamped to 2–100). */
|
||||
async setBrightness(autoAdjust: boolean, level: number): Promise<void> {
|
||||
await this.enqueueNativeCall(() => this.communicator.setBrightnessAutoAdjustBrightnessLevel(Boolean(autoAdjust), Math.round(level)));
|
||||
}
|
||||
|
||||
async configureBrightness(p: { auto: boolean; level: number; minimum: number; maximum: number; curve: string; fadeMs: number }): Promise<void> {
|
||||
await this.enqueueNativeCall(() => this.communicator.configureBrightnessAutoLevelMinimumMaximumCurveFadeMs(p.auto, p.level, p.minimum, p.maximum, p.curve, p.fadeMs));
|
||||
}
|
||||
|
||||
async enableWearDetectionAndRequestState(): Promise<void> {
|
||||
await this.enqueueNativeCall(() => this.communicator.enableWearDetectionAndRequestState());
|
||||
}
|
||||
|
||||
@@ -442,11 +442,15 @@ export class FaceclawCommunicatorBridge {
|
||||
await this.enqueueJavaCall(() => this.communicator.setFirmwareDebugFlags(Boolean(enabled)));
|
||||
}
|
||||
|
||||
/** Set lens brightness: auto (ambient sensor) or an explicit 0-100 level. */
|
||||
/** Set lens brightness: Faceclaw auto or a fixed level (clamped to 2–100). */
|
||||
async setBrightness(autoAdjust: boolean, level: number): Promise<void> {
|
||||
await this.enqueueJavaCall(() => this.communicator.setBrightness(Boolean(autoAdjust), Math.round(level)));
|
||||
}
|
||||
|
||||
async configureBrightness(p: { auto: boolean; level: number; minimum: number; maximum: number; curve: string; fadeMs: number }): Promise<void> {
|
||||
await this.enqueueJavaCall(() => this.communicator.configureBrightness(p.auto, p.level, p.minimum, p.maximum, p.curve, p.fadeMs));
|
||||
}
|
||||
|
||||
async enableWearDetectionAndRequestState(): Promise<void> {
|
||||
await this.enqueueJavaCall(() => this.communicator.enableWearDetectionAndRequestState());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user