Refactor NVS and WiFi handlers for improved memory management and logging
- Updated KVStorageHandler interface to use std::string instead of char* for key-value operations. - Enhanced NVSStorageHandler to utilize ESP_LOG for error and info messages instead of printf. - Refactored WifiHandler to manage WiFi credentials using JSON format for better structure and storage. - Replaced raw pointers with std::unique_ptr in WifiHandler and NetworkHandler for automatic memory management. - Removed unused TouchHandler and EInkTouchHandler classes to clean up the codebase. - Adjusted CMakeLists.txt to remove unnecessary include directories. - Updated lv_conf.h to enable FreeRTOS and gesture recognition features.
This commit is contained in:
@@ -11,7 +11,7 @@ class HttpHandler;
|
||||
class NetworkHandler {
|
||||
public:
|
||||
NetworkHandler(
|
||||
WifiHandler&& wifiHandler
|
||||
std::unique_ptr<WifiHandler> wifiHandler
|
||||
);
|
||||
~NetworkHandler();
|
||||
|
||||
@@ -22,6 +22,6 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
WifiHandler wifiHandler;
|
||||
std::unique_ptr<WifiHandler> wifiHandler;
|
||||
bool initialized = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user