Skip to content

Commit c08561f

Browse files
committed
Bump version to v11.1.0.4
- Restructure tasmota
1 parent 6d58e80 commit c08561f

File tree

332 files changed

+2111
-2112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+2111
-2112
lines changed

include/tasmota_options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
#define __TASMOTA_INCLUDE__
2222

2323
#include "../tasmota/my_user_config.h"
24-
#include "../tasmota/tasmota_configurations.h"
24+
#include "../tasmota/include/tasmota_configurations.h"
2525

2626
#endif // __TASMOTA_INCLUDE__

lib/libesp32/berry/default/berry_conf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#ifdef COMPILE_BERRY_LIB
1414
#include "my_user_config.h"
15-
#include "tasmota_configurations.h"
15+
#include "include/tasmota_configurations.h"
1616
#endif
1717

1818
/* Macro: BE_DEBUG

pio-tools/pre_source_dir.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def FindInoNodes(env):
77
src_dir = glob.escape(env.subst("$PROJECT_SRC_DIR"))
88
return env.Glob(os.path.join(src_dir, "*.ino")) + env.Glob(
9-
os.path.join(src_dir, "ino_*", "*.ino")
9+
os.path.join(src_dir, "tasmota_*", "*.ino")
1010
)
1111

1212
env.AddMethod(FindInoNodes)

tasmota/berry/berry_tasmota_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Configuration
22

33
#include "my_user_config.h"
4-
#include "tasmota_configurations.h"
4+
#include "include/tasmota_configurations.h"
File renamed without changes.

tasmota/local_ca_data_sample.h tasmota/include/local_ca_data_sample.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ Be sure to generate both files: local_ca_data.h, and local_ca_descriptor.h
3737
//
3838
// this is what the result will look like, except there will be
3939
// a lot of data bytes defined in the first three arrays
40-
//
41-
static const unsigned char PROGMEM TA0_DN[] = {
42-
// variable number of bytes go here (typically 100-140 or so) for the DN
43-
};
44-
45-
static const unsigned char PROGMEM TA0_RSA_N[] = {
46-
// 256 bytes go here for the public key modulus
47-
};
48-
49-
static const unsigned char PROGMEM TA0_RSA_E[] = {
50-
// 3 bytes go here for the public key exponent
51-
};
40+
//
41+
static const unsigned char PROGMEM TA0_DN[] = {
42+
// variable number of bytes go here (typically 100-140 or so) for the DN
43+
};
44+
45+
static const unsigned char PROGMEM TA0_RSA_N[] = {
46+
// 256 bytes go here for the public key modulus
47+
};
48+
49+
static const unsigned char PROGMEM TA0_RSA_E[] = {
50+
// 3 bytes go here for the public key exponent
51+
};

tasmota/local_ca_descriptor_sample.h tasmota/include/local_ca_descriptor_sample.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ Be sure to generate both files: local_ca_data.h, and local_ca_descriptor.h
3737
//
3838
// this is what the result will look like
3939
//
40-
{
41-
{ (unsigned char *)TA0_DN, sizeof TA0_DN },
42-
BR_X509_TA_CA,
43-
{
44-
BR_KEYTYPE_RSA,
45-
{ .rsa = {
46-
(unsigned char *)TA0_RSA_N, sizeof TA0_RSA_N,
47-
(unsigned char *)TA0_RSA_E, sizeof TA0_RSA_E,
48-
} }
49-
}
50-
}
40+
{
41+
{ (unsigned char *)TA0_DN, sizeof TA0_DN },
42+
BR_X509_TA_CA,
43+
{
44+
BR_KEYTYPE_RSA,
45+
{ .rsa = {
46+
(unsigned char *)TA0_RSA_N, sizeof TA0_RSA_N,
47+
(unsigned char *)TA0_RSA_E, sizeof TA0_RSA_E,
48+
} }
49+
}
50+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tasmota/tasmota_globals.h tasmota/include/tasmota_globals.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ String EthernetMacAddress(void);
6363
* Preconfigured configurations
6464
\*********************************************************************************************/
6565

66-
#include "tasmota_configurations.h" // Preconfigured configurations
66+
#include "include/tasmota_configurations.h" // Preconfigured configurations
6767

