mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-07 18:07:42 +00:00
Remove command SetOption62
Remove command SetOption62 as it's functionality is replaced by user changing the device template (#5255)
This commit is contained in:
parent
f33c59249e
commit
a201dd1222
@ -4,6 +4,7 @@
|
||||
* Fix GUI wifi password acception starting with asteriks (*) (#5231, #5242)
|
||||
* Add rule expression enabled by define USE_EXPRESSION in my_user_config.h (#5210)
|
||||
* Add Configure Template menu option to GUI (#5222)
|
||||
* Remove command SetOption62 as it's functionality is replaced by user changing the device template (#5255)
|
||||
*
|
||||
* 6.4.1.16 20190211
|
||||
* Initial support for online template change using command Template or GUI Configure Other (#5177)
|
||||
|
@ -75,7 +75,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
|
||||
uint32_t hass_tele_on_power : 1; // bit 9 (v6.3.0.13)
|
||||
uint32_t sleep_normal : 1; // bit 10 (v6.3.0.15) - SetOption60 - Enable normal sleep instead of dynamic sleep
|
||||
uint32_t button_switch_force_local : 1;// bit 11 (v6.3.0.16) - SetOption61 - Force local operation when button/switch topic is set
|
||||
uint32_t no_pullup : 1; // bit 12 (v6.4.1.7) - SetOption62 - Force no pull-up (0 = (no)pull-up, 1 = no pull-up)
|
||||
uint32_t spare12 : 1;
|
||||
uint32_t spare13 : 1;
|
||||
uint32_t spare14 : 1;
|
||||
uint32_t spare15 : 1;
|
||||
|
@ -776,9 +776,6 @@ void MqttDataHandler(char* topic, uint8_t* data, unsigned int data_len)
|
||||
if (10 == pindex) { // SetOption60 enable or disable traditional sleep
|
||||
WiFiSetSleepMode(); // Update WiFi sleep mode accordingly
|
||||
}
|
||||
if ((12 == pindex) && (my_module_flag.pullup)) { // SetOption62 change input pull-up
|
||||
restart_flag = 2; // Only restart if module supports it
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // SetOption32 .. 49
|
||||
|
@ -336,7 +336,7 @@ typedef struct MYCFGIO {
|
||||
} mycfgio;
|
||||
|
||||
#define GPIO_FLAG_ADC0 1 // Allow ADC0 when define USE_ADC_VCC is disabled
|
||||
#define GPIO_FLAG_PULLUP 2 // Allow input pull-up control using SetOption62
|
||||
#define GPIO_FLAG_SPARE01 2 // Allow input pull-up control using SetOption62 - Superseded by user template editing
|
||||
#define GPIO_FLAG_SPARE02 4
|
||||
#define GPIO_FLAG_SPARE03 8
|
||||
#define GPIO_FLAG_SPARE04 16
|
||||
@ -348,7 +348,7 @@ typedef union {
|
||||
uint8_t data;
|
||||
struct {
|
||||
uint8_t adc0 : 1; // Allow ADC0 when define USE_ADC_VCC is disabled
|
||||
uint8_t pullup : 1; // Allow input pull-up control using SetOption62
|
||||
uint8_t spare01 : 1;
|
||||
uint8_t spare02 : 1;
|
||||
uint8_t spare03 : 1;
|
||||
uint8_t spare04 : 1;
|
||||
@ -974,7 +974,6 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
|
||||
GPIO_USER, // GPIO15 D8
|
||||
GPIO_USER, // GPIO16 D0 Wemos Wake
|
||||
GPIO_FLAG_ADC0 // ADC0 A0 Analog input
|
||||
// + GPIO_FLAG_PULLUP // Allow input pull-up control
|
||||
},
|
||||
{ "Sonoff Dev", // Sonoff Dev (ESP8266)
|
||||
GPIO_KEY1, // GPIO00 E-FW Button
|
||||
@ -1503,7 +1502,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
|
||||
GPIO_SWT2, // GPIO14
|
||||
GPIO_MCP39F5_RST, // GPIO15 MCP39F501 Reset
|
||||
0,
|
||||
GPIO_FLAG_PULLUP // Allow input pull-up control
|
||||
0
|
||||
},
|
||||
{ "Xiaomi Philips", // Xiaomi Philips bulb (ESP8266)
|
||||
0, 0, 0, 0, 0, 0,
|
||||
|
@ -50,12 +50,6 @@ void ButtonInvertFlag(uint8 button_bit)
|
||||
|
||||
void ButtonInit(void)
|
||||
{
|
||||
if (my_module_flag.pullup) {
|
||||
if (Settings.flag3.no_pullup) {
|
||||
key_no_pullup = 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
buttons_found = 0;
|
||||
for (uint8_t i = 0; i < MAX_KEYS; i++) {
|
||||
if (pin[GPIO_KEY1 +i] < 99) {
|
||||
|
@ -110,12 +110,6 @@ void SwitchProbe(void)
|
||||
|
||||
void SwitchInit(void)
|
||||
{
|
||||
if (my_module_flag.pullup) {
|
||||
if (Settings.flag3.no_pullup) {
|
||||
switch_no_pullup = 0xffff;
|
||||
}
|
||||
}
|
||||
|
||||
switches_found = 0;
|
||||
for (uint8_t i = 0; i < MAX_SWITCHES; i++) {
|
||||
lastwallswitch[i] = 1; // Init global to virtual switch state;
|
||||
|
@ -177,7 +177,7 @@ const char HTTP_SCRIPT_TEMPLATE[] PROGMEM =
|
||||
"sk(g[i],j);" // Set GPIO
|
||||
"j++;"
|
||||
"}"
|
||||
"for(i=0;i<2;i++){"
|
||||
"for(i=0;i<1;i++){"
|
||||
"p=(g[13]>>i)&1;"
|
||||
"eb('c'+i).checked=p;" // Set FLAG checkboxes
|
||||
"}"
|
||||
@ -331,15 +331,12 @@ const char HTTP_FORM_TEMPLATE_FLAG[] PROGMEM =
|
||||
"<p></p>" // Keep close so do not use <br/>
|
||||
"<fieldset><legend><b> " D_TEMPLATE_FLAGS " </b></legend><p>"
|
||||
"<input id='c0' name='c0' type='checkbox'><b>" D_ALLOW_ADC0 "</b><br/>"
|
||||
"<input id='c1' name='c1' type='checkbox'><b>" D_ALLOW_PULLUP "</b><br/>"
|
||||
"</p></fieldset>";
|
||||
|
||||
const char HTTP_FORM_MODULE[] PROGMEM =
|
||||
"<fieldset><legend><b> " D_MODULE_PARAMETERS " </b></legend>"
|
||||
"<form method='get' action='md'>"
|
||||
"<p></p><b>" D_MODULE_TYPE "</b> ({mt)<br/><select id='g99' name='g99'></select><br/>";
|
||||
const char HTTP_FORM_MODULE_PULLUP[] PROGMEM =
|
||||
"<br/><input id='b1' name='b1' type='checkbox'{r1><b>" D_PULLUP_ENABLE "</b><br/>";
|
||||
|
||||
const char HTTP_LNK_ITEM[] PROGMEM =
|
||||
"<div><a href='#p' onclick='c(this)'>{v}</a> ({w}) <span class='q'>{i} {r}%</span></div>";
|
||||
@ -1073,12 +1070,6 @@ void HandleModuleConfiguration(void)
|
||||
page += FPSTR(HTTP_HEAD_STYLE);
|
||||
page += FPSTR(HTTP_FORM_MODULE);
|
||||
page.replace(F("{mt"), AnyModuleName(MODULE));
|
||||
|
||||
if (my_module_flag.pullup) {
|
||||
page += FPSTR(HTTP_FORM_MODULE_PULLUP);
|
||||
page.replace(F("{r1"), (Settings.flag3.no_pullup) ? F(" checked") : F(""));
|
||||
}
|
||||
|
||||
page += F("<br/><table>");
|
||||
for (uint8_t i = 0; i < sizeof(cmodule); i++) {
|
||||
if (ValidGPIO(i, cmodule.io[i])) {
|
||||
@ -1104,11 +1095,6 @@ void ModuleSaveSettings(void)
|
||||
Settings.last_module = Settings.module;
|
||||
Settings.module = new_module;
|
||||
SetModuleType();
|
||||
if (Settings.last_module == new_module) {
|
||||
if (my_module_flag.pullup) {
|
||||
Settings.flag3.no_pullup = WebServer->hasArg("b1");
|
||||
}
|
||||
}
|
||||
myio cmodule;
|
||||
ModuleGpios(&cmodule);
|
||||
String gpios = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user