Change redesigning ESP8266 GPIO internal numbering

Change redesigning ESP8266 GPIO internal numbering in line with ESP32
This commit is contained in:
Theo Arends 2020-09-30 14:19:18 +02:00
parent c00d7035d9
commit 1ae9adc642
5 changed files with 51 additions and 6 deletions

View File

@ -2,6 +2,12 @@
## Unreleased (development)
### 9.0.0.1 20200930
- Change redesigning ESP8266 GPIO internal numbering in line with ESP32
- Remove auto config update for all Friendlynames and Switchtopic from versions before 8.x
Valid migration path is from 7.x to 8.x to 9.x
### 8.5.0.1 20200907
- Fix energy total counters (#9263, #9266)

View File

@ -1164,6 +1164,44 @@ void ConvertGpios(void) {
// AddLogBufferSize(LOG_LEVEL_DEBUG, (uint8_t *)&Settings.my_gp.io, sizeof(myio) / 2, 2);
}
}
/*
void DumpConvertTable(void) {
bool jsflg = false;
uint32_t lines = 1;
for (uint32_t i = 0; i < ARRAY_SIZE(kGpioConvert); i++) {
uint32_t data = pgm_read_word(kGpioConvert + i);
if (!jsflg) {
Response_P(PSTR("{\"GPIOConversion%d\":{"), lines);
} else {
ResponseAppend_P(PSTR(","));
}
jsflg = true;
if ((ResponseAppend_P(PSTR("\"%d\":\"%d\""), i, data) > (LOGSZ - TOPSZ)) || (i == ARRAY_SIZE(kGpioConvert) -1)) {
ResponseJsonEndEnd();
MqttPublishPrefixTopic_P(RESULT_OR_STAT, XdrvMailbox.command);
jsflg = false;
lines++;
}
}
for (uint32_t i = 0; i < ARRAY_SIZE(kAdcNiceList); i++) {
uint32_t data = pgm_read_word(kAdcNiceList + i);
if (!jsflg) {
Response_P(PSTR("{\"ADC0Conversion%d\":{"), lines);
} else {
ResponseAppend_P(PSTR(","));
}
jsflg = true;
if ((ResponseAppend_P(PSTR("\"%d\":\"%d\""), i, data) > (LOGSZ - TOPSZ)) || (i == ARRAY_SIZE(kAdcNiceList) -1)) {
ResponseJsonEndEnd();
MqttPublishPrefixTopic_P(RESULT_OR_STAT, XdrvMailbox.command);
jsflg = false;
lines++;
}
}
mqtt_data[0] = '\0';
}
*/
#endif // ESP8266
uint32_t ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index = 0);

View File

@ -1202,6 +1202,12 @@ void ShowGpios(const uint16_t *NiceList, uint32_t size, uint32_t offset, uint32_
void CmndGpios(void)
{
/*
if (XdrvMailbox.payload == 17) {
DumpConvertTable();
return;
}
*/
uint32_t lines = 1;
ShowGpios(kGpioNiceList, ARRAY_SIZE(kGpioNiceList), 0, lines);
#ifdef ESP8266

View File

@ -378,13 +378,8 @@ const char kWebColors[] PROGMEM =
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
//#ifdef ESP8266
//#define AGPIO(x) (x)
//#define BGPIO(x) (x)
//#else // ESP32
#define AGPIO(x) (x<<5)
#define BGPIO(x) (x>>5)
//#endif // ESP8266 - ESP32
#ifdef USE_DEVICE_GROUPS
#define SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, ...) _SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, __VA_ARGS__, 0)

View File

@ -20,7 +20,7 @@
#ifndef _TASMOTA_VERSION_H_
#define _TASMOTA_VERSION_H_
const uint32_t VERSION = 0x08050001;
const uint32_t VERSION = 0x09000001;
// Lowest compatible version
const uint32_t VERSION_COMPATIBLE = 0x07010006;