mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
2
.github/workflows/pre_release.yml
vendored
2
.github/workflows/pre_release.yml
vendored
@@ -14,6 +14,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
|||||||
2
.github/workflows/tagged_release.yml
vendored
2
.github/workflows/tagged_release.yml
vendored
@@ -13,6 +13,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
|||||||
2
.github/workflows/test_release.yml
vendored
2
.github/workflows/test_release.yml
vendored
@@ -14,6 +14,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
],
|
],
|
||||||
|
|
||||||
build: {
|
build: {
|
||||||
target: 'es2022',
|
// target: 'es2022',
|
||||||
outDir: 'dist',
|
outDir: 'dist',
|
||||||
reportCompressedSize: false,
|
reportCompressedSize: false,
|
||||||
chunkSizeWarningLimit: 1024,
|
chunkSizeWarningLimit: 1024,
|
||||||
@@ -94,11 +94,11 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
sequences: true
|
sequences: true
|
||||||
},
|
},
|
||||||
mangle: {
|
mangle: {
|
||||||
toplevel: true,
|
// toplevel: true
|
||||||
module: true,
|
// module: true
|
||||||
properties: {
|
// properties: {
|
||||||
regex: /^_/
|
// regex: /^_/
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
ecma: 5,
|
ecma: 5,
|
||||||
enclose: false,
|
enclose: false,
|
||||||
|
|||||||
@@ -125,20 +125,21 @@ class Telegram {
|
|||||||
uint8_t num_bytes = (!s) ? sizeof(Value) : s;
|
uint8_t num_bytes = (!s) ? sizeof(Value) : s;
|
||||||
// check for out of bounds, if so don't modify the value
|
// check for out of bounds, if so don't modify the value
|
||||||
auto msg_size = (index - this->offset + num_bytes - 1);
|
auto msg_size = (index - this->offset + num_bytes - 1);
|
||||||
// TODO remove
|
|
||||||
Serial.print(" index: ");
|
#ifdef EMSESP_DEBUG
|
||||||
Serial.print(index);
|
// Serial.print(" index: ");
|
||||||
Serial.print(" offset: ");
|
// Serial.print(index);
|
||||||
Serial.print(offset);
|
// Serial.print(" offset: ");
|
||||||
Serial.print(" index: ");
|
// Serial.print(offset);
|
||||||
Serial.print(" message_length: ");
|
// Serial.print(" index: ");
|
||||||
Serial.print(this->message_length);
|
// Serial.print(" message_length: ");
|
||||||
Serial.print(" msg_size: ");
|
// Serial.print(this->message_length);
|
||||||
Serial.print(msg_size);
|
// Serial.print(" msg_size: ");
|
||||||
Serial.println();
|
// Serial.print(msg_size);
|
||||||
|
// Serial.println();
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((index < this->offset) || (msg_size >= this->message_length) || (msg_size > EMS_MAX_TELEGRAM_MESSAGE_LENGTH)) {
|
if ((index < this->offset) || (msg_size >= this->message_length) || (msg_size > EMS_MAX_TELEGRAM_MESSAGE_LENGTH)) {
|
||||||
Serial.println("Rejedcting!"); // TODO: remove
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
|
|
||||||
// #define EMSESP_DEBUG_DEFAULT "general"
|
#define EMSESP_DEBUG_DEFAULT "general"
|
||||||
|
|
||||||
// #define EMSESP_DEBUG_DEFAULT "thermostat"
|
// #define EMSESP_DEBUG_DEFAULT "thermostat"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "solar"
|
// #define EMSESP_DEBUG_DEFAULT "solar"
|
||||||
@@ -56,7 +56,7 @@ namespace emsesp {
|
|||||||
// #define EMSESP_DEBUG_DEFAULT "memory"
|
// #define EMSESP_DEBUG_DEFAULT "memory"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "coldshot"
|
// #define EMSESP_DEBUG_DEFAULT "coldshot"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "custom_entities"
|
// #define EMSESP_DEBUG_DEFAULT "custom_entities"
|
||||||
#define EMSESP_DEBUG_DEFAULT "heat_exchange"
|
// #define EMSESP_DEBUG_DEFAULT "heat_exchange"
|
||||||
|
|
||||||
|
|
||||||
class Test {
|
class Test {
|
||||||
|
|||||||
Reference in New Issue
Block a user