From 093fd2a780ef5899e282ac34b855c3a7863f5df1 Mon Sep 17 00:00:00 2001 From: TD-er Date: Sat, 22 Aug 2026 15:19:35 +0200 Subject: [PATCH] [Bug] Fix partial webform load on disabled tasks (#5615) Fixes: #5615 --- src/src/Globals/Plugins.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/src/Globals/Plugins.cpp b/src/src/Globals/Plugins.cpp index aaa44768a..63555c976 100644 --- a/src/src/Globals/Plugins.cpp +++ b/src/src/Globals/Plugins.cpp @@ -207,14 +207,14 @@ uint8_t getTaskI2CAddress(taskIndex_t taskIndex) { // ******************************************************************************** #if FEATURE_I2C bool prepare_I2C_by_taskIndex(taskIndex_t taskIndex, deviceIndex_t DeviceIndex) { -if (!Settings.TaskDeviceEnabled[taskIndex] || - !validTaskIndex(taskIndex) || +if (!validTaskIndex(taskIndex) || !validDeviceIndex(DeviceIndex)) { return false; } - if (Device[DeviceIndex].Type != DEVICE_TYPE_I2C) { - return true; // No I2C task, so consider all-OK + if (!Settings.TaskDeviceEnabled[taskIndex] || + Device[DeviceIndex].Type != DEVICE_TYPE_I2C) { + return true; // No (enabled) I2C task, so consider all-OK } #if FEATURE_I2C_MULTIPLE const uint8_t i2cBus = Settings.getI2CInterface(taskIndex); @@ -248,13 +248,13 @@ if (!Settings.TaskDeviceEnabled[taskIndex] || } void post_I2C_by_taskIndex(taskIndex_t taskIndex, deviceIndex_t DeviceIndex) { -if (!Settings.TaskDeviceEnabled[taskIndex] || - !validTaskIndex(taskIndex) || +if (!validTaskIndex(taskIndex) || !validDeviceIndex(DeviceIndex)) { return; } - if (Device[DeviceIndex].Type != DEVICE_TYPE_I2C) { + if (!Settings.TaskDeviceEnabled[taskIndex] || + Device[DeviceIndex].Type != DEVICE_TYPE_I2C) { return; } #if FEATURE_I2C_MULTIPLE