Skip to content

Commit 5e0be79

Browse files
committed
#### v0.2.3
- Add links to IP addresses - Intelhex moved to lib folder - Some code cleanup - MQTT icon update #### v0.2.2 - Add WireGuard VPN support - Fix Zigbee version check while starting #### v0.2.1 - Add Zigbee chip delect (beta) - Fix typo
1 parent 3040b15 commit 5e0be79

18 files changed

+53
-113
lines changed

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.DS_Store
1+
**/.DS_Store
22
.pio
33
.vscode
44
.gcc-flags.json
@@ -9,4 +9,6 @@ gzipped
99
webh
1010
*.code-workspace
1111
logs
12-
todo
12+
todo
13+
!lib
14+
!platformio.ini

bin/UZG-01.bin

976 Bytes
Binary file not shown.
Binary file not shown.

lib/.DS_Store

-6 KB
Binary file not shown.

lib/CC26XX/.DS_Store

-6 KB
Binary file not shown.

lib/WireGuard-ESP32/.DS_Store

-6 KB
Binary file not shown.

src/intelhex.cpp lib/intelhex/src/intelhex.cpp

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#include "intelhex.h"
2-
#include "config.h"
3-
42
/*
53
* IntelHex Arduino Library
64
*
@@ -25,6 +23,20 @@ TO-DO List
2523
2624
*/
2725

26+
27+
#ifndef DEBUG_PRINT
28+
#ifdef DEBUG
29+
#define DEBUG_PRINT(x) Serial.print(String(x))
30+
#define DEBUG_PRINTLN(x) Serial.println(String(x))
31+
#else
32+
#define DEBUG_PRINT(x)
33+
#define DEBUG_PRINTLN(x)
34+
#endif
35+
#endif
36+
37+
38+
39+
2840
IntelHex::IntelHex(const char *filename) : _filename(filename) {}
2941

3042
IntelHex::~IntelHex()
File renamed without changes.

src/intelhex2.cpp.bak

-91
This file was deleted.

src/version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
// AUTO GENERATED FILE, DO NOT EDIT
33
#ifndef VERSION
4-
#define VERSION "0.2.2"
4+
#define VERSION "0.2.3"
55
#endif
66
#ifndef BUILD_TIMESTAMP
7-
#define BUILD_TIMESTAMP "2024-03-15 16:19:42.545675"
7+
#define BUILD_TIMESTAMP "2024-03-16 22:23:51.598701"
88
#endif
99

src/websrc/html/PAGE_LOADER.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ <h2 data-replace="pageName" class="position-absolute top-50 start-50 translate-m
133133
<li class='nav-item'>
134134
<a href='/mqtt' class='nav-link align-middle'>
135135
<svg xmlns='http://www.w3.org/2000/svg' width='25' height='25' fill='currentColor'
136-
class='bi bi-boxes' viewBox='0 0 16 16'>
137-
<use xlink:href="icons.svg#boxes" />
136+
class='bi bi-mqtt' viewBox='0 0 16 16'>
137+
<use xlink:href="icons.svg#mqtt" />
138138
</svg>
139139
<span class='ms-1 d-none d-sm-inline'>MQTT</span>
140140
</a>

src/websrc/html/PAGE_MQTT.html

+1-7
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,8 @@
4141
placeholder="60">
4242
</div>
4343

44-
<!-- <div class='mb-2'>
45-
<label for='gateway'>Gateway</label>
46-
<input data-replace="GWEther" type='text' class='form-control' id='EthGateway' name='ipGW'
47-
placeholder="192.168.x.x">
48-
</div> !-->
49-
5044
<div class='mb-2 form-check form-switch'>
51-
<label class='form-check-label' for='discovery'>Discovery</label>
45+
<label class='form-check-label' for='discovery'>Home Assistant - Auto Discovery 💡</label>
5246
<input data-replace="discoveryMqtt" class='form-check-input' id='MqttDiscovery'
5347
type='checkbox' role="switch" name='MqttDiscovery'>
5448
</div>

src/websrc/img/icons.svg

+2-1
Loading

src/websrc/js/functions.js

+18-3
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,20 @@ function apiGetPage(page, doneCall) {
379379
for (const property in values) {
380380
$("[data-replace='" + property + "']").map(function () {
381381
const elemType = $(this).prop('nodeName').toLowerCase();
382+
let valueToSet = values[property];
383+
384+
// Проверка на содержание IP-адреса в значении и отсутствие слова "mask" в названии свойства
385+
const isIpValue = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/.test(valueToSet);
386+
const isMaskInPropertyName = property.toLowerCase().includes('mask');
387+
388+
if (isIpValue && !isMaskInPropertyName) {
389+
valueToSet = '<a href="http://' + valueToSet + '">' + valueToSet + '</a>';
390+
}
391+
382392
switch (elemType) {
383-
case "input" || "select" || "textarea":
393+
case "input":
394+
case "select":
395+
case "textarea":
384396
const type = $(this).prop('type').toLowerCase();
385397
if (elemType == "input" && (type == "checkbox" || type == "radio")) {
386398
$(this).prop("checked", values[property]);
@@ -391,9 +403,12 @@ function apiGetPage(page, doneCall) {
391403
case "option":
392404
$(this).prop("selected", true);
393405
break;
394-
395406
default:
396-
$(this).text(values[property]);
407+
if (isIpValue && !isMaskInPropertyName) {
408+
$(this).html(valueToSet); // Использование .html() для вставки гиперссылки
409+
} else {
410+
$(this).text(valueToSet); // Использование .text() для обычного текста
411+
}
397412
break;
398413
}
399414
});

src/zb.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ void zbLedToggle()
185185
}
186186
}
187187

188+
/*
188189
void getZbChip()
189190
{
190191
zigbeeEnableBSL();
@@ -220,7 +221,7 @@ void getZbChip()
220221
}
221222
zigbeeRestart();
222223
}
223-
224+
*/
224225

225226
void preParse()
226227
{

src/zb.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
void clearS2Buffer();
22
void getZbVer();
33
void zbCheck();
4-
void getZbChip();
4+
//void getZbChip();
55
void zbLedToggle();
66
void checkFwHex(const char *tempFile);
77

tools/commit.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
git add -A
2+
git commit -F ../commit
3+
version=$(cat version)
4+
git tag "v$version"
5+
git push
6+
git push origin "v$version"

tools/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.2
1+
0.2.3

0 commit comments

Comments
 (0)