6868
/*********************************************************************************************\
6969
* ESP8266 specific parameters

tasmota/tasmota_template.h tasmota/include/tasmota_template.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ typedef struct MYTMPLT {
12391239
//********************************************************************************************
12401240

12411241
#ifdef ESP8266
1242-
#include "tasmota_template_legacy.h"
1242+
#include "include/tasmota_template_legacy.h"
12431243

12441244
/********************************************************************************************\
12451245
* ESP8266 Module Templates
File renamed without changes.

tasmota/settings.h tasmota/include/tasmota_types.h

+5-70
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
settings.h - setting variables for Tasmota
2+
tasmota_types.h - setting variables for Tasmota
33
44
Copyright (C) 2021 Theo Arends
55
@@ -17,10 +17,8 @@
1717
along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
1919

20-
#ifndef _SETTINGS_H_
21-
#define _SETTINGS_H_
22-
23-
const uint8_t PARAM8_SIZE = 18; // Number of param bytes (SetOption)
20+
#ifndef _TASMOTA_TYPES_H_
21+
#define _TASMOTA_TYPES_H_
2422

2523
// Bitfield to be used for any SetOption0 .. SetOption31 persistent single bit
2624
typedef union { // Restricted by MISRA-C Rule 18.4 but so useful...
@@ -490,6 +488,7 @@ typedef union {
490488

491489
const uint32_t settings_text_size = 699; // Settings->text_pool[size] = Settings->display_model (2D2) - Settings->text_pool (017)
492490
const uint8_t MAX_TUYA_FUNCTIONS = 16;
491+
const uint8_t PARAM8_SIZE = 18; // Number of param bytes (SetOption)
493492

494493
typedef struct {
495494
uint16_t cfg_holder; // 000 v6 header
@@ -867,70 +866,6 @@ typedef struct {
867866

868867
static_assert(sizeof(TSettings) == 4096, "TSettings Size is not correct");
869868

870-
typedef struct {
871-
uint16_t valid; // 280 (RTC memory offset 100 - sizeof(RTCRBT))
872-
uint8_t fast_reboot_count; // 282
873-
uint8_t free_003[1]; // 283
874-
} TRtcReboot;
875-
TRtcReboot RtcReboot;
876-
#ifdef ESP32
877-
RTC_NOINIT_ATTR TRtcReboot RtcDataReboot;
878-
#endif // ESP32
879-
880-
typedef struct {
881-
uint16_t valid; // 290 (RTC memory offset 100)
882-
uint8_t oswatch_blocked_loop; // 292
883-
uint8_t ota_loader; // 293
884-
uint32_t energy_kWhtoday; // 294
885-
uint32_t energy_kWhtotal; // 298
886-
volatile uint32_t pulse_counter[MAX_COUNTERS]; // 29C - See #9521 why volatile
887-
power_t power; // 2AC
888-
EnergyUsage energy_usage; // 2B0
889-
uint32_t nextwakeup; // 2C8
890-
uint32_t baudrate; // 2CC
891-
uint32_t ultradeepsleep; // 2D0
892-
uint16_t deepsleep_slip; // 2D4
893-
uint8_t improv_state; // 2D6
894-
895-
uint8_t free_2d7[1]; // 2D7
896-
897-
int32_t energy_kWhtoday_ph[3]; // 2D8
898-
int32_t energy_kWhtotal_ph[3]; // 2E4
899-
int32_t energy_kWhexport_ph[3]; // 2F0
900-
901-
uint8_t free_2fc[4]; // 2FC
902-
} TRtcSettings;
903-
TRtcSettings RtcSettings;
904-
#ifdef ESP32
905-
RTC_NOINIT_ATTR TRtcSettings RtcDataSettings;
906-
#endif // ESP32
907-
908-
struct TIME_T {
909-
uint8_t second;
910-
uint8_t minute;
911-
uint8_t hour;
912-
uint8_t day_of_week; // sunday is day 1
913-
uint8_t day_of_month;
914-
uint8_t month;
915-
char name_of_month[4];
916-
uint16_t day_of_year;
917-
uint16_t year;
918-
uint32_t days;
919-
uint32_t valid;
920-
} RtcTime;
921-
922-
struct XDRVMAILBOX {
923-
bool grpflg;
924-
bool usridx;
925-
uint16_t command_code;
926-
uint32_t index;
927-
uint32_t data_len;
928-
int32_t payload;
929-
char *topic;
930-
char *data;
931-
char *command;
932-
} XdrvMailbox;
933-
934869
typedef union { // Restricted by MISRA-C Rule 18.4 but so useful...
935870
uint16_t data; // Allow bit manipulation
936871
struct {
@@ -974,4 +909,4 @@ typedef union {
974909
#endif
975910
#endif
976911

977-
#endif // _SETTINGS_H_
912+
#endif // _TASMOTA_TYPES_H_

tasmota/tasmota_version.h tasmota/include/tasmota_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
#ifndef _TASMOTA_VERSION_H_
2121
#define _TASMOTA_VERSION_H_
2222

23-
const uint32_t VERSION = 0x0B010003; // 11.1.0.3
23+
const uint32_t VERSION = 0x0B010004; // 11.1.0.4
2424

2525
#endif // _TASMOTA_VERSION_H_
File renamed without changes.
File renamed without changes.

tasmota/tasmota.ino

+71-7
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
#ifndef ESP32_STAGE // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
2222
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_7_1)
2323
#endif // ESP32_STAGE
24-
#include "tasmota_compat.h"
25-
#include "tasmota_version.h" // Tasmota version information
26-
#include "tasmota.h" // Enumeration used in my_user_config.h
24+
#include "include/tasmota_compat.h"
25+
#include "include/tasmota_version.h" // Tasmota version information
26+
#include "include/tasmota.h" // Enumeration used in my_user_config.h
2727
#include "my_user_config.h" // Fixed user configurable options
2828
#ifdef USE_TLS
2929
#include <t_bearssl.h> // We need to include before "tasmota_globals.h" to take precedence over the BearSSL version in Arduino
3030
#endif // USE_TLS
31-
#include "tasmota_globals.h" // Function prototypes and global configuration
32-
#include "i18n.h" // Language support configured by my_user_config.h
33-
#include "tasmota_template.h" // Hardware configuration
31+
#include "include/tasmota_globals.h" // Function prototypes and global configuration
32+
#include "include/i18n.h" // Language support configured by my_user_config.h
33+
#include "include/tasmota_template.h" // Hardware configuration
3434

3535
// Libraries
3636
#include <ESP8266HTTPClient.h> // Ota
@@ -83,7 +83,7 @@
8383
#endif // USE_UFILESYS
8484

8585
// Structs
86-
#include "settings.h"
86+
#include "include/tasmota_types.h"
8787

8888
#ifdef CONFIG_IDF_TARGET_ESP32
8989
#include "soc/efuse_reg.h"
@@ -95,6 +95,70 @@
9595

9696
const uint32_t VERSION_MARKER[] PROGMEM = { 0x5AA55AA5, 0xFFFFFFFF, 0xA55AA55A };
9797

98+
typedef struct {
99+
uint16_t valid; // 280 (RTC memory offset 100 - sizeof(RTCRBT))
100+
uint8_t fast_reboot_count; // 282
101+
uint8_t free_003[1]; // 283
102+
} TRtcReboot;
103+
TRtcReboot RtcReboot;
104+
#ifdef ESP32
105+
RTC_NOINIT_ATTR TRtcReboot RtcDataReboot;
106+
#endif // ESP32
107+
108+
typedef struct {
109+
uint16_t valid; // 290 (RTC memory offset 100)
110+
uint8_t oswatch_blocked_loop; // 292
111+
uint8_t ota_loader; // 293
112+
uint32_t energy_kWhtoday; // 294
113+
uint32_t energy_kWhtotal; // 298
114+
volatile uint32_t pulse_counter[MAX_COUNTERS]; // 29C - See #9521 why volatile
115+
power_t power; // 2AC
116+
EnergyUsage energy_usage; // 2B0
117+
uint32_t nextwakeup; // 2C8
118+
uint32_t baudrate; // 2CC
119+
uint32_t ultradeepsleep; // 2D0
120+
uint16_t deepsleep_slip; // 2D4
121+
uint8_t improv_state; // 2D6
122+
123+
uint8_t free_2d7[1]; // 2D7
124+
125+
int32_t energy_kWhtoday_ph[3]; // 2D8
126+
int32_t energy_kWhtotal_ph[3]; // 2E4
127+
int32_t energy_kWhexport_ph[3]; // 2F0
128+
129+
uint8_t free_2fc[4]; // 2FC
130+
} TRtcSettings;
131+
TRtcSettings RtcSettings;
132+
#ifdef ESP32
133+
RTC_NOINIT_ATTR TRtcSettings RtcDataSettings;
134+
#endif // ESP32
135+
136+
struct TIME_T {
137+
uint8_t second;
138+
uint8_t minute;
139+
uint8_t hour;
140+
uint8_t day_of_week; // sunday is day 1
141+
uint8_t day_of_month;
142+
uint8_t month;
143+
char name_of_month[4];
144+
uint16_t day_of_year;
145+
uint16_t year;
146+
uint32_t days;
147+
uint32_t valid;
148+
} RtcTime;
149+
150+
struct XDRVMAILBOX {
151+
bool grpflg;
152+
bool usridx;
153+
uint16_t command_code;
154+
uint32_t index;
155+
uint32_t data_len;
156+
int32_t payload;
157+
char *topic;
158+
char *data;
159+
char *command;
160+
} XdrvMailbox;
161+
98162
WiFiUDP PortUdp; // UDP Syslog and Alexa
99163

100164
#ifdef ESP32
File renamed without changes.
File renamed without changes.

tasmota/sendemail_ESP8266.ino tasmota/tasmota_support/sendemail_ESP8266.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifdef ESP8266
22
#ifdef USE_SENDMAIL
3-
#include "sendemail_ESP8266.h"
3+
#include "include/sendemail_ESP8266.h"
44

55
// enable serial debugging
66
//#define DEBUG_EMAIL_PORT
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)