From f05467f45c91919b84bd37b0f69df8f3098f3391 Mon Sep 17 00:00:00 2001 From: deftdawg Date: Thu, 18 Dec 2025 16:39:58 -0500 Subject: [PATCH] Fix oled_sleep_param only retaining lowest 8-bits of value providing oled_sleep_param with a 16-bit value (i.e. >256), results unpredictable display sleep times as only the low 8-bits are retained due to uint8_t (i.e. 5 minutes 300 seconds; shuts off in ~44s / 300s - 256s), this patch switches to uint16_t which should allow for up to sleeps of up to 65535 seconds. --- support/sg2002/kvm_system/main/include/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support/sg2002/kvm_system/main/include/config.h b/support/sg2002/kvm_system/main/include/config.h index 9150cc7..014c2c3 100644 --- a/support/sg2002/kvm_system/main/include/config.h +++ b/support/sg2002/kvm_system/main/include/config.h @@ -95,10 +95,11 @@ typedef struct { int8_t type = -1; // cat /kvmapp/kvm/type int8_t now_fps = -1; // cat /kvmapp/kvm/now_fps int16_t qlty = -1; // cat /kvmapp/kvm/qlty - uint8_t oled_sleep_param = 0; + uint16_t oled_sleep_param = 0; uint8_t oled_sleep_state = 0; // 0:wakeup; 1:sleep; uint64_t oled_sleep_start = 0; uint64_t ue_patch_state = 0; } kvm_oled_state_t; #endif // CONFIG_H_ +