ROGCC: better handling of platform profile

This commit is contained in:
Luke Jones
2025-03-03 16:31:43 +13:00
parent f164583792
commit 192e5ccaa3
14 changed files with 190 additions and 46 deletions

View File

@@ -17,7 +17,10 @@ export global SystemPageData {
in-out property <float> charge_control_end_threshold: 30;
callback cb_charge_control_end_threshold(/* charge limit */ int);
in-out property <int> platform_profile: 0;
in-out property <[string]> platform_profile_choices: [@tr("Balanced"), @tr("Performance"), @tr("Quiet")];
in-out property <[string]> platform_profile_choices: [@tr("Balanced"), @tr("Performance"), @tr("Quiet"), @tr("LowPower")];
// The dropdown list index is used to index in to this and find the correct
// value for platform profile
in-out property <[int]> platform_profile_indexes: [0, 1, 2, 3];
callback cb_platform_profile(int);
in-out property <[string]> energy_performance_choices: [
@tr("Default"),
@@ -169,7 +172,7 @@ export component PageSystem inherits Rectangle {
current_value: SystemPageData.platform_profile_choices[SystemPageData.platform_profile];
model <=> SystemPageData.platform_profile_choices;
selected => {
SystemPageData.cb_platform_profile(SystemPageData.platform_profile)
SystemPageData.cb_platform_profile(SystemPageData.platform_profile_indexes[SystemPageData.platform_profile])
}
}

View File

@@ -5,13 +5,14 @@ export enum Profile {
Performance,
Quiet,
LowPower,
Custom
}
export enum FanType {
CPU,
Middle,
GPU,
}
}
export global FanPageData {
in-out property <[Profile]> available_profiles: [Profile.Balanced, Profile.Performance, Profile.Quiet];