feat: 支持读取显示器配置。

This commit is contained in:
2023-05-07 09:56:00 +08:00
parent 800c0d3fc4
commit 3a430716d6
4 changed files with 82 additions and 12 deletions

View File

@ -14,6 +14,7 @@ pub struct DisplayState {
pub max_mode: u16,
pub min_mode: u16,
pub last_modified_at: SystemTime,
pub last_fetched_at: SystemTime,
}
impl DisplayState {
@ -22,13 +23,14 @@ impl DisplayState {
brightness: 30,
contrast: 50,
mode: 0,
last_modified_at: SystemTime::now(),
last_modified_at: SystemTime::UNIX_EPOCH,
max_brightness: 100,
min_brightness: 0,
max_contrast: 100,
min_contrast: 0,
max_mode: 15,
min_mode: 0,
last_fetched_at: SystemTime::UNIX_EPOCH,
}
}
}