cepheus: camera: add enabled bool for finished workarounds
This commit is contained in:
@@ -47,7 +47,7 @@ bool supportsSetTorchModeExt() {
|
||||
}
|
||||
|
||||
int32_t getTorchDefaultStrengthLevelExt() {
|
||||
return 7;
|
||||
return 50;
|
||||
}
|
||||
|
||||
int32_t getTorchMaxStrengthLevelExt() {
|
||||
@@ -64,17 +64,17 @@ int32_t getTorchStrengthLevelExt() {
|
||||
return get(node, 0);
|
||||
}
|
||||
|
||||
void setTorchStrengthLevelExt(int32_t torchStrength) {
|
||||
void setTorchStrengthLevelExt(int32_t torchStrength, bool enabled) {
|
||||
set(TOGGLE_SWITCH, 0);
|
||||
for (auto& path : kTorchLedPaths) {
|
||||
auto node = path + "/" + TORCH_BRIGHTNESS;
|
||||
set(node, torchStrength);
|
||||
}
|
||||
if (torchStrength > 0)
|
||||
if (enabled)
|
||||
set(TOGGLE_SWITCH, 255);
|
||||
}
|
||||
|
||||
void setTorchModeExt(bool enabled) {
|
||||
int32_t strength = getTorchDefaultStrengthLevelExt();
|
||||
setTorchStrengthLevelExt(enabled ? strength : 0);
|
||||
setTorchStrengthLevelExt(enabled ? strength : 0, enabled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user