From 3de62119926d1dfa3d437b521fa5fa9e1b434a25 Mon Sep 17 00:00:00 2001 From: Lorow Date: Wed, 27 Aug 2025 00:02:30 +0200 Subject: [PATCH] Fix xiao failing to load the default pwm duty cycle --- components/ProjectConfig/ProjectConfig/Models.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/ProjectConfig/ProjectConfig/Models.hpp b/components/ProjectConfig/ProjectConfig/Models.hpp index ba9e70a..e400f14 100644 --- a/components/ProjectConfig/ProjectConfig/Models.hpp +++ b/components/ProjectConfig/ProjectConfig/Models.hpp @@ -71,7 +71,11 @@ struct DeviceConfig_t : BaseConfigModel this->OTALogin = this->pref->getString("OTALogin", "openiris"); this->OTAPassword = this->pref->getString("OTAPassword", "openiris"); this->OTAPort = this->pref->getInt("OTAPort", 3232); +#if CONFIG_LED_EXTERNAL_PWM_DUTY_CYCLE this->led_external_pwm_duty_cycle = this->pref->getInt("led_ext_pwm", CONFIG_LED_EXTERNAL_PWM_DUTY_CYCLE); +#else + this->led_external_pwm_duty_cycle = this->pref->getInt("led_ext_pwm", 100); +#endif }; void save() const