revert to upstream
This commit is contained in:
parent
1becfcd07d
commit
7c7251aeae
|
@ -21,5 +21,5 @@ jobs:
|
||||||
pip install -U platformio
|
pip install -U platformio
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
pio run -e m5stack-atom
|
pio run
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,12 @@ For details refer to the [example description](lib/exampletask/Readme.md).
|
||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
[20220308](../../releases/tag/20220308)
|
||||||
|
*********
|
||||||
|
* correctly handle select fields when importing the config
|
||||||
|
* better names for config save [#26](../../issues/26)
|
||||||
|
* remove -e in ci build [#30](../../issues/30)
|
||||||
|
|
||||||
[20220302](../../releases/tag/20220302)
|
[20220302](../../releases/tag/20220302)
|
||||||
*********
|
*********
|
||||||
* add export and import of config data.<br>
|
* add export and import of config data.<br>
|
||||||
|
|
|
@ -7,10 +7,13 @@
|
||||||
;
|
;
|
||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
default_envs = nodemcu32s_obp60
|
default_envs=
|
||||||
extra_configs =
|
m5stack-atom
|
||||||
|
m5stack-atom-canunit
|
||||||
|
m5stickc-atom-canunit
|
||||||
|
nodemcu-homberger
|
||||||
|
extra_configs=
|
||||||
lib/*task*/platformio.ini
|
lib/*task*/platformio.ini
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
|
@ -30,20 +33,18 @@ board_build.embed_files =
|
||||||
lib/generated/config.json.gz
|
lib/generated/config.json.gz
|
||||||
lib/generated/xdrconfig.json.gz
|
lib/generated/xdrconfig.json.gz
|
||||||
lib/generated/md5.js.gz
|
lib/generated/md5.js.gz
|
||||||
board_build.partitions = partitions_custom.csv
|
board_build.partitions = partitions_custom.csv
|
||||||
extra_scripts =
|
extra_scripts =
|
||||||
pre:extra_script.py
|
pre:extra_script.py
|
||||||
post:post.py
|
post:post.py
|
||||||
lib_ldf_mode = chain+
|
lib_ldf_mode = chain+
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
build_flags =
|
build_flags =
|
||||||
-D PIO_ENV_BUILD=$PIOENV
|
-D PIO_ENV_BUILD=$PIOENV
|
||||||
|
|
||||||
[env:m5stack-atom]
|
[env:m5stack-atom]
|
||||||
board = m5stack-atom
|
board = m5stack-atom
|
||||||
lib_deps =
|
lib_deps = ${env.lib_deps}
|
||||||
${env.lib_deps}
|
|
||||||
sstaub/Ticker@^4.4.0
|
|
||||||
build_flags =
|
build_flags =
|
||||||
-D BOARD_M5ATOM
|
-D BOARD_M5ATOM
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
|
@ -52,9 +53,7 @@ upload_protocol = esptool
|
||||||
|
|
||||||
[env:m5stack-atom-canunit]
|
[env:m5stack-atom-canunit]
|
||||||
board = m5stack-atom
|
board = m5stack-atom
|
||||||
lib_deps =
|
lib_deps = ${env.lib_deps}
|
||||||
${env.lib_deps}
|
|
||||||
sstaub/Ticker@^4.4.0
|
|
||||||
build_flags =
|
build_flags =
|
||||||
-D BOARD_M5ATOM_CANUNIT
|
-D BOARD_M5ATOM_CANUNIT
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
|
@ -63,9 +62,7 @@ upload_protocol = esptool
|
||||||
|
|
||||||
[env:m5stickc-atom-canunit]
|
[env:m5stickc-atom-canunit]
|
||||||
board = m5stick-c
|
board = m5stick-c
|
||||||
lib_deps =
|
lib_deps = ${env.lib_deps}
|
||||||
${env.lib_deps}
|
|
||||||
sstaub/Ticker@^4.4.0
|
|
||||||
build_flags =
|
build_flags =
|
||||||
-D BOARD_M5STICK_CANUNIT -D HAS_RTC -D HAS_M5LCD
|
-D BOARD_M5STICK_CANUNIT -D HAS_RTC -D HAS_M5LCD
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
|
@ -74,40 +71,9 @@ upload_protocol = esptool
|
||||||
|
|
||||||
[env:nodemcu-homberger]
|
[env:nodemcu-homberger]
|
||||||
board = nodemcu-32s
|
board = nodemcu-32s
|
||||||
lib_deps =
|
lib_deps = ${env.lib_deps}
|
||||||
${env.lib_deps}
|
|
||||||
sstaub/Ticker@^4.4.0
|
|
||||||
build_flags =
|
build_flags =
|
||||||
-D BOARD_HOMBERGER
|
-D BOARD_HOMBERGER
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
upload_port = /dev/esp32
|
upload_port = /dev/esp32
|
||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
|
|
||||||
[env:testboard]
|
|
||||||
board = m5stack-atom
|
|
||||||
lib_deps =
|
|
||||||
${env.lib_deps}
|
|
||||||
own_lib
|
|
||||||
sstaub/Ticker@^4.4.0
|
|
||||||
build_flags =
|
|
||||||
-D BOARD_TEST
|
|
||||||
${env.build_flags}
|
|
||||||
upload_port = /dev/esp32
|
|
||||||
upload_protocol = esptool
|
|
||||||
|
|
||||||
[env:nodemcu32s_obp60]
|
|
||||||
board_build.partitions = lib/obp60task/partitions_obp60.csv
|
|
||||||
board = nodemcu-32s
|
|
||||||
lib_deps =
|
|
||||||
${env.lib_deps}
|
|
||||||
lib_deps =
|
|
||||||
blemasle/MCP23017@2.0.0
|
|
||||||
adafruit/Adafruit BusIO@1.5.0
|
|
||||||
zinggjm/GxEPD@3.1.0
|
|
||||||
sstaub/Ticker@^4.4.0
|
|
||||||
build_flags =
|
|
||||||
-D BOARD_NODEMCU32S_OBP60
|
|
||||||
${env.build_flags}
|
|
||||||
upload_port = COM3
|
|
||||||
upload_protocol = esptool
|
|
||||||
monitor_speed = 115200
|
|
||||||
|
|
34
web/index.js
34
web/index.js
|
@ -857,15 +857,18 @@ function showXdrHelp(){
|
||||||
showOverlay(helpContent.innerHTML,true);
|
showOverlay(helpContent.innerHTML,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function formatDate(d){
|
function formatDateForFilename(usePrefix,d){
|
||||||
|
let rt="";
|
||||||
|
if (usePrefix){
|
||||||
|
let fwt=document.querySelector('.status-fwtype');
|
||||||
|
if (fwt) rt=fwt.textContent;
|
||||||
|
}
|
||||||
if (! d) d=new Date();
|
if (! d) d=new Date();
|
||||||
let rt=""+d.getFullYear();
|
[d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds()]
|
||||||
let v=d.getMonth();
|
.forEach(function(v){
|
||||||
if (v < 10) rt+="0"+v;
|
if (v < 10) rt+="0"+v;
|
||||||
else rt+=v;
|
else rt+=""+v;
|
||||||
v=d.getDate();
|
})
|
||||||
if (v < 10) rt+="0"+v;
|
|
||||||
else rt+=v;
|
|
||||||
return rt;
|
return rt;
|
||||||
}
|
}
|
||||||
function downloadData(data,name){
|
function downloadData(data,name){
|
||||||
|
@ -879,7 +882,7 @@ function downloadData(data,name){
|
||||||
function exportConfig(){
|
function exportConfig(){
|
||||||
let data=getAllConfigs(true);
|
let data=getAllConfigs(true);
|
||||||
if (! data) return;
|
if (! data) return;
|
||||||
downloadData(data,"config"+formatDate()+".json");
|
downloadData(data,formatDateForFilename(true)+".json");
|
||||||
}
|
}
|
||||||
function exportXdr(){
|
function exportXdr(){
|
||||||
let data={};
|
let data={};
|
||||||
|
@ -893,7 +896,7 @@ function exportXdr(){
|
||||||
}
|
}
|
||||||
data[name]=value;
|
data[name]=value;
|
||||||
})
|
})
|
||||||
downloadData(data,"xdr"+formatDate()+".json");
|
downloadData(data,"xdr"+formatDateForFilename(true)+".json");
|
||||||
}
|
}
|
||||||
function importJson(opt_keyPattern){
|
function importJson(opt_keyPattern){
|
||||||
let clazz='importJson';
|
let clazz='importJson';
|
||||||
|
@ -915,7 +918,7 @@ function importJson(opt_keyPattern){
|
||||||
alert("file contains invalid key "+k);
|
alert("file contains invalid key "+k);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let del=document.querySelector('input[name='+k+']');
|
let del=document.querySelector('[name='+k+']');
|
||||||
if (del){
|
if (del){
|
||||||
hasOverwrites=true;
|
hasOverwrites=true;
|
||||||
}
|
}
|
||||||
|
@ -924,9 +927,14 @@ function importJson(opt_keyPattern){
|
||||||
if (!confirm("overwrite existing data?")) return;
|
if (!confirm("overwrite existing data?")) return;
|
||||||
}
|
}
|
||||||
for (let k in idata){
|
for (let k in idata){
|
||||||
let del=document.querySelector('input[name='+k+']');
|
let del=document.querySelector('[name='+k+']');
|
||||||
if (del){
|
if (del){
|
||||||
del.value=idata[k];
|
if (del.tagName === 'SELECT'){
|
||||||
|
setSelect(del,idata[k]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
del.value=idata[k];
|
||||||
|
}
|
||||||
let ev=new Event('change');
|
let ev=new Event('change');
|
||||||
del.dispatchEvent(ev);
|
del.dispatchEvent(ev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue