Allows for all template features
This commit is contained in:
@@ -9,8 +9,6 @@ const config = {
|
||||
|
||||
kit: {
|
||||
adapter: adapter({
|
||||
pages: 'build',
|
||||
assets: 'build',
|
||||
pages: '../esp32/www',
|
||||
assets: '../esp32/www',
|
||||
fallback: 'index.html',
|
||||
|
||||
@@ -4,5 +4,5 @@ build_flags =
|
||||
-D ESP32SVELTEKIT_RUNNING_CORE=0
|
||||
-D EMBED_WWW
|
||||
-D ENABLE_CORS
|
||||
-D SERIAL_INFO
|
||||
;-D SERIAL_INFO
|
||||
-D CORS_ORIGIN=\"*\"
|
||||
+8
-6
@@ -1,8 +1,10 @@
|
||||
[features]
|
||||
build_flags =
|
||||
-D USE_BATTERY=1
|
||||
-D USE_NTP=1
|
||||
-D USE_SECURITY=1
|
||||
-D USE_UPLOAD_FIRMWARE=1
|
||||
-D USE_DOWNLOAD_FIRMWARE=1
|
||||
-D USE_ANALYTICS=1
|
||||
-D FT_BATTERY=0
|
||||
-D FT_NTP=1
|
||||
-D FT_SECURITY=1
|
||||
-D FT_MQTT=0
|
||||
-D FT_SLEEP=0
|
||||
-D FT_UPLOAD_FIRMWARE=1
|
||||
-D FT_DOWNLOAD_FIRMWARE=1
|
||||
-D FT_ANALYTICS=1
|
||||
|
||||
@@ -30,7 +30,7 @@ build_flags =
|
||||
${features.build_flags}
|
||||
${build_settings.build_flags}
|
||||
-D CORE_DEBUG_LEVEL=5
|
||||
-D register=
|
||||
; -D register=
|
||||
-std=gnu++17
|
||||
build_unflags = -std=gnu++11
|
||||
test_ignore = test_embedded
|
||||
@@ -38,8 +38,6 @@ board_build.filesystem = littlefs
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson@^6.21.2
|
||||
https://github.com/theelims/PsychicMqttClient.git
|
||||
;hoeken/PsychicHttp
|
||||
; https://github.com/me-no-dev/ESPAsyncWebServer.git
|
||||
; thomasfredericks/Bounce2@ ^2.7.0
|
||||
; teckel12/NewPing@^1.9.7
|
||||
; adafruit/Adafruit SSD1306@^2.5.7
|
||||
@@ -59,6 +57,7 @@ extra_scripts =
|
||||
scripts/rename_fw.py
|
||||
board_build.embed_files = src/certs/x509_crt_bundle.bin
|
||||
board_ssl_cert_source = adafruit
|
||||
lib_compat_mode = strict
|
||||
|
||||
[env:esp32cam]
|
||||
board = esp32cam
|
||||
|
||||
@@ -52,9 +52,6 @@ def gzip_file(file):
|
||||
copyfileobj(f_in, f_out)
|
||||
os.remove(file)
|
||||
|
||||
def is_compressed(filetype):
|
||||
return filetype.lower() in ['zip', 'gz', 'rar', '7z', 'jpg', 'jpeg', 'png', 'mp4', 'mp3']
|
||||
|
||||
def flag_exists(flag):
|
||||
for define in buildFlags.get("CPPDEFINES"):
|
||||
if (define == flag or (isinstance(define, list) and define[0] == flag)):
|
||||
@@ -76,7 +73,7 @@ def build_progmem():
|
||||
|
||||
progmem.write(f'// {asset_path}\n')
|
||||
progmem.write(f'const uint8_t {asset_var}[] = {{\n ')
|
||||
file_data = gzip.compress(path.read_bytes()) if not is_compressed(filetype) else path.read_bytes()
|
||||
file_data = gzip.compress(path.read_bytes())
|
||||
|
||||
for i, byte in enumerate(file_data):
|
||||
if i and not (i % 16):
|
||||
|
||||
Reference in New Issue
Block a user