mirror of https://github.com/arendst/Tasmota.git
Fix regression from 6.4.1.16
Fix regression from 6.4.1.16 where GPIO9 and GPIO10 connected devices did not work (#5197)
This commit is contained in:
parent
83b950bb65
commit
1fde362998
|
@ -1,5 +1,6 @@
|
|||
/* 6.4.1.17 20190214
|
||||
* Change template update by removing possibility to add user module config keeping template as defined (#5222)
|
||||
* Fix regression from 6.4.1.16 where GPIO9 and GPIO10 connected devices did not work (#5197)
|
||||
*
|
||||
* 6.4.1.16 20190211
|
||||
* Initial support for online template change using command Template or GUI Configure Other (#5177)
|
||||
|
|
|
@ -769,32 +769,19 @@ void SetModuleType()
|
|||
uint8_t ValidPin(uint8_t pin, uint8_t gpio)
|
||||
{
|
||||
uint8_t result = gpio;
|
||||
if ((pin > 5) && (pin < 12)) {
|
||||
result = GPIO_NONE; // Disable all flash pins
|
||||
|
||||
if (((pin > 5) && (pin < 9)) || (11 == pin)) {
|
||||
result = GPIO_NONE; // Disable flash pins GPIO6, GPIO7, GPIO8 and GPIO11
|
||||
}
|
||||
if (Settings.flag3.user_esp8285_enable) {
|
||||
if ((pin == 9) || (pin == 10)) {
|
||||
result = gpio; // Allow optional flash pins
|
||||
}
|
||||
if ((WEMOS == Settings.module) && (!Settings.flag3.user_esp8285_enable)) {
|
||||
if ((pin == 9) || (pin == 10)) { result = GPIO_NONE; } // Disable possible flash GPIO9 and GPIO10
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool ValidGPIO(uint8_t pin, uint8_t gpio)
|
||||
{
|
||||
bool result = false;
|
||||
/*
|
||||
// Version 6.4.1.16 - Use user module config in template
|
||||
if (USER_MODULE == Settings.module) {
|
||||
result = (ValidPin(pin, gpio) > GPIO_NONE); // Allow any pin
|
||||
} else {
|
||||
result = (GPIO_USER == ValidPin(pin, gpio)); // Only allow GPIO_USER pins
|
||||
}
|
||||
*/
|
||||
// Version 6.4.1.17 - Use template as defined
|
||||
result = (GPIO_USER == ValidPin(pin, gpio)); // Only allow GPIO_USER pins
|
||||
|
||||
return result;
|
||||
return (GPIO_USER == ValidPin(pin, gpio)); // Only allow GPIO_USER pins
|
||||
}
|
||||
|
||||
bool GetUsedInModule(uint8_t val, uint8_t *arr)
|
||||
|
|
Loading…
Reference in New Issue