mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
feat: HDR 休眠阈值可自定义,新增进入/退出双阈值迟滞机制
- up.sh: 比率 ≥ 进入阈值(默认 1.15)进入休眠,≤ 退出阈值(默认 1.05)恢复, hdr.flag 由时间冷却改为休眠状态标记,迟滞区间内不抖动 - WebUI: 开启 HDR 休眠后展开进入/退出阈值输入,随主配置保存 - customize.sh/config.json/README 同步新字段 hdr_enter_ratio / hdr_exit_ratio
This commit is contained in:
1 parent
7ebbfaf24b
commit
f9dd4c40d6
8 files changed
+80
-20
No files matched your search
@@ -271,6 +271,10 @@
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
.time-input-wide {
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
.time-input::-webkit-outer-spin-button,
|
||||
.time-input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
|
||||
@@ -20,6 +20,8 @@ export function useConfig() {
|
||||
// 执行策略
|
||||
const autoBriSleep = ref(false)
|
||||
const displayHdrSleep = ref(false)
|
||||
const hdrEnterRatio = ref('1.15')
|
||||
const hdrExitRatio = ref('1.05')
|
||||
const compatibilityMode = ref(false)
|
||||
const sleepMode = ref(false)
|
||||
const sleepStartH = ref('19')
|
||||
@@ -58,6 +60,8 @@ export function useConfig() {
|
||||
stepsNum,
|
||||
autoBriSleep,
|
||||
displayHdrSleep,
|
||||
hdrEnterRatio,
|
||||
hdrExitRatio,
|
||||
compatibilityMode,
|
||||
sleepMode,
|
||||
sleepStartH,
|
||||
@@ -88,6 +92,8 @@ export function useConfig() {
|
||||
logMaxSize.value = cfg.log_max_size != null ? String(cfg.log_max_size) : '500'
|
||||
autoBriSleep.value = cfg.auto_bri_sleep === 1
|
||||
displayHdrSleep.value = cfg.display_hdr_sleep === 1
|
||||
hdrEnterRatio.value = cfg.hdr_enter_ratio != null ? String(cfg.hdr_enter_ratio) : '1.15'
|
||||
hdrExitRatio.value = cfg.hdr_exit_ratio != null ? String(cfg.hdr_exit_ratio) : '1.05'
|
||||
compatibilityMode.value = cfg.compatibility_mode === 1
|
||||
nowBriFile.value = cfg.now_bri_file || DEFAULT_NOW_BRI_FILE
|
||||
sysMaxBriFile.value = cfg.max_bri_file || DEFAULT_SYS_MAX_BRI_FILE
|
||||
@@ -136,6 +142,8 @@ export function useConfig() {
|
||||
steps_num: parseInt(stepsNum.value) || 50,
|
||||
auto_bri_sleep: autoBriSleep.value ? 1 : 0,
|
||||
display_hdr_sleep: displayHdrSleep.value ? 1 : 0,
|
||||
hdr_enter_ratio: parseFloat(hdrEnterRatio.value) || 1.15,
|
||||
hdr_exit_ratio: parseFloat(hdrExitRatio.value) || 1.05,
|
||||
compatibility_mode: compatibilityMode.value ? 1 : 0,
|
||||
sleep_time: getSleepTimeStr(),
|
||||
})
|
||||
@@ -183,6 +191,8 @@ export function useConfig() {
|
||||
maxBri.value = backup.max_bri != null ? String(backup.max_bri) : ''
|
||||
autoBriSleep.value = backup.auto_bri_sleep === 1
|
||||
displayHdrSleep.value = backup.display_hdr_sleep === 1
|
||||
hdrEnterRatio.value = backup.hdr_enter_ratio != null ? String(backup.hdr_enter_ratio) : '1.15'
|
||||
hdrExitRatio.value = backup.hdr_exit_ratio != null ? String(backup.hdr_exit_ratio) : '1.05'
|
||||
compatibilityMode.value = backup.compatibility_mode === 1
|
||||
stepsNum.value = backup.steps_num != null ? String(backup.steps_num) : '50'
|
||||
logMaxSize.value = backup.log_max_size != null ? String(backup.log_max_size) : '500'
|
||||
@@ -248,6 +258,8 @@ export function useConfig() {
|
||||
logMaxSize,
|
||||
autoBriSleep,
|
||||
displayHdrSleep,
|
||||
hdrEnterRatio,
|
||||
hdrExitRatio,
|
||||
compatibilityMode,
|
||||
sleepMode,
|
||||
sleepStartH,
|
||||
|
||||
@@ -36,6 +36,8 @@ export async function runCmd(cmd) {
|
||||
log_max_size: 1024,
|
||||
auto_bri_sleep: 1,
|
||||
display_hdr_sleep: 0,
|
||||
hdr_enter_ratio: 1.15,
|
||||
hdr_exit_ratio: 1.05,
|
||||
sleep_time: '1900-0600',
|
||||
inotify_events: 'c',
|
||||
now_bri_file: '/sys/mock/brightness',
|
||||
|
||||
@@ -137,7 +137,7 @@ function handleSaveWebUI() {
|
||||
<div class="config-item">
|
||||
<div class="config-label">
|
||||
<span class="config-name">显示 HDR 内容时休眠</span>
|
||||
<span class="config-desc">HDR/SDR 比率 > 1 时不提升</span>
|
||||
<span class="config-desc">比率 ≥ 进入阈值休眠,≤ 退出阈值恢复</span>
|
||||
<span class="config-desc" style="color: var(--color-warning)"
|
||||
>出现闪屏建议改用黑名单</span
|
||||
>
|
||||
@@ -145,6 +145,35 @@ function handleSaveWebUI() {
|
||||
<Switch v-model="config.displayHdrSleep.value" />
|
||||
</div>
|
||||
|
||||
<div class="config-item-expand" :class="{ show: config.displayHdrSleep.value }">
|
||||
<div class="custom-time-picker">
|
||||
<div class="time-unit">
|
||||
<input
|
||||
type="number"
|
||||
v-model="config.hdrEnterRatio.value"
|
||||
class="time-input time-input-wide"
|
||||
min="1"
|
||||
max="5"
|
||||
step="0.01"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<span class="time-sep">进入</span>
|
||||
</div>
|
||||
<div class="time-unit">
|
||||
<input
|
||||
type="number"
|
||||
v-model="config.hdrExitRatio.value"
|
||||
class="time-input time-input-wide"
|
||||
min="1"
|
||||
max="5"
|
||||
step="0.01"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<span class="time-sep">退出</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-item">
|
||||
<div class="config-label">
|
||||
<span class="config-name">兼容模式 (轮询驱动)</span>
|
||||
|
||||
Reference in new issue
Block a user