mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
enlarge filesystem buffer
This commit is contained in:
@@ -12,7 +12,7 @@ class FSPersistence {
|
|||||||
StatefulService<T> * statefulService,
|
StatefulService<T> * statefulService,
|
||||||
FS * fs,
|
FS * fs,
|
||||||
const char * filePath,
|
const char * filePath,
|
||||||
size_t bufferSize = DEFAULT_BUFFER_SIZE)
|
size_t bufferSize = FS_BUFFER_SIZE)
|
||||||
: _stateReader(stateReader)
|
: _stateReader(stateReader)
|
||||||
, _stateUpdater(stateUpdater)
|
, _stateUpdater(stateUpdater)
|
||||||
, _statefulService(statefulService)
|
, _statefulService(statefulService)
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
#define DEFAULT_BUFFER_SIZE 2048
|
#define DEFAULT_BUFFER_SIZE 2048
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef FS_BUFFER_SIZE
|
||||||
|
#define FS_BUFFER_SIZE 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
enum class StateUpdateResult {
|
enum class StateUpdateResult {
|
||||||
CHANGED = 0, // The update changed the state and propagation should take place if required
|
CHANGED = 0, // The update changed the state and propagation should take place if required
|
||||||
UNCHANGED, // The state was unchanged, propagation should not take place
|
UNCHANGED, // The state was unchanged, propagation should not take place
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class FSPersistence {
|
|||||||
StatefulService<T> * statefulService,
|
StatefulService<T> * statefulService,
|
||||||
FS * fs,
|
FS * fs,
|
||||||
const char * filePath,
|
const char * filePath,
|
||||||
size_t bufferSize = DEFAULT_BUFFER_SIZE)
|
size_t bufferSize = FS_BUFFER_SIZE)
|
||||||
: _stateReader(stateReader)
|
: _stateReader(stateReader)
|
||||||
, _stateUpdater(stateUpdater)
|
, _stateUpdater(stateUpdater)
|
||||||
, _statefulService(statefulService)
|
, _statefulService(statefulService)
|
||||||
|
|||||||
@@ -11,6 +11,10 @@
|
|||||||
#define DEFAULT_BUFFER_SIZE 2048
|
#define DEFAULT_BUFFER_SIZE 2048
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef FS_BUFFER_SIZE
|
||||||
|
#define FS_BUFFER_SIZE 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
enum class StateUpdateResult {
|
enum class StateUpdateResult {
|
||||||
CHANGED = 0, // The update changed the state and propagation should take place if required
|
CHANGED = 0, // The update changed the state and propagation should take place if required
|
||||||
UNCHANGED, // The state was unchanged, propagation should not take place
|
UNCHANGED, // The state was unchanged, propagation should not take place
|
||||||
|
|||||||
Reference in New Issue
Block a user