mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-05 14:56:32 +02:00
Add partition label argument to Update and ArduinoOTA classThe UpdateClass in the Updater component has the ability to update data toa SPIFFS partition. It selects the first available partition using theESP-IDF esp_partition_find_first() function.That behaviour is problematic if one has multiple SPIFFS partitions.This change allows a user to pass the label argument (defaults to NULL)to UpdateClass::begin() so a specific SPIFFS partition can be updated.Additionally, ArduinoOTA can set this partition label using thenew method ArduinoOTAClass::setPartitionLabel which is optional.This change does not break compatibility. (#4442)
The UpdateClass in the Updater component has the ability to update data to a SPIFFS partition. It selects the first available partition using the ESP-IDF esp_partition_find_first() function. That behaviour is problematic if one has multiple SPIFFS partitions. This change allows a user to pass the label argument (defaults to NULL) to UpdateClass::begin() so a specific SPIFFS partition can be updated. Additionally, ArduinoOTA can set this partition label using the new method ArduinoOTAClass::setPartitionLabel which is optional. This change does not break compatibility.
This commit is contained in:
@ -43,7 +43,7 @@ class UpdateClass {
|
||||
Call this to check the space needed for the update
|
||||
Will return false if there is not enough space
|
||||
*/
|
||||
bool begin(size_t size=UPDATE_SIZE_UNKNOWN, int command = U_FLASH, int ledPin = -1, uint8_t ledOn = LOW);
|
||||
bool begin(size_t size=UPDATE_SIZE_UNKNOWN, int command = U_FLASH, int ledPin = -1, uint8_t ledOn = LOW, const char *label = NULL);
|
||||
|
||||
/*
|
||||
Writes a buffer to the flash and increments the address
|
||||
|
Reference in New Issue
Block a user