mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Is smol blocking or inotify blocking it?
This commit is contained in:
@@ -103,7 +103,7 @@ pub fn start_notifications(
|
||||
.spawn(async move {
|
||||
let conn = zbus::Connection::system().await.unwrap();
|
||||
let proxy = ChargeProxy::new(&conn).await.unwrap();
|
||||
if let Ok(p) = proxy.receive_notify_charge().await {
|
||||
if let Ok(p) = proxy.receive_notify_charge_control_end_threshold().await {
|
||||
p.for_each(|e| {
|
||||
if let Ok(out) = e.args() {
|
||||
if notifs_enabled1.load(Ordering::SeqCst) {
|
||||
|
||||
@@ -45,7 +45,7 @@ impl BiosState {
|
||||
GpuMode::NotSupported
|
||||
},
|
||||
panel_overdrive: if supported.rog_bios_ctrl.panel_overdrive {
|
||||
dbus.proxies().rog_bios().panel_overdrive()?
|
||||
dbus.proxies().rog_bios().panel_od()?
|
||||
} else {
|
||||
false
|
||||
},
|
||||
@@ -258,7 +258,7 @@ pub struct PageDataStates {
|
||||
pub anime: AnimeState,
|
||||
pub profiles: ProfilesState,
|
||||
pub fan_curves: FanCurvesState,
|
||||
pub charge_limit: i16,
|
||||
pub charge_limit: u8,
|
||||
pub error: Option<String>,
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ impl PageDataStates {
|
||||
keyboard_layout,
|
||||
notifs_enabled,
|
||||
was_notified: charge_notified,
|
||||
charge_limit: dbus.proxies().charge().limit()?,
|
||||
charge_limit: dbus.proxies().charge().charge_control_end_threshold()?,
|
||||
bios: BiosState::new(bios_notified, supported, dbus)?,
|
||||
aura: AuraState::new(aura_notified, supported, dbus)?,
|
||||
anime: AnimeState::new(anime_notified, supported, dbus)?,
|
||||
@@ -296,7 +296,7 @@ impl PageDataStates {
|
||||
) -> Result<bool> {
|
||||
let mut notified = false;
|
||||
if self.was_notified.load(Ordering::SeqCst) {
|
||||
self.charge_limit = dbus.proxies().charge().limit()?;
|
||||
self.charge_limit = dbus.proxies().charge().charge_control_end_threshold()?;
|
||||
self.was_notified.store(false, Ordering::SeqCst);
|
||||
notified = true;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ pub fn rog_bios_group(
|
||||
if ui.add(slider).drag_released() {
|
||||
dbus.proxies()
|
||||
.charge()
|
||||
.set_limit(states.charge_limit as u8)
|
||||
.set_charge_control_end_threshold(states.charge_limit as u8)
|
||||
.map_err(|err| {
|
||||
states.error = Some(err.to_string());
|
||||
})
|
||||
@@ -82,7 +82,7 @@ pub fn rog_bios_group(
|
||||
{
|
||||
dbus.proxies()
|
||||
.rog_bios()
|
||||
.set_panel_overdrive(states.bios.panel_overdrive)
|
||||
.set_panel_od(states.bios.panel_overdrive)
|
||||
.map_err(|err| {
|
||||
states.error = Some(err.to_string());
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user