mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Fix undocumented support
Fix undocumented support for non-sequential buttons and switches (#17967)
This commit is contained in:
parent
3be29dfecd
commit
89ccfe910e
@ -9,10 +9,13 @@ All notable changes to this project will be documented in this file.
|
||||
### Breaking Changed
|
||||
|
||||
### Changed
|
||||
- ADC Range oversample from 2 to 32 (#17975)
|
||||
|
||||
### Fixed
|
||||
- SEN5X floats and units (#17961)
|
||||
- Energytotals cannot be set to negative values (#17965)
|
||||
- Undocumented support for non-sequential buttons and switches (#17967)
|
||||
- SR04 driver single pin ultrasonic sensor detection (#17966)
|
||||
|
||||
### Removed
|
||||
|
||||
|
@ -116,7 +116,9 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||
### Breaking Changed
|
||||
|
||||
### Changed
|
||||
- ADC Range oversample from 2 to 32 [#17975](https://github.com/arendst/Tasmota/issues/17975)
|
||||
|
||||
### Fixed
|
||||
- SEN5X floats and units [#17961](https://github.com/arendst/Tasmota/issues/17961)
|
||||
- Energytotals cannot be set to negative values [#17965](https://github.com/arendst/Tasmota/issues/17965)
|
||||
- SR04 driver single pin ultrasonic sensor detection [#17966](https://github.com/arendst/Tasmota/issues/17966)
|
||||
|
@ -134,10 +134,7 @@ void ButtonProbe(void) {
|
||||
|
||||
uint32_t not_activated;
|
||||
for (uint32_t i = 0; i < MAX_KEYS_SET; i++) {
|
||||
if (!bitRead(Button.used, i)) {
|
||||
Button.probe_mutex = false;
|
||||
return;
|
||||
}
|
||||
if (!bitRead(Button.used, i)) { continue; }
|
||||
|
||||
if (PinUsed(GPIO_KEY1, i)) {
|
||||
#if defined(SOC_TOUCH_VERSION_1) || defined(SOC_TOUCH_VERSION_2)
|
||||
@ -334,7 +331,7 @@ void ButtonHandler(void) {
|
||||
char scmnd[20];
|
||||
|
||||
for (uint32_t button_index = 0; button_index < MAX_KEYS_SET; button_index++) {
|
||||
if (!bitRead(Button.used, button_index)) { return; }
|
||||
if (!bitRead(Button.used, button_index)) { continue; }
|
||||
|
||||
uint8_t button = Button.debounced_state[button_index];
|
||||
|
||||
|
@ -142,10 +142,7 @@ void SwitchProbe(void) {
|
||||
|
||||
uint32_t not_activated;
|
||||
for (uint32_t i = 0; i < MAX_SWITCHES_SET; i++) {
|
||||
if (!bitRead(Switch.used, i)) {
|
||||
Switch.probe_mutex = false;
|
||||
return;
|
||||
}
|
||||
if (!bitRead(Switch.used, i)) { continue; }
|
||||
|
||||
if (PinUsed(GPIO_SWT1, i)) {
|
||||
not_activated = digitalRead(Pin(GPIO_SWT1, i));
|
||||
@ -288,7 +285,7 @@ void SwitchHandler(void) {
|
||||
uint32_t loops_per_second = 1000 / Settings->switch_debounce;
|
||||
|
||||
for (uint32_t i = 0; i < MAX_SWITCHES_SET; i++) {
|
||||
if (!bitRead(Switch.used, i)) { return; }
|
||||
if (!bitRead(Switch.used, i)) { continue; }
|
||||
|
||||
uint32_t button = Switch.debounced_state[i];
|
||||
uint32_t switchflag = POWER_TOGGLE +1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user