Remove rotary_debounce from settings

This commit is contained in:
Peter Nyilas 2019-01-11 13:59:51 +00:00 committed by dh.harald
parent 4952c4d72f
commit b5ad2c8c06
7 changed files with 7 additions and 16 deletions

View File

@ -1,8 +1,4 @@
/* 6.4.1.9 20190111
* Add support for rotary switch
* Add support for Mi Desk Lamp
*
* 6.4.1.8 20190107
/* 6.4.1.8 20190107
* Change sonoff_template.h layout regarding optional module flags like ADC0
* Add command SetOption62 1 to force no Button/Switch pullup on dedicated modules. Currently only supported on Shelly2 (#4841)
* Fix Display exception 28 when JSON value is NULL received
@ -15,7 +11,9 @@
* Add support for Luminea ZX2820 Smart Socket with Energy monitoring (#4921)
* Add define MDNS_ENABLE to control initial mDNS state (#4923)
* Add split interlock part 1 (#4910)
*
* Add support for rotary switch
* Add support for Mi Desk Lamp
*
* 6.4.1.7 20190106
* Fix HLW8012, HJL01 and BL0937 based energy sensors low Power (below 10W) measurement regression from 6.4.1.6
* Add Power status functionality to LED2 when configured leaving LED1 for Link status indication

View File

@ -214,7 +214,6 @@
#define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
#define D_CMND_BUTTONDEBOUNCE "ButtonDebounce"
#define D_CMND_SWITCHDEBOUNCE "SwitchDebounce"
#define D_CMND_ROTARYDEBOUNCE "RotaryDebounce"
#define D_CMND_SLEEP "Sleep"
#define D_CMND_UPLOAD "Upload"
#define D_CMND_UPGRADE "Upgrade"

View File

@ -177,7 +177,6 @@
#define KEY_HOLD_TIME 40 // [SetOption32] Number of 0.1 seconds to hold Button or external Pushbutton before sending HOLD message
#define SWITCH_DEBOUNCE_TIME 50 // [SwitchDebounce] Number of mSeconds switch press debounce time
#define SWITCH_MODE TOGGLE // [SwitchMode] TOGGLE, FOLLOW, FOLLOW_INV, PUSHBUTTON, PUSHBUTTON_INV, PUSHBUTTONHOLD, PUSHBUTTONHOLD_INV, PUSHBUTTON_TOGGLE (the wall switch state)
#define ROTARY_DEBOUNCE_TIME 50 // [RotaryDebounce] Number of mSeconds rotary debounce time
#define WS2812_LEDS 30 // [Pixels] Number of WS2812 LEDs to start with (max is 512)
#define TEMP_CONVERSION 0 // [SetOption8] Return temperature in (0 = Celsius or 1 = Fahrenheit)

View File

@ -330,7 +330,7 @@ struct SYSCFG {
uint32_t energy_kWhtotal_time; // 7B4
unsigned long weight_item; // 7B8 Weight of one item in gram * 10
uint16_t rotary_debounce; // 7BC
byte free_7BC[2]; // 7BC
uint16_t weight_max; // 7BE Total max weight in kilogram
unsigned long weight_reference; // 7C0 Reference weight in gram

View File

@ -789,7 +789,6 @@ void SettingsDefaultSet2(void)
SettingsDefaultSet_5_13_1c(); // Time STD/DST settings
Settings.button_debounce = KEY_DEBOUNCE_TIME;
Settings.rotary_debounce = ROTARY_DEBOUNCE_TIME;
Settings.switch_debounce = SWITCH_DEBOUNCE_TIME;
for (byte j = 0; j < 5; j++) {
@ -1024,10 +1023,6 @@ void SettingsDelta(void)
Settings.param[P_MDNS_DELAYED_START] = 0;
}
if (Settings.version < 0x06040109) {
Settings.rotary_debounce = ROTARY_DEBOUNCE_TIME;
}
Settings.version = VERSION;
SettingsSave(1);
}

View File

@ -20,7 +20,7 @@
#ifndef _SONOFF_VERSION_H_
#define _SONOFF_VERSION_H_
#define VERSION 0x06040109
#define VERSION 0x06040108
#define D_PROGRAMNAME "Sonoff-Tasmota"
#define D_AUTHOR "Theo Arends"

View File

@ -125,7 +125,7 @@ void RotaryLoop(void)
{
if (rotaries_found) {
if (TimeReached(rotary_debounce)) {
SetNextTimeInterval(rotary_debounce, Settings.rotary_debounce);
SetNextTimeInterval(rotary_debounce, Settings.button_debounce); // Using button_debounce setting for this as well
RotaryHandler();
}
}