mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-01-22 17:33:19 +01:00
feat: expose MCU Powersave toggle on rogcc
This commit is contained in:
@@ -41,6 +41,7 @@ pub fn setup_system_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
|
||||
ui.global::<SystemPageData>().set_panel_overdrive(-1);
|
||||
ui.global::<SystemPageData>().set_boot_sound(-1);
|
||||
ui.global::<SystemPageData>().set_screen_auto_brightness(-1);
|
||||
ui.global::<SystemPageData>().set_mcu_powersave(-1);
|
||||
ui.global::<SystemPageData>().set_mini_led_mode(-1);
|
||||
ui.global::<SystemPageData>().set_screenpad_brightness(-1);
|
||||
ui.global::<SystemPageData>().set_ppt_pl1_spl(MINMAX);
|
||||
@@ -673,7 +674,11 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
||||
setup_callback!(screen_auto_brightness, handle, attr, i32);
|
||||
setup_external!(screen_auto_brightness, i32, handle, attr, value)
|
||||
}
|
||||
FirmwareAttribute::McuPowersave => {}
|
||||
FirmwareAttribute::McuPowersave => {
|
||||
init_property!(mcu_powersave, handle, value, i32);
|
||||
setup_callback!(mcu_powersave, handle, attr, i32);
|
||||
setup_external!(mcu_powersave, i32, handle, attr, value)
|
||||
}
|
||||
FirmwareAttribute::PanelOverdrive => {
|
||||
init_property!(panel_overdrive, handle, value, i32);
|
||||
setup_callback!(panel_overdrive, handle, attr, i32);
|
||||
|
||||
@@ -53,6 +53,8 @@ export global SystemPageData {
|
||||
callback cb_boot_sound(int);
|
||||
in-out property <int> screen_auto_brightness;
|
||||
callback cb_screen_auto_brightness(int);
|
||||
in-out property <int> mcu_powersave;
|
||||
callback cb_mcu_powersave(int);
|
||||
in-out property <int> mini_led_mode;
|
||||
callback cb_mini_led_mode(int);
|
||||
|
||||
@@ -310,6 +312,14 @@ export component PageSystem inherits Rectangle {
|
||||
SystemPageData.cb_screen_auto_brightness(SystemPageData.screen_auto_brightness)
|
||||
}
|
||||
}
|
||||
|
||||
if SystemPageData.mcu_powersave != -1: SystemToggleInt {
|
||||
text: @tr("MCU Powersave");
|
||||
checked_int <=> SystemPageData.mcu_powersave;
|
||||
toggled => {
|
||||
SystemPageData.cb_mcu_powersave(SystemPageData.mcu_powersave)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (SystemPageData.ppt_pl1_spl.max > 0 && SystemPageData.ppt_pl1_spl.current != -1) || (SystemPageData.ppt_pl2_sppt.max > 0 && SystemPageData.ppt_pl2_sppt.current != -1) || (SystemPageData.ppt_pl3_fppt.max > 0 && SystemPageData.ppt_pl3_fppt.current != -1) || (SystemPageData.ppt_fppt.max > 0 && SystemPageData.ppt_fppt.current != -1) || (SystemPageData.ppt_apu_sppt.max > 0 && SystemPageData.ppt_apu_sppt.current != -1) || (SystemPageData.nv_temp_target.max > 0 && SystemPageData.nv_temp_target.current != -1) || (SystemPageData.nv_dynamic_boost.max > 0 && SystemPageData.nv_dynamic_boost.current != -1): HorizontalLayout {
|
||||
|
||||
Reference in New Issue
Block a user