From 655946036d6cb511cad1a103570e03bf0300a46b Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Tue, 7 May 2024 21:15:10 -0400 Subject: [PATCH 1/3] Update limits file on server too --- backend/limits_srv/pt_limits_v2.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/limits_srv/pt_limits_v2.json b/backend/limits_srv/pt_limits_v2.json index 0fd8033..73f426d 100644 --- a/backend/limits_srv/pt_limits_v2.json +++ b/backend/limits_srv/pt_limits_v2.json @@ -612,8 +612,8 @@ "provider": "GabeBoy", "limits": { "charge_rate": { - "min": 250, - "max": 2500 + "min": 0, + "max": 100 }, "charge_modes": [ "normal", @@ -878,8 +878,8 @@ "provider": "GabeBoySP", "limits": { "charge_rate": { - "min": 250, - "max": 2500 + "min": 0, + "max": 100 }, "charge_modes": [ "normal", From 6b3b1a5966f6a65106abb2396384d6a038874afc Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Tue, 7 May 2024 21:22:01 -0400 Subject: [PATCH 2/3] Re-enable dirty echoes to hopefully mitigate #144 --- backend/src/api/handler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/api/handler.rs b/backend/src/api/handler.rs index dfc065a..83a2b9b 100644 --- a/backend/src/api/handler.rs +++ b/backend/src/api/handler.rs @@ -384,7 +384,7 @@ fn print_messages(msgs: &Vec) { impl ApiMessageHandler { pub fn process_forever(&mut self, settings: &mut Settings) { crate::utility::ioperm_power_ec(); - //let mut dirty_echo = true; // set everything twice, to make sure PowerTools wins on race conditions + let mut dirty_echo = true; // set everything twice, to make sure PowerTools wins on race conditions while let Ok(msg) = self.intake.recv() { let mut messages = vec![msg.to_string()]; // keep messages for logging let mut dirty = self.process(settings, msg); @@ -393,9 +393,9 @@ impl ApiMessageHandler { dirty |= self.process(settings, msg); } if dirty - /*|| dirty_echo */ + || dirty_echo { - //dirty_echo = dirty; // echo only once + dirty_echo = dirty; // echo only once print_messages(&messages); // run on_set if let Err(e) = settings.on_set() { From 9a8f1c9d3425eb1964329a0919fc8cdb7141910c Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Wed, 8 May 2024 19:11:31 -0400 Subject: [PATCH 3/3] Fix incorrect path in log message --- backend/src/utility.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/utility.rs b/backend/src/utility.rs index 3814211..9e8b9a3 100644 --- a/backend/src/utility.rs +++ b/backend/src/utility.rs @@ -69,7 +69,8 @@ pub fn chown_settings_dir() -> std::io::Result<()> { .parse() .unwrap_or(1000); log::info!( - "chmod/chown ~/.config/powertools for user `{}` ({})", + "chmod/chown {} for user `{}` ({})", + dir.display(), deck_user, uid );