Revert "Add Commands SetOption, SetOption 1 and SetOption 2 for display all SetOption values"

This reverts commit 06b5042e17.
This commit is contained in:
Theo Arends
2026-04-28 15:10:30 +02:00
parent 06b5042e17
commit 518f839694
4 changed files with 0 additions and 42 deletions
-1
View File
@@ -8,7 +8,6 @@ All notable changes to this project will be documented in this file.
- Berry add support for pre-processor (#24679)
- Berry transpose C defines to Berry in `tasmota_defines_for_berry.be` (#24680)
- MiElHVAC extend support of AirDirection control (#24675)
- Commands `SetOption`, `SetOption 1` and `SetOption 2` for display all SetOption values
### Breaking Changed
-1
View File
@@ -114,7 +114,6 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v15.4.0.1
### Added
- Commands `SetOption`, `SetOption 1` and `SetOption 2` for display all SetOption values
- MiElHVAC extend support of AirDirection control [#24675](https://github.com/arendst/Tasmota/issues/24675)
- Berry add support for pre-processor [#24679](https://github.com/arendst/Tasmota/issues/24679)
- Berry transpose C defines to Berry in `tasmota_defines_for_berry.be` [#24680](https://github.com/arendst/Tasmota/issues/24680)
-2
View File
@@ -215,8 +215,6 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
};
} SOBitfield6;
const uint8_t MAX_SETOPTION_USED = 165; // Max number of SetOption. Used by command SetOption to display all states
// Bitfield to be used for persistent multi bit
typedef union {
uint32_t data; // Allow bit manipulation
@@ -1521,44 +1521,6 @@ void CmndSavedata(void)
}
void CmndSetoption(void) {
if (!XdrvMailbox.usridx) {
// SetOption - Report all boolean options where preceded by ! means not-set (0)
// SetOption 1 - Report only boolean options set (1)
// SetOption 2 - Report all multi value options (SetOption32 .. 49)
uint32_t display_option = XdrvMailbox.payload;
bool first_shown = false;
Response_P(PSTR("{\"" D_CMND_SETOPTION));
if (2 == display_option) { // Report all multi value options (SetOption32 .. 49)
ResponseAppend_P(PSTR("32\":{"));
for (uint32_t i = 0; i < PARAM8_SIZE; i++) {
ResponseAppend_P(PSTR("%s%d"), (first_shown)?",":"", Settings->param[i]);
first_shown = true;
}
ResponseJsonEndEnd();
return;
}
if (1 == display_option) { // Report only options set (1)
ResponseAppend_P(PSTR("Set"));
}
ResponseAppend_P(PSTR("\":\""));
uint32_t flag[5];
flag[0] = Settings->flag.data; // SetOption0 .. 31
flag[1] = Settings->flag3.data; // SetOption50 .. 81
flag[2] = Settings->flag4.data; // SetOption82 .. 113
flag[3] = Settings->flag5.data; // SetOption114 .. 145
flag[4] = Settings->flag6.data; // SetOption146 .. 177
for (uint32_t i = 0; i <= MAX_SETOPTION_USED - PARAM8_SIZE; i++) {
bool option_set = bitRead(flag[i / 32], i % 32);
if ((1 == display_option) && (!option_set)) { continue; } // Report only options set (1)
ResponseAppend_P(PSTR("%s%s%d"), (first_shown)?",":"", (option_set)?"":"!", (i < 32) ? i : i + PARAM8_SIZE);
first_shown = true;
}
if (!first_shown) {
ResponseAppend_P(PSTR("-"));
}
ResponseAppend_P(PSTR("\"}"));
return;
}
snprintf_P(XdrvMailbox.command, CMDSZ, PSTR(D_CMND_SETOPTION)); // Rename result shortcut command SO to SetOption
CmndSetoptionBase(1);
}