Compare commits
	
		
			14 Commits
		
	
	
		
			v1.3.40
			...
			04a7c2cce3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 04a7c2cce3 | |||
| 78f54b72fd | |||
| f4eee9af91 | |||
| cad14b3bc2 | |||
| 312f75fc5f | |||
| b8714e93e2 | |||
| cd9da0fe4f | |||
| 2b620ef5ed | |||
| 3f63a01b8b | |||
| 22bb16b6a4 | |||
| 53ceee7816 | |||
| d48b002806 | |||
| dd905b6c6e | |||
| 77b9eda110 | 
							
								
								
									
										6
									
								
								.github/workflows/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							@@ -40,10 +40,8 @@ jobs:
 | 
			
		||||
        # Copy firmware binary
 | 
			
		||||
        cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${VERSION}.bin
 | 
			
		||||
        
 | 
			
		||||
        # Create SPIFFS binary with minimal ESP32 image header (chip version set to max supported)
 | 
			
		||||
        echo -ne '\xE9\x01\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00' > .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
 | 
			
		||||
        # Append the actual SPIFFS data
 | 
			
		||||
        cat .pio/build/esp32dev/spiffs.bin >> .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin 2>/dev/null
 | 
			
		||||
        # Create SPIFFS binary (without header)
 | 
			
		||||
        cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
 | 
			
		||||
        
 | 
			
		||||
        # Create full binary
 | 
			
		||||
        (cd .pio/build/esp32dev && 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								.github/workflows/github-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/github-release.yml
									
									
									
									
										vendored
									
									
								
							@@ -47,10 +47,8 @@ jobs:
 | 
			
		||||
        # Copy firmware binary
 | 
			
		||||
        cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${VERSION}.bin
 | 
			
		||||
        
 | 
			
		||||
        # Create SPIFFS binary with minimal ESP32 image header (chip version set to max supported)
 | 
			
		||||
        echo -ne '\xE9\x01\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00' > .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
 | 
			
		||||
        # Append the actual SPIFFS data
 | 
			
		||||
        cat .pio/build/esp32dev/spiffs.bin >> .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin 2>/dev/null
 | 
			
		||||
        # Create SPIFFS binary (without header)
 | 
			
		||||
        cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin
 | 
			
		||||
        
 | 
			
		||||
        # Create full binary (always)
 | 
			
		||||
        (cd .pio/build/esp32dev && 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										30
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -1,5 +1,35 @@
 | 
			
		||||
# Changelog
 | 
			
		||||
 | 
			
		||||
## [1.3.44] - 2025-02-22
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.44
 | 
			
		||||
- update header title to 'Hollo Lollo Trollo'
 | 
			
		||||
- update header title to 'Filament Management Tool' and improve update response messages
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [1.3.43] - 2025-02-22
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.43
 | 
			
		||||
- update header title to 'Hollo Lollo Trollo'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [1.3.42] - 2025-02-22
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.42
 | 
			
		||||
 | 
			
		||||
### Fixed
 | 
			
		||||
- correct path for SPIFFS binary creation in Gitea release workflow
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [1.3.41] - 2025-02-22
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.41
 | 
			
		||||
 | 
			
		||||
### Fixed
 | 
			
		||||
- remove redundant buffer size setting in NFC initialization
 | 
			
		||||
- update SPIFFS binary creation and enhance NFC buffer size
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [1.3.40] - 2025-02-22
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.40
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
            <img src="/logo.png" alt="FilaMan Logo" class="logo">
 | 
			
		||||
            <div class="logo-text">
 | 
			
		||||
                <h1>FilaMan<span class="version"></span></h1>
 | 
			
		||||
                <h4>Filament Management Tool</h4>
 | 
			
		||||
                <h4>Hollo Lollo Trollo</h4>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <nav style="display: flex; gap: 1rem;">
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
; https://docs.platformio.org/page/projectconf.html
 | 
			
		||||
 | 
			
		||||
[common]
 | 
			
		||||
version = "1.3.40"
 | 
			
		||||
version = "1.3.44"
 | 
			
		||||
 | 
			
		||||
#test
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,12 @@
 | 
			
		||||
void setup() {
 | 
			
		||||
  Serial.begin(115200);
 | 
			
		||||
 | 
			
		||||
  uint64_t chipid;
 | 
			
		||||
 | 
			
		||||
  chipid = ESP.getEfuseMac(); //The chip ID is essentially its MAC address(length: 6 bytes).
 | 
			
		||||
  Serial.printf("ESP32 Chip ID = %04X", (uint16_t)(chipid >> 32)); //print High 2 bytes
 | 
			
		||||
  Serial.printf("%08X\n", (uint32_t)chipid); //print Low 4bytes.
 | 
			
		||||
 | 
			
		||||
  // Initialize SPIFFS
 | 
			
		||||
  initializeSPIFFS();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -368,11 +368,11 @@ void setupWebserver(AsyncWebServer &server) {
 | 
			
		||||
        [](AsyncWebServerRequest *request) {
 | 
			
		||||
            // Nach Update-Abschluss
 | 
			
		||||
            bool success = !Update.hasError();
 | 
			
		||||
            String message = success ? "Update successful" : String("Update failed: ") + Update.errorString();
 | 
			
		||||
            AsyncWebServerResponse *response = request->beginResponse(
 | 
			
		||||
                success ? 200 : 400,
 | 
			
		||||
                "application/json",
 | 
			
		||||
                success ? "{\"success\":true,\"message\":\"Update successful\"}" 
 | 
			
		||||
                       : "{\"success\":false,\"message\":\"Update failed\"}"
 | 
			
		||||
                "{\"success\":" + String(success ? "true" : "false") + ",\"message\":\"" + message + "\"}"
 | 
			
		||||
            );
 | 
			
		||||
            response->addHeader("Connection", "close");
 | 
			
		||||
            request->send(response);
 | 
			
		||||
@@ -392,32 +392,46 @@ void setupWebserver(AsyncWebServer &server) {
 | 
			
		||||
 | 
			
		||||
            oledShowMessage("Upgrade please wait");
 | 
			
		||||
 | 
			
		||||
            // TODO: Backup
 | 
			
		||||
 | 
			
		||||
            if (!index) {
 | 
			
		||||
                updateSize = request->contentLength();
 | 
			
		||||
                command = (filename.indexOf("spiffs") > -1) ? U_SPIFFS : U_FLASH;
 | 
			
		||||
                Serial.printf("Update Start: %s\nSize: %u\nCommand: %d\n", filename.c_str(), updateSize, command);
 | 
			
		||||
                
 | 
			
		||||
                // Überprüfe die SPIFFS-Größe
 | 
			
		||||
                if (command == U_SPIFFS && updateSize > 0x30000) {
 | 
			
		||||
                    String errorMsg = "SPIFFS update too large. Maximum size is 192KB";
 | 
			
		||||
                    Serial.println(errorMsg);
 | 
			
		||||
                    request->send(400, "application/json", "{\"success\":false,\"message\":\"" + errorMsg + "\"}");
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (command == U_SPIFFS) {
 | 
			
		||||
                    // Backup JSON config files before SPIFFS update
 | 
			
		||||
                    Serial.println("Backup JSON configs...");
 | 
			
		||||
                    backupJsonConfigs();
 | 
			
		||||
                }
 | 
			
		||||
                    
 | 
			
		||||
                if (!Update.begin(updateSize, command)) {
 | 
			
		||||
                    if (command == U_SPIFFS) {
 | 
			
		||||
                        // Restore JSON config files if update fails at start
 | 
			
		||||
                    if (!Update.begin(updateSize, command, false)) {
 | 
			
		||||
                        Serial.printf("Update Begin Error: %s\n", Update.errorString());
 | 
			
		||||
                        Serial.println("Restoring JSON configs...");
 | 
			
		||||
                        restoreJsonConfigs();
 | 
			
		||||
                        String errorMsg = String("Update begin failed: ") + Update.errorString();
 | 
			
		||||
                        request->send(400, "application/json", "{\"success\":false,\"message\":\"" + errorMsg + "\"}");
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
                } else {
 | 
			
		||||
                    if (!Update.begin(updateSize, command)) {
 | 
			
		||||
                        Serial.printf("Update Begin Error: %s\n", Update.errorString());
 | 
			
		||||
                        String errorMsg = String("Update begin failed: ") + Update.errorString();
 | 
			
		||||
                        request->send(400, "application/json", "{\"success\":false,\"message\":\"" + errorMsg + "\"}");
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (len) {
 | 
			
		||||
                if (Update.write(data, len) != len) {
 | 
			
		||||
                    Serial.printf("Update Write Error: %s\n", Update.errorString());
 | 
			
		||||
                    if (command == U_SPIFFS) {
 | 
			
		||||
                        // Restore JSON config files if update fails during write
 | 
			
		||||
                        Serial.println("Restoring JSON configs...");
 | 
			
		||||
                        restoreJsonConfigs();
 | 
			
		||||
                    }
 | 
			
		||||
                    String errorMsg = String("Write failed: ") + Update.errorString();
 | 
			
		||||
@@ -425,21 +439,23 @@ void setupWebserver(AsyncWebServer &server) {
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
                // Sende den Fortschritt als JSON, um unerwünschte Zeilenumbrüche zu vermeiden
 | 
			
		||||
                Serial.printf("Progress: %u/%u\n", index + len, updateSize);
 | 
			
		||||
                String progress = "{\"progress\":" + String((index + len) * 100 / updateSize) + "}";
 | 
			
		||||
                request->send(200, "application/json", progress);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (final) {
 | 
			
		||||
                if (!Update.end(true)) {
 | 
			
		||||
                    Serial.printf("Update End Error: %s\n", Update.errorString());
 | 
			
		||||
                    if (command == U_SPIFFS) {
 | 
			
		||||
                        // Restore JSON config files if update fails at end
 | 
			
		||||
                        Serial.println("Restoring JSON configs...");
 | 
			
		||||
                        restoreJsonConfigs();
 | 
			
		||||
                    }
 | 
			
		||||
                    String errorMsg = String("Update end failed: ") + Update.errorString();
 | 
			
		||||
                    request->send(400, "application/json", "{\"success\":false,\"message\":\"" + errorMsg + "\"}");
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                Serial.println("Update Success!");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user