Compare commits
3 Commits
4e34aaa24a
...
4167a222d7
Author | SHA1 | Date | |
---|---|---|---|
4167a222d7 | |||
f9498dac7d | |||
b9f658b111 |
@ -534,7 +534,7 @@
|
||||
<div class="form-group row">
|
||||
<div class="custom-file">
|
||||
<input type="file" name="fw-update-file" class="custom-file-input" id="fw-update-file"
|
||||
accept=".fw.bin,.fs.bin" required />
|
||||
accept=".fw.bin,.fs.gz" required />
|
||||
<label class="custom-file-label" for="fw-update-file">Firmware-Update auswählen</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1 +1 @@
|
||||
1.01
|
||||
1.2
|
@ -31,6 +31,7 @@ build_flags =
|
||||
-DADMIN_PASSWORD=${wifi_cred.admin_password}
|
||||
-DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password}
|
||||
-DWIFI_AP_IP_GW=10,0,0,1
|
||||
-DATOMIC_FS_UPDATE
|
||||
-DFEATURE_ENABLE_WIFI_CLIENT
|
||||
-DFEATURE_ENABLE_REMOTE_DEBUG
|
||||
-DFEATURE_ENABLE_OLED
|
||||
|
@ -100,7 +100,17 @@ def gzip_webfiles(source, target, env):
|
||||
print('GZIP: Failure/Incomplete.\n')
|
||||
else:
|
||||
print('GZIP: Compressed correctly.\n')
|
||||
|
||||
return
|
||||
|
||||
def gzip_binffiles(source, target, env):
|
||||
littlefsbin = target[0].get_abspath()
|
||||
targetbin = os.path.join(os.path.dirname(littlefsbin), 'filesystem.fs')
|
||||
shutil.copyfile(littlefsbin, targetbin)
|
||||
gzip_file(targetbin, os.path.join(str(targetbin) + '.gz'))
|
||||
os.remove(targetbin)
|
||||
return
|
||||
|
||||
# IMPORTANT, this needs to be added to call the routine
|
||||
env.AddPreAction('$BUILD_DIR/littlefs.bin', gzip_webfiles)
|
||||
env.AddPostAction('$BUILD_DIR/littlefs.bin', gzip_binffiles)
|
||||
|
@ -26,10 +26,9 @@
|
||||
#define HOST_NAME "ChainLube_%06X" // Use printf-Formatting - Chip-ID (uin32_t) will be added
|
||||
#endif
|
||||
|
||||
#define SW_VERSION_MAJOR 1
|
||||
#define SW_VERSION_MINOR 1
|
||||
#define SW_VERSION 1.2
|
||||
|
||||
#define FLASH_FS_VERSION 1.1
|
||||
#define FLASH_FS_VERSION 1.2
|
||||
|
||||
#ifndef OTA_DELAY
|
||||
#define OTA_DELAY 50 // ticks -> 10ms / tick
|
||||
@ -51,6 +50,4 @@
|
||||
#define STARTUP_DELAY 5000
|
||||
#define SHUTDOWN_DELAY_MS 5000
|
||||
|
||||
#define ATOMIC_FS_UPDATE
|
||||
|
||||
#endif
|
@ -327,7 +327,7 @@ void RemotDebug_printSystemInfo()
|
||||
: "UNKNOWN"));
|
||||
debugA("OTA-Pass: %s", QUOTE(ADMIN_PASSWORD));
|
||||
debugA("Git-Revison: %s", GIT_REV);
|
||||
debugA("Sw-Version: %d.%02d", SW_VERSION_MAJOR, SW_VERSION_MINOR);
|
||||
debugA("Sw-Version: %s", QUOTE(SW_VERSION));
|
||||
}
|
||||
|
||||
void RemoteDebug_dumpConfig()
|
||||
|
@ -22,7 +22,7 @@ void initWebUI()
|
||||
|
||||
GetFlashVersion(globals.FlashVersion, sizeof(globals.FlashVersion));
|
||||
|
||||
if (!strcmp(globals.FlashVersion, QUOTE(FLASH_FS_VERSION)))
|
||||
if (strcmp(globals.FlashVersion, QUOTE(FLASH_FS_VERSION)))
|
||||
{
|
||||
MaintainDTC(DTC_FLASHFS_VERSION_ERROR, DTC_WARN, true);
|
||||
}
|
||||
@ -210,9 +210,7 @@ String processor(const String &var)
|
||||
return String(globals.systemStatustxt);
|
||||
if (var == "SW_VERSION")
|
||||
{
|
||||
char buffer[7];
|
||||
sprintf(buffer, "%d.%02d", SW_VERSION_MAJOR, SW_VERSION_MINOR);
|
||||
return String(buffer);
|
||||
return String(QUOTE(SW_VERSION));
|
||||
}
|
||||
if (var == "FS_VERSION")
|
||||
return String(globals.FlashVersion);
|
||||
@ -361,7 +359,6 @@ void WebserverFirmwareUpdate_Callback(AsyncWebServerRequest *request, const Stri
|
||||
{
|
||||
Serial.println("Update");
|
||||
size_t content_len = request->contentLength();
|
||||
// if filename includes spiffs, update the spiffs partition
|
||||
int cmd = (filename.indexOf(".fs") > -1) ? U_FS : U_FLASH;
|
||||
Update.runAsync(true);
|
||||
if (!Update.begin(content_len, cmd))
|
||||
|
Loading…
x
Reference in New Issue
Block a user