From f46e0eb5f28fff64997fee7fc15b123ddc7231fe Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sun, 14 May 2023 22:48:04 +0800 Subject: [PATCH] Fix PowerManagementMode::None MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mode was being set to 2 (PM2_POWERSAVE_MODE), should be 0 (NO_POWERSAVE_MODE). Setting None mode failed with a panic: 85.707099 DEBUG set pm2_sleep_ret = [00, 00, 00, 00] └─ cyw43::control::{impl#0}::set_iovar_v::{async_fn#0} @ cyw43/src/fmt.rs:127 85.710469 ERROR panicked at 'IOCTL error -29' --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 4a9ada90f..fd11f3674 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -198,6 +198,7 @@ impl PowerManagementMode { fn mode(&self) -> u32 { match self { PowerManagementMode::ThroughputThrottling => 1, + PowerManagementMode::None => 0, _ => 2, } }