diff --git a/platformio.ini b/platformio.ini index a316f30..3bc5803 100644 --- a/platformio.ini +++ b/platformio.ini @@ -16,6 +16,7 @@ custom_prog_version = 2.14.0 build_flags = -DVERSION=${this.custom_prog_version} -DPIO_SRC_NAM="Daly2MQTT" + -DESP8266 -DATOMIC_FS_UPDATE extra_scripts = pre:tools/mini_html.py pre:tools/pre_compile.py post:tools/post_compile.py diff --git a/src/webpages/HTML_SETTINGS.html b/src/webpages/HTML_SETTINGS.html index 677eab8..67fc86d 100644 --- a/src/webpages/HTML_SETTINGS.html +++ b/src/webpages/HTML_SETTINGS.html @@ -6,7 +6,7 @@

Settings

- +
diff --git a/tools/post_compile.py b/tools/post_compile.py index b890cc9..e9e0839 100644 --- a/tools/post_compile.py +++ b/tools/post_compile.py @@ -1,6 +1,7 @@ Import("env") import os import shutil +import gzip def post_program_action(source, target, env): @@ -24,5 +25,6 @@ def post_program_action(source, target, env): # copy the target file to the destination, if it exist if os.path.exists(targetfile): shutil.copy(targetfile, destpath) + with open(destpath+'/'+filename, 'rb') as src, gzip.open(destpath+'/'+os.path.splitext(filename)[0]+'_OTA.bin.gz', 'wb') as dst: dst.writelines(src) env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", post_program_action)