746a8badac
* Initial version of the PIR Staircase wipe up/down. * Add pulldown reminder * Workaround for missing D6 and D7 definitions on esp32dev * Add pinouts for d1 mini (esp8266 and esp32) and NodeMCU (and Arduino) * These IO pins on all these boards... NodeMCU and d1_mini esp32 supported. The others? Fingers crossed. * Changed to not collide with led strip pins * PIR on GPIO 15 and 16 on esp32 d1 mini * Removed PIN number ifdefs, it is impossible to match all boards * Settings in flash, info and API * Update README.md * Small doc changes * Improved README * Fixed error in reading configuration * Add API documentation * Documentation and code cleanup * Add enable/disable to API settings * Restore segment state when disabling plugin * Add debounce * Set segments in animation mode * Set segments in animation mode * Add support for HR04 sensors * Add preliminary description for using an HR04 sensor * Fixed typenumber and linked to datasheet * Moved config away from defines to prevent user error * Trigger Sensors through API * Rename scripts folder so that it's name doesn't clash with the `pio` command (prevents platformIO in VSCode to work properly on Mac) * Bugfix for detection problems * Separated config from code * Renamed Signal to Trigger pin * Filename adjusted * Clarifications and additions to README * Fixed references to pio scripts * Fixed API trigger bug * Adjustments to README.md * More efficient use of flash cycles, better naming * Bugfix: bottom sensor was not read properly * Renamed to Animated_Staircase * Add note on ultrasonic sensor and esp32 * Better naming of defines * Bugfix: Swipe down started with two steps. * Removed upload port in nodemcuv2 section Co-authored-by: Rolf <rolf@phobos.local> Co-authored-by: Rolf <>
24 lines
767 B
Python
24 lines
767 B
Python
Import('env')
|
|
import os
|
|
import shutil
|
|
import gzip
|
|
|
|
OUTPUT_DIR = "build_output{}".format(os.path.sep)
|
|
|
|
def bin_gzip(source, target, env):
|
|
variant = str(target[0]).split(os.path.sep)[2]
|
|
|
|
# create string with location and file names based on variant
|
|
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
|
|
gzip_file = "{}firmware{}{}.bin.gz".format(OUTPUT_DIR, os.path.sep, variant)
|
|
|
|
# check if new target files exist and remove if necessary
|
|
if os.path.isfile(gzip_file): os.remove(gzip_file)
|
|
|
|
# write gzip firmware file
|
|
with open(bin_file,"rb") as fp:
|
|
with gzip.open(gzip_file, "wb", compresslevel = 9) as f:
|
|
shutil.copyfileobj(fp, f)
|
|
|
|
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_gzip])
|