revert to upstream
This commit is contained in:
parent
1becfcd07d
commit
7c7251aeae
|
@ -21,5 +21,5 @@ jobs:
|
|||
pip install -U platformio
|
||||
- name: Build
|
||||
run: |
|
||||
pio run -e m5stack-atom
|
||||
pio run
|
||||
|
||||
|
|
|
@ -145,6 +145,12 @@ For details refer to the [example description](lib/exampletask/Readme.md).
|
|||
|
||||
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)
|
||||
*********
|
||||
* add export and import of config data.<br>
|
||||
|
|
|
@ -7,10 +7,13 @@
|
|||
;
|
||||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[platformio]
|
||||
default_envs = nodemcu32s_obp60
|
||||
extra_configs =
|
||||
default_envs=
|
||||
m5stack-atom
|
||||
m5stack-atom-canunit
|
||||
m5stickc-atom-canunit
|
||||
nodemcu-homberger
|
||||
extra_configs=
|
||||
lib/*task*/platformio.ini
|
||||
|
||||
[env]
|
||||
|
@ -41,9 +44,7 @@ build_flags =
|
|||
|
||||
[env:m5stack-atom]
|
||||
board = m5stack-atom
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
sstaub/Ticker@^4.4.0
|
||||
lib_deps = ${env.lib_deps}
|
||||
build_flags =
|
||||
-D BOARD_M5ATOM
|
||||
${env.build_flags}
|
||||
|
@ -52,9 +53,7 @@ upload_protocol = esptool
|
|||
|
||||
[env:m5stack-atom-canunit]
|
||||
board = m5stack-atom
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
sstaub/Ticker@^4.4.0
|
||||
lib_deps = ${env.lib_deps}
|
||||
build_flags =
|
||||
-D BOARD_M5ATOM_CANUNIT
|
||||
${env.build_flags}
|
||||
|
@ -63,9 +62,7 @@ upload_protocol = esptool
|
|||
|
||||
[env:m5stickc-atom-canunit]
|
||||
board = m5stick-c
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
sstaub/Ticker@^4.4.0
|
||||
lib_deps = ${env.lib_deps}
|
||||
build_flags =
|
||||
-D BOARD_M5STICK_CANUNIT -D HAS_RTC -D HAS_M5LCD
|
||||
${env.build_flags}
|
||||
|
@ -74,40 +71,9 @@ upload_protocol = esptool
|
|||
|
||||
[env:nodemcu-homberger]
|
||||
board = nodemcu-32s
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
sstaub/Ticker@^4.4.0
|
||||
lib_deps = ${env.lib_deps}
|
||||
build_flags =
|
||||
-D BOARD_HOMBERGER
|
||||
${env.build_flags}
|
||||
upload_port = /dev/esp32
|
||||
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);
|
||||
}
|
||||
}
|
||||
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();
|
||||
let rt=""+d.getFullYear();
|
||||
let v=d.getMonth();
|
||||
if (v < 10) rt+="0"+v;
|
||||
else rt+=v;
|
||||
v=d.getDate();
|
||||
if (v < 10) rt+="0"+v;
|
||||
else rt+=v;
|
||||
[d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds()]
|
||||
.forEach(function(v){
|
||||
if (v < 10) rt+="0"+v;
|
||||
else rt+=""+v;
|
||||
})
|
||||
return rt;
|
||||
}
|
||||
function downloadData(data,name){
|
||||
|
@ -879,7 +882,7 @@ function downloadData(data,name){
|
|||
function exportConfig(){
|
||||
let data=getAllConfigs(true);
|
||||
if (! data) return;
|
||||
downloadData(data,"config"+formatDate()+".json");
|
||||
downloadData(data,formatDateForFilename(true)+".json");
|
||||
}
|
||||
function exportXdr(){
|
||||
let data={};
|
||||
|
@ -893,7 +896,7 @@ function exportXdr(){
|
|||
}
|
||||
data[name]=value;
|
||||
})
|
||||
downloadData(data,"xdr"+formatDate()+".json");
|
||||
downloadData(data,"xdr"+formatDateForFilename(true)+".json");
|
||||
}
|
||||
function importJson(opt_keyPattern){
|
||||
let clazz='importJson';
|
||||
|
@ -915,7 +918,7 @@ function importJson(opt_keyPattern){
|
|||
alert("file contains invalid key "+k);
|
||||
return;
|
||||
}
|
||||
let del=document.querySelector('input[name='+k+']');
|
||||
let del=document.querySelector('[name='+k+']');
|
||||
if (del){
|
||||
hasOverwrites=true;
|
||||
}
|
||||
|
@ -924,9 +927,14 @@ function importJson(opt_keyPattern){
|
|||
if (!confirm("overwrite existing data?")) return;
|
||||
}
|
||||
for (let k in idata){
|
||||
let del=document.querySelector('input[name='+k+']');
|
||||
let del=document.querySelector('[name='+k+']');
|
||||
if (del){
|
||||
del.value=idata[k];
|
||||
if (del.tagName === 'SELECT'){
|
||||
setSelect(del,idata[k]);
|
||||
}
|
||||
else{
|
||||
del.value=idata[k];
|
||||
}
|
||||
let ev=new Event('change');
|
||||
del.dispatchEvent(ev);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue