sm8350-common: camera: Add enabled bool for finished workarounds
Change-Id: Iede122113f17789cdf88896cb32bc30f574ec54f Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
This commit is contained in:
parent
bc536c0647
commit
d25addbc31
1 changed files with 4 additions and 4 deletions
|
|
@ -43,7 +43,7 @@ bool supportsSetTorchModeExt() {
|
|||
}
|
||||
|
||||
int32_t getTorchDefaultStrengthLevelExt() {
|
||||
return 7;
|
||||
return 50;
|
||||
}
|
||||
|
||||
int32_t getTorchMaxStrengthLevelExt() {
|
||||
|
|
@ -60,15 +60,15 @@ int32_t getTorchStrengthLevelExt() {
|
|||
return get(node, 0);
|
||||
}
|
||||
|
||||
void setTorchStrengthLevelExt(int32_t torchStrength) {
|
||||
void setTorchStrengthLevelExt(int32_t torchStrength, bool enabled) {
|
||||
set(TOGGLE_SWITCH, 0);
|
||||
auto node = kTorchLedPath + "/" + 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue