Cleanup unsafe sysfs interfaces. Bugfixes for UI

This commit is contained in:
Luke D. Jones
2025-01-16 23:56:12 +13:00
parent 7a1b45071d
commit 2b22f82b72
22 changed files with 379 additions and 553 deletions

View File

@@ -11,7 +11,6 @@ use std::time::Duration;
use log::{debug, error, info, warn};
use notify_rust::{Hint, Notification, Timeout, Urgency};
use rog_dbus::zbus_platform::PlatformProxy;
use rog_platform::platform::GpuMode;
use rog_platform::power::AsusPower;
use serde::{Deserialize, Serialize};
@@ -154,39 +153,41 @@ pub fn start_notifications(
};
// GPU MUX Mode notif
let enabled_notifications_copy = config.clone();
tokio::spawn(async move {
let conn = zbus::Connection::system().await.map_err(|e| {
error!("zbus signal: receive_notify_gpu_mux_mode: {e}");
e
})?;
let proxy = PlatformProxy::new(&conn).await.map_err(|e| {
error!("zbus signal: receive_notify_gpu_mux_mode: {e}");
e
})?;
// TODO: need to get armoury attrs and iter to find
// let enabled_notifications_copy = config.clone();
// tokio::spawn(async move {
// let conn = zbus::Connection::system().await.map_err(|e| {
// error!("zbus signal: receive_notify_gpu_mux_mode: {e}");
// e
// })?;
// let proxy = PlatformProxy::new(&conn).await.map_err(|e| {
// error!("zbus signal: receive_notify_gpu_mux_mode: {e}");
// e
// })?;
let mut actual_mux_mode = GpuMode::Error;
if let Ok(mode) = proxy.gpu_mux_mode().await {
actual_mux_mode = GpuMode::from(mode);
}
// let mut actual_mux_mode = GpuMode::Error;
// if let Ok(mode) = proxy.gpu_mux_mode().await {
// actual_mux_mode = GpuMode::from(mode);
// }
info!("Started zbus signal thread: receive_notify_gpu_mux_mode");
while let Some(e) = proxy.receive_gpu_mux_mode_changed().await.next().await {
if let Ok(config) = enabled_notifications_copy.lock() {
if !config.notifications.enabled || !config.notifications.receive_notify_gfx {
continue;
}
}
if let Ok(out) = e.get().await {
let mode = GpuMode::from(out);
if mode == actual_mux_mode {
continue;
}
do_mux_notification("Reboot required. BIOS GPU MUX mode set to", &mode).ok();
}
}
Ok::<(), zbus::Error>(())
});
// info!("Started zbus signal thread: receive_notify_gpu_mux_mode");
// while let Some(e) =
// proxy.receive_gpu_mux_mode_changed().await.next().await { if let
// Ok(config) = enabled_notifications_copy.lock() { if
// !config.notifications.enabled || !config.notifications.receive_notify_gfx {
// continue;
// }
// }
// if let Ok(out) = e.get().await {
// let mode = GpuMode::from(out);
// if mode == actual_mux_mode {
// continue;
// }
// do_mux_notification("Reboot required. BIOS GPU MUX mode set to",
// &mode).ok(); }
// }
// Ok::<(), zbus::Error>(())
// });
let enabled_notifications_copy = config.clone();
// GPU Mode change/action notif

View File

@@ -26,7 +26,7 @@ macro_rules! set_ui_callbacks {
let handle_copy = $handle.as_weak();
let proxy_copy = $proxy.clone();
let data = $handle.global::<$data>();
concat_idents::concat_idents!(on_set = on_set_, $proxy_fn {
concat_idents::concat_idents!(on_set = on_cb_, $proxy_fn {
data.on_set(move |value| {
let proxy_copy = proxy_copy.clone();
let handle_copy = handle_copy.clone();

View File

@@ -39,7 +39,7 @@ pub fn setup_anime_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
let handle_copy = handle.as_weak();
let anime_copy = anime.clone();
global.on_set_builtin_animations(move |boot, awake, sleep, shutdown| {
global.on_cb_builtin_animations(move |boot, awake, sleep, shutdown| {
let handle_copy = handle_copy.clone();
let anime_copy = anime_copy.clone();
tokio::spawn(async move {

View File

@@ -65,12 +65,12 @@ async fn find_aura_iface() -> Result<AuraProxy<'static>, Box<dyn std::error::Err
}
pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
ui.global::<AuraPageData>().on_set_hex_from_colour(|c| {
ui.global::<AuraPageData>().on_cb_hex_from_colour(|c| {
format!("#{:02X}{:02X}{:02X}", c.red(), c.green(), c.blue()).into()
});
ui.global::<AuraPageData>()
.on_set_hex_to_colour(|s| decode_hex(s.as_str()).into());
.on_cb_hex_to_colour(|s| decode_hex(s.as_str()).into());
let handle = ui.as_weak();
tokio::spawn(async move {
@@ -189,7 +189,7 @@ pub fn setup_aura_page(ui: &MainWindow, _states: Arc<Mutex<Config>>) {
.upgrade_in_event_loop(|handle| {
handle
.global::<AuraPageData>()
.on_set_led_power(move |power| {
.on_cb_led_power(move |power| {
let handle_copy = handle_copy.clone();
let proxy_copy = aura.clone();
let power: LaptopAuraPower = power.into();

View File

@@ -4,14 +4,14 @@ use concat_idents::concat_idents;
use log::error;
use rog_dbus::asus_armoury::AsusArmouryProxy;
use rog_dbus::zbus_platform::{PlatformProxy, PlatformProxyBlocking};
use rog_platform::firmware_attributes::FirmwareAttribute;
use rog_platform::asus_armoury::FirmwareAttribute;
use rog_platform::platform::Properties;
use slint::ComponentHandle;
use super::show_toast;
use crate::config::Config;
use crate::zbus_proxies::find_iface_async;
use crate::{set_ui_props_async, AttrMinMax, MainWindow, SystemPageData};
use crate::{set_ui_callbacks, set_ui_props_async, AttrMinMax, MainWindow, SystemPageData};
const MINMAX: AttrMinMax = AttrMinMax {
min: 0,
@@ -35,6 +35,7 @@ pub fn setup_system_page(ui: &MainWindow, _config: Arc<Mutex<Config>>) {
ui.global::<SystemPageData>().set_mini_led_mode(-1);
ui.global::<SystemPageData>().set_ppt_pl1_spl(MINMAX);
ui.global::<SystemPageData>().set_ppt_pl2_sppt(MINMAX);
ui.global::<SystemPageData>().set_ppt_pl3_fppt(MINMAX);
ui.global::<SystemPageData>().set_ppt_fppt(MINMAX);
ui.global::<SystemPageData>().set_ppt_apu_sppt(MINMAX);
ui.global::<SystemPageData>().set_ppt_platform_sppt(MINMAX);
@@ -142,7 +143,6 @@ macro_rules! setup_external {
use zbus::export::futures_util::StreamExt;
while let Some(e) = x.next().await {
if let Ok(out) = e.get().await {
dbg!(out);
handle_copy
.upgrade_in_event_loop(move |handle| {
handle
@@ -216,8 +216,8 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
SystemPageData,
charge_control_end_threshold
);
set_ui_props_async!(handle, platform, SystemPageData, throttle_thermal_policy);
set_ui_props_async!(handle, platform, SystemPageData, throttle_thermal_policy);
set_ui_props_async!(handle, platform, SystemPageData, throttle_policy_linked_epp);
set_ui_props_async!(handle, platform, SystemPageData, throttle_balanced_epp);
set_ui_props_async!(handle, platform, SystemPageData, throttle_performance_epp);
@@ -237,6 +237,72 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
change_throttle_policy_on_ac
);
handle
.upgrade_in_event_loop(move |handle| {
set_ui_callbacks!(handle,
SystemPageData(as f32),
platform.charge_control_end_threshold(as u8),
"Charge limit successfully set to {}",
"Setting Charge limit failed"
);
set_ui_callbacks!(handle,
SystemPageData(as i32),
platform.throttle_thermal_policy(.into()),
"Throttle policy set to {}",
"Setting Throttle policy failed"
);
set_ui_callbacks!(handle,
SystemPageData(as i32),
platform.throttle_balanced_epp(.into()),
"Throttle policy EPP set to {}",
"Setting Throttle policy EPP failed"
);
set_ui_callbacks!(handle,
SystemPageData(as i32),
platform.throttle_performance_epp(.into()),
"Throttle policy EPP set to {}",
"Setting Throttle policy EPP failed"
);
set_ui_callbacks!(handle,
SystemPageData(as i32),
platform.throttle_quiet_epp(.into()),
"Throttle policy EPP set to {}",
"Setting Throttle policy EPP failed"
);
set_ui_callbacks!(
handle,
SystemPageData(),
platform.throttle_policy_linked_epp(),
"Throttle policy linked to EPP: {}",
"Setting Throttle policy linked to EPP failed"
);
set_ui_callbacks!(handle,
SystemPageData(as i32),
platform.throttle_policy_on_ac(.into()),
"Throttle policy on AC set to {}",
"Setting Throttle policy on AC failed"
);
set_ui_callbacks!(handle,
SystemPageData(as bool),
platform.change_throttle_policy_on_ac(.into()),
"Throttle policy on AC enabled: {}",
"Setting Throttle policy on AC failed"
);
set_ui_callbacks!(handle,
SystemPageData(as i32),
platform.throttle_policy_on_battery(.into()),
"Throttle policy on abttery set to {}",
"Setting Throttle policy on battery failed"
);
set_ui_callbacks!(handle,
SystemPageData(as bool),
platform.change_throttle_policy_on_battery(.into()),
"Throttle policy on battery enabled: {}",
"Setting Throttle policy on AC failed"
);
})
.ok();
let armoury_attrs;
if let Ok(attrs) = find_iface_async::<AsusArmouryProxy>("xyz.ljones.AsusArmoury").await {
armoury_attrs = attrs;

View File

@@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-01-15 09:19+0000\n"
"POT-Creation-Date: 2025-01-15 09:25+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -17,7 +17,7 @@ export component PageAbout inherits VerticalLayout {
Text {
wrap: TextWrap.word-wrap;
text: "You will require these patches: https://lore.kernel.org/platform-driver-x86/20240404001652.86207-1-luke@ljones.dev/, they have been merged upstream for kernel 6.10. The main thing is that the PPT settings will apply without them, but the read/back will fail";
text: "You will require a kernel built with my work from here: https://github.com/flukejones/linux";
}
Text {
@@ -28,19 +28,7 @@ export component PageAbout inherits VerticalLayout {
}
Text {
text: "- [x] Theme the widgets";
}
Text {
text: "- [x] Add a fullscreen mode (cli arg)";
}
Text {
text: "- [x] Disable aura items depending if mode supports or not";
}
Text {
text: "- [x] Add fan curve graph controls";
text: "- [ ] Theme the widgets";
}
Text {
@@ -48,11 +36,15 @@ export component PageAbout inherits VerticalLayout {
}
Text {
text: "- [ ] Supergfx control";
text: "- [ ] Include fan speeds, temps in a bottom bar";
}
Text {
text: "- [ ] Include fan speeds, temps in a bottom bar";
text: "- [ ] Slash control";
}
Text {
text: "- [ ] Supergfx control";
}
Text {

View File

@@ -9,17 +9,17 @@ export global AnimePageData {
@tr("Anime Brightness" => "High"),
];
in-out property <int> brightness;
callback set_brightness(int);
callback cb_brightness(int);
in-out property <bool> builtins_enabled;
callback set_builtins_enabled(bool);
callback cb_builtins_enabled(bool);
in-out property <bool> enable_display;
callback set_enable_display(bool);
callback cb_enable_display(bool);
in-out property <bool> off_when_lid_closed;
callback set_off_when_lid_closed(bool);
callback cb_off_when_lid_closed(bool);
in-out property <bool> off_when_suspended;
callback set_off_when_suspended(bool);
callback cb_off_when_suspended(bool);
in-out property <bool> off_when_unplugged;
callback set_off_when_unplugged(bool);
callback cb_off_when_unplugged(bool);
in-out property <[string]> boot_anim_choices: [@tr("Glitch Construction"), @tr("Static Emergence")];
in property <int> boot_anim: 0;
in-out property <[string]> awake_anim_choices: [@tr("Binary Banner Scroll"), @tr("Rog Logo Glitch")];
@@ -28,7 +28,7 @@ export global AnimePageData {
in property <int> sleep_anim: 0;
in-out property <[string]> shutdown_anim_choices: [@tr("Glitch Out"), @tr("See Ya")];
in property <int> shutdown_anim: 0;
callback set_builtin_animations(int, int, int, int);
callback cb_builtin_animations(int, int, int, int);
}
export component PageAnime inherits Rectangle {
@@ -53,7 +53,7 @@ export component PageAnime inherits Rectangle {
model <=> AnimePageData.brightness_names;
selected => {
self.current_value = AnimePageData.brightness_names[AnimePageData.brightness];
AnimePageData.set_brightness(AnimePageData.brightness)
AnimePageData.cb_brightness(AnimePageData.brightness)
}
}
}
@@ -66,7 +66,7 @@ export component PageAnime inherits Rectangle {
text: @tr("Enable display");
checked <=> AnimePageData.enable_display;
toggled => {
AnimePageData.set_enable_display(AnimePageData.enable_display)
AnimePageData.cb_enable_display(AnimePageData.enable_display)
}
}
@@ -89,7 +89,7 @@ export component PageAnime inherits Rectangle {
text: @tr("Use built-in animations");
checked <=> AnimePageData.builtins_enabled;
toggled => {
AnimePageData.set_builtins_enabled(AnimePageData.builtins_enabled)
AnimePageData.cb_builtins_enabled(AnimePageData.builtins_enabled)
}
}
@@ -152,7 +152,7 @@ export component PageAnime inherits Rectangle {
current_value: AnimePageData.boot_anim_choices[AnimePageData.boot_anim];
model <=> AnimePageData.boot_anim_choices;
selected => {
AnimePageData.set_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
AnimePageData.cb_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
}
}
@@ -162,7 +162,7 @@ export component PageAnime inherits Rectangle {
current_value: AnimePageData.awake_anim_choices[AnimePageData.awake_anim];
model <=> AnimePageData.awake_anim_choices;
selected => {
AnimePageData.set_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
AnimePageData.cb_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
}
}
@@ -172,7 +172,7 @@ export component PageAnime inherits Rectangle {
current_value: AnimePageData.sleep_anim_choices[AnimePageData.sleep_anim];
model <=> AnimePageData.sleep_anim_choices;
selected => {
AnimePageData.set_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
AnimePageData.cb_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
}
}
@@ -182,7 +182,7 @@ export component PageAnime inherits Rectangle {
current_value: AnimePageData.shutdown_anim_choices[AnimePageData.shutdown_anim];
model <=> AnimePageData.shutdown_anim_choices;
selected => {
AnimePageData.set_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
AnimePageData.cb_builtin_animations(AnimePageData.boot_anim, AnimePageData.awake_anim, AnimePageData.sleep_anim, AnimePageData.shutdown_anim)
}
}
}
@@ -225,7 +225,7 @@ export component PageAnime inherits Rectangle {
text: @tr("Off when lid closed");
checked <=> AnimePageData.off_when_lid_closed;
toggled => {
AnimePageData.set_off_when_lid_closed(AnimePageData.off_when_lid_closed)
AnimePageData.cb_off_when_lid_closed(AnimePageData.off_when_lid_closed)
}
}
@@ -234,7 +234,7 @@ export component PageAnime inherits Rectangle {
text: @tr("Off when suspended");
checked <=> AnimePageData.off_when_suspended;
toggled => {
AnimePageData.set_off_when_suspended(AnimePageData.off_when_suspended)
AnimePageData.cb_off_when_suspended(AnimePageData.off_when_suspended)
}
}
@@ -243,7 +243,7 @@ export component PageAnime inherits Rectangle {
text: @tr("Off when on battery");
checked <=> AnimePageData.off_when_unplugged;
toggled => {
AnimePageData.set_off_when_unplugged(AnimePageData.off_when_unplugged)
AnimePageData.cb_off_when_unplugged(AnimePageData.off_when_unplugged)
}
}
}

View File

@@ -30,7 +30,7 @@ export component PageAura inherits Rectangle {
current_value: AuraPageData.brightness_names[self.current-index];
model <=> AuraPageData.brightness_names;
selected => {
AuraPageData.set_brightness(AuraPageData.brightness)
AuraPageData.cb_brightness(AuraPageData.brightness)
}
}
@@ -44,7 +44,7 @@ export component PageAura inherits Rectangle {
AuraPageData.led_mode_data.mode = AuraPageData.led_mode;
AuraPageData.led_mode_data.mode = AuraPageData.current_available_mode;
self.current_value = AuraPageData.available_mode_names[self.current-index];
AuraPageData.set_led_mode(AuraPageData.current_available_mode);
AuraPageData.cb_led_mode(AuraPageData.current_available_mode);
}
}
}
@@ -67,14 +67,14 @@ export component PageAura inherits Rectangle {
final_colour <=> AuraPageData.color1;
colourbox <=> AuraPageData.colorbox1;
set_hex_from_colour(c1) => {
return AuraPageData.set_hex_from_colour(c1);
return AuraPageData.cb_hex_from_colour(c1);
}
hex_to_colour(s) => {
return AuraPageData.set_hex_to_colour(s);
return AuraPageData.cb_hex_to_colour(s);
}
released => {
AuraPageData.led_mode_data.colour1 = AuraPageData.color1;
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
AuraPageData.cb_led_mode_data(AuraPageData.led_mode_data);
}
}
}
@@ -93,14 +93,14 @@ export component PageAura inherits Rectangle {
final_colour <=> AuraPageData.color2;
colourbox <=> AuraPageData.colorbox2;
set_hex_from_colour(c1) => {
return AuraPageData.set_hex_from_colour(c1);
return AuraPageData.cb_hex_from_colour(c1);
}
hex_to_colour(s) => {
return AuraPageData.set_hex_to_colour(s);
return AuraPageData.cb_hex_to_colour(s);
}
released => {
AuraPageData.led_mode_data.colour2 = AuraPageData.color2;
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
AuraPageData.cb_led_mode_data(AuraPageData.led_mode_data);
}
}
}
@@ -129,7 +129,7 @@ export component PageAura inherits Rectangle {
model <=> AuraPageData.zone_names;
selected => {
AuraPageData.led_mode_data.zone = self.current-index;
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
AuraPageData.cb_led_mode_data(AuraPageData.led_mode_data);
}
}
}
@@ -151,7 +151,7 @@ export component PageAura inherits Rectangle {
model <=> AuraPageData.direction_names;
selected => {
AuraPageData.led_mode_data.direction = self.current-index;
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
AuraPageData.cb_led_mode_data(AuraPageData.led_mode_data);
}
}
}
@@ -173,7 +173,7 @@ export component PageAura inherits Rectangle {
model <=> AuraPageData.speed_names;
selected => {
AuraPageData.led_mode_data.speed = self.current-index;
AuraPageData.set_led_mode_data(AuraPageData.led_mode_data);
AuraPageData.cb_led_mode_data(AuraPageData.led_mode_data);
}
}
}
@@ -218,22 +218,22 @@ export component PageAura inherits Rectangle {
boot_checked: state.boot;
boot_toggled => {
AuraPageData.led_power.states[idx].boot = zone.boot_checked;
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
awake_checked: state.awake;
awake_toggled => {
AuraPageData.led_power.states[idx].awake = zone.awake_checked;
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
sleep_checked: state.sleep;
sleep_toggled => {
AuraPageData.led_power.states[idx].sleep = zone.sleep_checked;
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
shutdown_checked: state.shutdown;
shutdown_toggled => {
AuraPageData.led_power.states[idx].shutdown = zone.shutdown_checked;
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
}
}
@@ -271,22 +271,22 @@ export component PageAura inherits Rectangle {
zone_strings <=> AuraPageData.power_zone_names_old;
selected_zone => {
AuraPageData.led_power.states[idx].zone = AuraPageData.supported_power_zones[old_zone.current_zone];
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
boot_checked: state.boot;
boot_toggled => {
AuraPageData.led_power.states[idx].boot = old_zone.boot_checked;
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
awake_checked: state.awake;
awake_toggled => {
AuraPageData.led_power.states[idx].awake = old_zone.awake_checked;
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
sleep_checked: state.sleep;
sleep_toggled => {
AuraPageData.led_power.states[idx].sleep = old_zone.sleep_checked;
AuraPageData.set_led_power(AuraPageData.led_power);
AuraPageData.cb_led_power(AuraPageData.led_power);
}
}
}

View File

@@ -219,6 +219,14 @@ export component PageSystem inherits Rectangle {
}
}
if SystemPageData.ppt_pl1_spl.val != -1: Rectangle {
height: 32px;
Text {
font-size: 16px;
text: @tr("ppt_warning" => "The following settings may not be safe, please take care.");
}
}
if SystemPageData.ppt_pl1_spl.val != -1: SystemSlider {
text: @tr("ppt_pl1_spl" => "PL1, sustained power limit");
minimum: SystemPageData.ppt_pl1_spl.min;
@@ -247,8 +255,8 @@ export component PageSystem inherits Rectangle {
maximum: SystemPageData.ppt_pl3_fppt.max;
value: SystemPageData.ppt_pl3_fppt.val;
released => {
SystemPageData.ppt_fppt.val = self.value;
SystemPageData.cb_ppt_fppt(Math.round(self.value))
SystemPageData.ppt_pl3_fppt.val = self.value;
SystemPageData.cb_ppt_pl3_fppt(Math.round(self.value))
}
}
if SystemPageData.ppt_fppt.val != -1: SystemSlider {

View File

@@ -71,7 +71,7 @@ export global AuraPageData {
@tr("Aura brightness" => "High"),
];
in-out property <int> brightness;
callback set_brightness(int);
callback cb_brightness(int);
in-out property <[string]> mode_names: [
@tr("Basic aura mode" => "Static"),
@tr("Basic aura mode" => "Breathe"),
@@ -95,7 +95,7 @@ export global AuraPageData {
in-out property <int> current_available_mode: 0;
in-out property <[int]> supported_basic_modes: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12];
in-out property <int> led_mode;
callback set_led_mode(int);
callback cb_led_mode(int);
in-out property <[string]> zone_names: [
@tr("Aura zone" => "None"),
@tr("Aura zone" => "Key1"),
@@ -130,7 +130,7 @@ export global AuraPageData {
speed: 0,
direction: 0,
};
callback set_led_mode_data(AuraEffect);
callback cb_led_mode_data(AuraEffect);
in-out property <color> color1;
in-out property <brush> colorbox1;
in-out property <color> color2;
@@ -147,8 +147,8 @@ export global AuraPageData {
colorbox1 = data.colour1;
colorbox2 = data.colour2;
}
callback set_hex_from_colour(color) -> string;
callback set_hex_to_colour(string) -> color;
callback cb_hex_from_colour(color) -> string;
callback cb_hex_to_colour(string) -> color;
in-out property <AuraDevType> device_type: AuraDevType.Old;
// List of indexes to power_zone_names. Must correspond to rog-aura crate
in-out property <[PowerZones]> supported_power_zones: [
@@ -165,5 +165,5 @@ export global AuraPageData {
shutdown: true,
}]
};
callback set_led_power(LaptopAuraPower);
callback cb_led_power(LaptopAuraPower);
}