Skip to content

refactor: Replace Arduino WiFi Manager with esp native#314

Draft
hhvrc wants to merge 11 commits into
developfrom
refactor/wifi-manager
Draft

refactor: Replace Arduino WiFi Manager with esp native#314
hhvrc wants to merge 11 commits into
developfrom
refactor/wifi-manager

Conversation

@hhvrc

@hhvrc hhvrc commented Nov 12, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@hhvrc hhvrc self-assigned this Nov 12, 2024
@hhvrc hhvrc added this to the ESP-IDF milestone Jul 31, 2025
@changeset-bot

changeset-bot Bot commented Sep 20, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b2ba84d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hhvrc hhvrc changed the title Remove Arduino's WiFi manager feat: Replace Arduino WiFi Manager with esp native Dec 9, 2025
@hhvrc hhvrc changed the title feat: Replace Arduino WiFi Manager with esp native refactor: Replace Arduino WiFi Manager with esp native Dec 9, 2025
hhvrc and others added 3 commits March 27, 2026 00:50
Take develop's WiFiManager and WiFiScanManager (headers + sources) to
pick up all recent features (auth mode validation, BSSID pinning,
disconnect reasons, cooperative shutdown, etc.).

Rename WiFiManagerNew.cpp to .wip to exclude from build — the ESP-IDF
migration is incomplete and conflicts with the current Arduino-based
WiFiManager.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 147 concern(s)
  • include/config/Config.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • include/config/Config.h:23:15: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       23 |   std::string GetAsJSON(bool withSensitiveData);
          |               ^
  • include/config/Config.h:24:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       24 |   bool SaveFromJSON(std::string_view json);
          |   ~~~~ ^                                  
          |   auto                                     -> bool
  • include/config/Config.h:27:78: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       27 |   [[nodiscard]] flatbuffers::Offset<Serialization::Configuration::HubConfig> GetAsFlatBuffer(flatbuffers::FlatBufferBuilder& builder, bool withSensitiveData);
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^                                                                               
          |                 auto                                                                                                                                          -> flatbuffers::Offset<Serialization::Configuration::HubConfig>
  • include/config/Config.h:28:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       28 |   bool SaveFromFlatBuffer(const Serialization::Configuration::HubConfig* config);
          |   ~~~~ ^                                                                        
          |   auto                                                                           -> bool
  • include/config/Config.h:31:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       31 |   bool GetRaw(TinyVec<uint8_t>& buffer);
          |   ~~~~ ^                               
          |   auto                                  -> bool
  • include/config/Config.h:32:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       32 |   bool SetRaw(const uint8_t* buffer, std::size_t size);
          |   ~~~~ ^                                              
          |   auto                                                 -> bool
  • include/config/Config.h:41:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       41 |   bool GetRFConfig(RFConfig& out);
          |   ~~~~ ^                         
          |   auto                            -> bool
  • include/config/Config.h:42:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       42 |   bool GetWiFiConfig(WiFiConfig& out);
          |   ~~~~ ^                             
          |   auto                                -> bool
  • include/config/Config.h:43:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       43 |   bool GetCaptivePortalConfig(CaptivePortalConfig& out);
          |   ~~~~ ^                                               
          |   auto                                                  -> bool
  • include/config/Config.h:44:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       44 |   bool GetBackendConfig(BackendConfig& out);
          |   ~~~~ ^                                   
          |   auto                                      -> bool
  • include/config/Config.h:45:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       45 |   bool GetSerialInputConfig(SerialInputConfig& out);
          |   ~~~~ ^                                           
          |   auto                                              -> bool
  • include/config/Config.h:46:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       46 |   bool GetOtaUpdateConfig(OtaUpdateConfig& out);
          |   ~~~~ ^                                       
          |   auto                                          -> bool
  • include/config/Config.h:47:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       47 |   bool GetEStop(EStopConfig& out);
          |   ~~~~ ^                         
          |   auto                            -> bool
  • include/config/Config.h:49:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       49 |   bool SetRFConfig(const RFConfig& config);
          |   ~~~~ ^                                  
          |   auto                                     -> bool
  • include/config/Config.h:50:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       50 |   bool SetWiFiConfig(const WiFiConfig& config);
          |   ~~~~ ^                                      
          |   auto                                         -> bool
  • include/config/Config.h:51:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       51 |   bool SetCaptivePortalConfig(const CaptivePortalConfig& config);
          |   ~~~~ ^                                                        
          |   auto                                                           -> bool
  • include/config/Config.h:52:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       52 |   bool SetBackendConfig(const BackendConfig& config);
          |   ~~~~ ^                                            
          |   auto                                               -> bool
  • include/config/Config.h:53:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       53 |   bool SetSerialInputConfig(const SerialInputConfig& config);
          |   ~~~~ ^                                                    
          |   auto                                                       -> bool
  • include/config/Config.h:54:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       54 |   bool SetOtaUpdateConfig(const OtaUpdateConfig& config);
          |   ~~~~ ^                                                
          |   auto                                                   -> bool
  • include/config/Config.h:55:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       55 |   bool SetEStop(const EStopConfig& config);
          |   ~~~~ ^                                  
          |   auto                                     -> bool
  • include/config/Config.h:57:8: warning: [bugprone-dynamic-static-initializers]

    static variable 'GetWiFiCredentials' may be dynamically initialized in this header file

       57 |   bool GetWiFiCredentials(std::vector<WiFiCredentials>& out);
          |        ^
  • include/config/Config.h:57:8: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'GetWiFiCredentials' is non-const and globally accessible, consider making it const

  • include/config/Config.h:58:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       58 |   bool GetWiFiCredentials(cJSON* array, bool withSensitiveData);
          |   ~~~~ ^                                                       
          |   auto                                                          -> bool
  • include/config/Config.h:59:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       59 |   bool SetWiFiCredentials(const std::vector<WiFiCredentials>& credentials);
          |   ~~~~ ^                                                                  
          |   auto                                                                     -> bool
  • include/config/Config.h:61:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       61 |   bool GetRFConfigTxPin(gpio_num_t& out);
          |   ~~~~ ^                                
          |   auto                                   -> bool
  • include/config/Config.h:62:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       62 |   bool SetRFConfigTxPin(gpio_num_t txPin);
          |   ~~~~ ^                                 
          |   auto                                    -> bool
  • include/config/Config.h:63:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       63 |   bool GetRFConfigKeepAliveEnabled(bool& out);
          |   ~~~~ ^                                     
          |   auto                                        -> bool
  • include/config/Config.h:64:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       64 |   bool SetRFConfigKeepAliveEnabled(bool enabled);
          |   ~~~~ ^                                        
          |   auto                                           -> bool
  • include/config/Config.h:66:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       66 |   bool AnyWiFiCredentials();
          |   ~~~~ ^                   
          |   auto                      -> bool
  • include/config/Config.h:67:8: warning: [bugprone-dynamic-static-initializers]

    static variable 'AnyWiFiCredentials' may be dynamically initialized in this header file

       67 |   bool AnyWiFiCredentials(std::function<bool(const Config::WiFiCredentials&)> predicate);
          |        ^
  • include/config/Config.h:67:8: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'AnyWiFiCredentials' is non-const and globally accessible, consider making it const

  • include/config/Config.h:68:11: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       68 |   uint8_t AddWiFiCredentials(std::string_view ssid, std::string_view password, wifi_auth_mode_t authMode = WIFI_AUTH_MAX);
          |           ^
  • include/config/Config.h:69:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       69 |   bool TryGetWiFiCredentialsByID(uint8_t id, WiFiCredentials& out);
          |   ~~~~ ^                                                          
          |   auto                                                             -> bool
  • include/config/Config.h:69:42: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

       69 |   bool TryGetWiFiCredentialsByID(uint8_t id, WiFiCredentials& out);
          |                                          ^
  • include/config/Config.h:70:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       70 |   bool TryGetWiFiCredentialsBySSID(const char* ssid, WiFiCredentials& out);
          |   ~~~~ ^                                                                  
          |   auto                                                                     -> bool
  • include/config/Config.h:71:11: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       71 |   uint8_t GetWiFiCredentialsIDbySSID(const char* ssid);
          |           ^
  • include/config/Config.h:72:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       72 |   bool PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6]);
          |   ~~~~ ^                                                             
          |   auto                                                                -> bool
  • include/config/Config.h:72:40: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

       72 |   bool PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6]);
          |                                        ^
  • include/config/Config.h:72:66: warning: [cppcoreguidelines-avoid-c-arrays]

    do not declare C-style arrays, use 'std::array' instead

       72 |   bool PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6]);
          |                                                                  ^
  • include/config/Config.h:72:67: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       72 |   bool PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6]);
          |                                                                   ^
  • include/config/Config.h:73:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       73 |   bool RemoveWiFiCredentials(uint8_t id);
          |   ~~~~ ^                                
          |   auto                                   -> bool
  • include/config/Config.h:73:38: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

       73 |   bool RemoveWiFiCredentials(uint8_t id);
          |                                      ^
  • include/config/Config.h:74:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       74 |   bool ClearWiFiCredentials();
          |   ~~~~ ^                     
          |   auto                        -> bool
  • include/config/Config.h:75:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       75 |   bool GetWiFiHostname(std::string& out);
          |   ~~~~ ^                                
          |   auto                                   -> bool
  • include/config/Config.h:76:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       76 |   bool SetWiFiHostname(std::string hostname);
          |   ~~~~ ^                                    
          |   auto                                       -> bool
  • include/config/Config.h:78:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       78 |   bool GetBackendDomain(std::string& out);
          |   ~~~~ ^                                 
          |   auto                                    -> bool
  • include/config/Config.h:79:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       79 |   bool SetBackendDomain(std::string domain);
          |   ~~~~ ^                                   
          |   auto                                      -> bool
  • include/config/Config.h:80:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       80 |   bool HasBackendAuthToken();
          |   ~~~~ ^                    
          |   auto                       -> bool
  • include/config/Config.h:81:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       81 |   bool GetBackendAuthToken(std::string& out);
          |   ~~~~ ^                                    
          |   auto                                       -> bool
  • include/config/Config.h:82:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       82 |   bool SetBackendAuthToken(std::string token);
          |   ~~~~ ^                                     
          |   auto                                        -> bool
  • include/config/Config.h:83:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       83 |   bool ClearBackendAuthToken();
          |   ~~~~ ^                      
          |   auto                         -> bool
  • include/config/Config.h:85:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       85 |   bool GetSerialInputConfigEchoEnabled(bool& out);
          |   ~~~~ ^                                         
          |   auto                                            -> bool
  • include/config/Config.h:86:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       86 |   bool SetSerialInputConfigEchoEnabled(bool enabled);
          |   ~~~~ ^                                            
          |   auto                                               -> bool
  • include/config/Config.h:88:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       88 |   bool GetOtaUpdateId(int32_t& out);
          |   ~~~~ ^                           
          |   auto                              -> bool
  • include/config/Config.h:89:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       89 |   bool SetOtaUpdateId(int32_t updateId);
          |   ~~~~ ^                               
          |   auto                                  -> bool
  • include/config/Config.h:90:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       90 |   bool GetOtaUpdateStep(OtaUpdateStep& out);
          |   ~~~~ ^                                   
          |   auto                                      -> bool
  • include/config/Config.h:91:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       91 |   bool SetOtaUpdateStep(OtaUpdateStep updateStep);
          |   ~~~~ ^                                         
          |   auto                                            -> bool
  • include/config/Config.h:93:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       93 |   bool GetEStopEnabled(bool& out);
          |   ~~~~ ^                         
          |   auto                            -> bool
  • include/config/Config.h:94:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       94 |   bool SetEStopEnabled(bool enabled);
          |   ~~~~ ^                            
          |   auto                               -> bool
  • include/config/Config.h:95:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       95 |   bool GetEStopGpioPin(gpio_num_t& out);
          |   ~~~~ ^                               
          |   auto                                  -> bool
  • include/config/Config.h:96:8: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       96 |   bool SetEStopGpioPin(gpio_num_t gpioPin);
          |   ~~~~ ^                                  
          |   auto                                     -> bool
  • src/config/Config.cpp:22:23: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_configFS', which is reserved in the global namespace

       22 | static fs::LittleFSFS _configFS;
          |                       ^~~~~~~~~
          |                       configFS
  • src/config/Config.cpp:22:23: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable '_configFS' is non-const and globally accessible, consider making it const

  • src/config/Config.cpp:23:27: warning: [bugprone-reserved-identifier]

    declaration uses identifier '_configData', which is reserved in the global namespace

       23 | static Config::RootConfig _configData;
          |                           ^~~~~~~~~~~
          |                           configData
  • src/config/Config.cpp:23:27: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable '_configData' is non-const and globally accessible, consider making it const

  • src/config/Config.cpp:24:23: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable '_configMutex' is non-const and globally accessible, consider making it const

       24 | static ReadWriteMutex _configMutex;
          |                       ^
  • src/config/Config.cpp:26:9: warning: [cppcoreguidelines-macro-usage]

    function-like macro 'CONFIG_LOCK_READ_ACTION' used; consider a 'constexpr' template function

       26 | #define CONFIG_LOCK_READ_ACTION(retval, action)  \
          |         ^
  • src/config/Config.cpp:34:9: warning: [cppcoreguidelines-macro-usage]

    function-like macro 'CONFIG_LOCK_WRITE_ACTION' used; consider a 'constexpr' template function

       34 | #define CONFIG_LOCK_WRITE_ACTION(retval, action)  \
          |         ^
  • src/config/Config.cpp:42:9: warning: [cppcoreguidelines-macro-usage]

    function-like macro 'CONFIG_LOCK_READ' used; consider a 'constexpr' template function

       42 | #define CONFIG_LOCK_READ(retval)  CONFIG_LOCK_READ_ACTION(retval, {})
          |         ^
  • src/config/Config.cpp:43:9: warning: [cppcoreguidelines-macro-usage]

    function-like macro 'CONFIG_LOCK_WRITE' used; consider a 'constexpr' template function

       43 | #define CONFIG_LOCK_WRITE(retval) CONFIG_LOCK_WRITE_ACTION(retval, {})
          |         ^
  • src/config/Config.cpp:45:13: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       45 | static bool tryDeserializeConfig(const uint8_t* buffer, std::size_t bufferLen, OpenShock::Config::RootConfig& config)
          |        ~~~~ ^                                                                                                        
          |        auto                                                                                                           -> bool
  • src/config/Config.cpp:54:17: warning: [cppcoreguidelines-avoid-magic-numbers]

    4096 is a magic number; consider replacing it with a named constant

       54 |     .max_size = 4096,  // Should be enough
          |                 ^
  • src/config/Config.cpp:73:13: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       73 | static bool tryLoadConfig(TinyVec<uint8_t>& buffer)
          |        ~~~~ ^                                      
          |        auto                                         -> bool
  • src/config/Config.cpp:97:13: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       97 | static bool tryLoadConfig()
          |        ~~~~ ^              
          |        auto                 -> bool
  • src/config/Config.cpp:106:13: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      106 | static bool trySaveConfig(const uint8_t* data, std::size_t dataLen)
          |        ~~~~ ^                                                      
          |        auto                                                         -> bool
  • src/config/Config.cpp:124:13: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      124 | static bool trySaveConfig()
          |        ~~~~ ^              
          |        auto                 -> bool
  • src/config/Config.cpp:156:15: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      156 | static cJSON* getAsCJSON(bool withSensitiveData)
          |        ~~~~~~ ^                                 
          |        auto                                      -> cJSON*
  • src/config/Config.cpp:163:21: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      163 | std::string Config::GetAsJSON(bool withSensitiveData)
          |                     ^
  • src/config/Config.cpp:181:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      181 | bool Config::SaveFromJSON(std::string_view json)
          | ~~~~         ^                                  
          | auto                                             -> bool
  • src/config/Config.cpp:203:70: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      203 | flatbuffers::Offset<Serialization::Configuration::HubConfig> Config::GetAsFlatBuffer(flatbuffers::FlatBufferBuilder& builder, bool withSensitiveData)
          | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         ^                                                                               
          | auto                                                                                                                                                  -> flatbuffers::Offset<Serialization::Configuration::HubConfig>
  • src/config/Config.cpp:210:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      210 | bool Config::SaveFromFlatBuffer(const Serialization::Configuration::HubConfig* config)
          | ~~~~         ^                                                                        
          | auto                                                                                   -> bool
  • src/config/Config.cpp:222:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      222 | bool Config::GetRaw(TinyVec<uint8_t>& buffer)
          | ~~~~         ^                               
          | auto                                          -> bool
  • src/config/Config.cpp:229:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      229 | bool Config::SetRaw(const uint8_t* buffer, std::size_t size)
          | ~~~~         ^                                              
          | auto                                                         -> bool
  • src/config/Config.cpp:259:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      259 | bool Config::GetRFConfig(Config::RFConfig& out)
          | ~~~~         ^                                 
          | auto                                            -> bool
  • src/config/Config.cpp:268:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      268 | bool Config::GetWiFiConfig(Config::WiFiConfig& out)
          | ~~~~         ^                                     
          | auto                                                -> bool
  • src/config/Config.cpp:277:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      277 | bool Config::GetCaptivePortalConfig(Config::CaptivePortalConfig& out)
          | ~~~~         ^                                                       
          | auto                                                                  -> bool
  • src/config/Config.cpp:286:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      286 | bool Config::GetBackendConfig(Config::BackendConfig& out)
          | ~~~~         ^                                           
          | auto                                                      -> bool
  • src/config/Config.cpp:295:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      295 | bool Config::GetSerialInputConfig(Config::SerialInputConfig& out)
          | ~~~~         ^                                                   
          | auto                                                              -> bool
  • src/config/Config.cpp:304:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      304 | bool Config::GetOtaUpdateConfig(Config::OtaUpdateConfig& out)
          | ~~~~         ^                                               
          | auto                                                          -> bool
  • src/config/Config.cpp:313:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      313 | bool Config::GetEStop(Config::EStopConfig& out)
          | ~~~~         ^                                 
          | auto                                            -> bool
  • src/config/Config.cpp:322:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      322 | bool Config::SetRFConfig(const Config::RFConfig& config)
          | ~~~~         ^                                          
          | auto                                                     -> bool
  • src/config/Config.cpp:330:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      330 | bool Config::SetWiFiConfig(const Config::WiFiConfig& config)
          | ~~~~         ^                                              
          | auto                                                         -> bool
  • src/config/Config.cpp:338:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      338 | bool Config::SetCaptivePortalConfig(const Config::CaptivePortalConfig& config)
          | ~~~~         ^                                                                
          | auto                                                                           -> bool
  • src/config/Config.cpp:346:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      346 | bool Config::SetBackendConfig(const Config::BackendConfig& config)
          | ~~~~         ^                                                    
          | auto                                                               -> bool
  • src/config/Config.cpp:354:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      354 | bool Config::SetSerialInputConfig(const Config::SerialInputConfig& config)
          | ~~~~         ^                                                            
          | auto                                                                       -> bool
  • src/config/Config.cpp:362:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      362 | bool Config::SetOtaUpdateConfig(const Config::OtaUpdateConfig& config)
          | ~~~~         ^                                                        
          | auto                                                                   -> bool
  • src/config/Config.cpp:370:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      370 | bool Config::SetEStop(const Config::EStopConfig& config)
          | ~~~~         ^                                          
          | auto                                                     -> bool
  • src/config/Config.cpp:378:14: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'GetWiFiCredentials' is non-const and globally accessible, consider making it const

      378 | bool Config::GetWiFiCredentials(std::vector<Config::WiFiCredentials>& out)
          |              ^
  • src/config/Config.cpp:387:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      387 | bool Config::GetWiFiCredentials(cJSON* array, bool withSensitiveData)
          | ~~~~         ^                                                       
          | auto                                                                  -> bool
  • src/config/Config.cpp:400:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      400 | bool Config::SetWiFiCredentials(const std::vector<Config::WiFiCredentials>& credentials)
          | ~~~~         ^                                                                          
          | auto                                                                                     -> bool
  • src/config/Config.cpp:402:8: warning: [cppcoreguidelines-init-variables]

    variable 'foundZeroId' is not initialized

      402 |   bool foundZeroId = std::any_of(credentials.begin(), credentials.end(), [](const Config::WiFiCredentials& creds) { return creds.id == 0; });
          |        ^                                            
          |                                                      = false
  • src/config/Config.cpp:414:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      414 | bool Config::GetRFConfigTxPin(gpio_num_t& out)
          | ~~~~         ^                                
          | auto                                           -> bool
  • src/config/Config.cpp:423:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      423 | bool Config::SetRFConfigTxPin(gpio_num_t txPin)
          | ~~~~         ^                                 
          | auto                                            -> bool
  • src/config/Config.cpp:431:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      431 | bool Config::GetRFConfigKeepAliveEnabled(bool& out)
          | ~~~~         ^                                     
          | auto                                                -> bool
  • src/config/Config.cpp:440:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      440 | bool Config::SetRFConfigKeepAliveEnabled(bool enabled)
          | ~~~~         ^                                        
          | auto                                                   -> bool
  • src/config/Config.cpp:448:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      448 | bool Config::AnyWiFiCredentials()
          | ~~~~         ^                   
          | auto                              -> bool
  • src/config/Config.cpp:455:14: warning: [cppcoreguidelines-avoid-non-const-global-variables]

    variable 'AnyWiFiCredentials' is non-const and globally accessible, consider making it const

      455 | bool Config::AnyWiFiCredentials(std::function<bool(const Config::WiFiCredentials&)> predicate)
          |              ^
  • src/config/Config.cpp:464:17: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      464 | uint8_t Config::AddWiFiCredentials(std::string_view ssid, std::string_view password, wifi_auth_mode_t authMode)
          |                 ^
  • src/config/Config.cpp:464:36: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'AddWiFiCredentials' of similar type ('int') are easily swapped by mistake

      464 | uint8_t Config::AddWiFiCredentials(std::string_view ssid, std::string_view password, wifi_auth_mode_t authMode)
          |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/config/Config.cpp:464:53: note: the first parameter in the range is 'ssid'
      464 | uint8_t Config::AddWiFiCredentials(std::string_view ssid, std::string_view password, wifi_auth_mode_t authMode)
          |                                                     ^~~~
    src/config/Config.cpp:464:76: note: the last parameter in the range is 'password'
      464 | uint8_t Config::AddWiFiCredentials(std::string_view ssid, std::string_view password, wifi_auth_mode_t authMode)
          |                                                                            ^~~~~~~~
  • src/config/Config.cpp:468:11: warning: [readability-identifier-length]

    variable name 'id' is too short, expected at least 3 characters

      468 |   uint8_t id = 0;
          |           ^
  • src/config/Config.cpp:517:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      517 | bool Config::TryGetWiFiCredentialsByID(uint8_t id, Config::WiFiCredentials& credentials)
          | ~~~~         ^                                                                          
          | auto                                                                                     -> bool
  • src/config/Config.cpp:517:48: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

      517 | bool Config::TryGetWiFiCredentialsByID(uint8_t id, Config::WiFiCredentials& credentials)
          |                                                ^
  • src/config/Config.cpp:531:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      531 | bool Config::TryGetWiFiCredentialsBySSID(const char* ssid, Config::WiFiCredentials& credentials)
          | ~~~~         ^                                                                                  
          | auto                                                                                             -> bool
  • src/config/Config.cpp:545:17: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      545 | uint8_t Config::GetWiFiCredentialsIDbySSID(const char* ssid)
          |                 ^
  • src/config/Config.cpp:558:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      558 | bool Config::PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6])
          | ~~~~         ^                                                             
          | auto                                                                        -> bool
  • src/config/Config.cpp:558:46: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

      558 | bool Config::PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6])
          |                                              ^
  • src/config/Config.cpp:558:72: warning: [cppcoreguidelines-avoid-c-arrays]

    do not declare C-style arrays, use 'std::array' instead

      558 | bool Config::PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6])
          |                                                                        ^
  • src/config/Config.cpp:558:73: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      558 | bool Config::PinWiFiCredentialsBSSID(uint8_t id, const uint8_t (&bssid)[6])
          |                                                                         ^
  • src/config/Config.cpp:572:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      572 | bool Config::RemoveWiFiCredentials(uint8_t id)
          | ~~~~         ^                                
          | auto                                           -> bool
  • src/config/Config.cpp:572:44: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

      572 | bool Config::RemoveWiFiCredentials(uint8_t id)
          |                                            ^
  • src/config/Config.cpp:587:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      587 | bool Config::ClearWiFiCredentials()
          | ~~~~         ^                     
          | auto                                -> bool
  • src/config/Config.cpp:596:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      596 | bool Config::GetWiFiHostname(std::string& out)
          | ~~~~         ^                                
          | auto                                           -> bool
  • src/config/Config.cpp:605:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      605 | bool Config::SetWiFiHostname(std::string hostname)
          | ~~~~         ^                                    
          | auto                                               -> bool
  • src/config/Config.cpp:614:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      614 | bool Config::GetBackendDomain(std::string& out)
          | ~~~~         ^                                 
          | auto                                            -> bool
  • src/config/Config.cpp:623:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      623 | bool Config::SetBackendDomain(std::string domain)
          | ~~~~         ^                                   
          | auto                                              -> bool
  • src/config/Config.cpp:631:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      631 | bool Config::HasBackendAuthToken()
          | ~~~~         ^                    
          | auto                               -> bool
  • src/config/Config.cpp:638:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      638 | bool Config::GetBackendAuthToken(std::string& out)
          | ~~~~         ^                                    
          | auto                                               -> bool
  • src/config/Config.cpp:647:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      647 | bool Config::SetBackendAuthToken(std::string token)
          | ~~~~         ^                                     
          | auto                                                -> bool
  • src/config/Config.cpp:655:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      655 | bool Config::ClearBackendAuthToken()
          | ~~~~         ^                      
          | auto                                 -> bool
  • src/config/Config.cpp:663:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      663 | bool Config::GetSerialInputConfigEchoEnabled(bool& out)
          | ~~~~         ^                                         
          | auto                                                    -> bool
  • src/config/Config.cpp:671:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      671 | bool Config::SetSerialInputConfigEchoEnabled(bool enabled)
          | ~~~~         ^                                            
          | auto                                                       -> bool
  • src/config/Config.cpp:679:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      679 | bool Config::GetOtaUpdateId(int32_t& out)
          | ~~~~         ^                           
          | auto                                      -> bool
  • src/config/Config.cpp:688:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      688 | bool Config::SetOtaUpdateId(int32_t updateId)
          | ~~~~         ^                               
          | auto                                          -> bool
  • src/config/Config.cpp:700:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      700 | bool Config::GetOtaUpdateStep(OtaUpdateStep& out)
          | ~~~~         ^                                   
          | auto                                              -> bool
  • src/config/Config.cpp:709:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      709 | bool Config::SetOtaUpdateStep(OtaUpdateStep updateStep)
          | ~~~~         ^                                         
          | auto                                                    -> bool
  • src/config/Config.cpp:721:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      721 | bool Config::GetEStopEnabled(bool& out)
          | ~~~~         ^                         
          | auto                                    -> bool
  • src/config/Config.cpp:730:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      730 | bool Config::SetEStopEnabled(bool enabled)
          | ~~~~         ^                            
          | auto                                       -> bool
  • src/config/Config.cpp:738:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      738 | bool Config::GetEStopGpioPin(gpio_num_t& out)
          | ~~~~         ^                               
          | auto                                          -> bool
  • src/config/Config.cpp:747:14: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      747 | bool Config::SetEStopGpioPin(gpio_num_t gpioPin)
          | ~~~~         ^                                  
          | auto                                             -> bool
  • src/main.cpp:25:6: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       25 | bool trySetup()
          | ~~~~ ^         
          | auto            -> bool
  • src/main.cpp:28:14: warning: [cppcoreguidelines-avoid-c-arrays]

    do not declare C-style arrays, use 'std::array' instead

       28 |   uint8_t mac[8];
          |              ^
  • src/main.cpp:28:15: warning: [cppcoreguidelines-avoid-magic-numbers]

    8 is a magic number; consider replacing it with a named constant

       28 |   uint8_t mac[8];
          |               ^
  • src/main.cpp:107:19: warning: [cppcoreguidelines-avoid-magic-numbers]

    115'200 is a magic number; consider replacing it with a named constant

      107 |   OS_SERIAL.begin(115'200);
          |                   ^
  • src/main.cpp:110:23: warning: [cppcoreguidelines-avoid-magic-numbers]

    115'200 is a magic number; consider replacing it with a named constant

      110 |   OS_SERIAL_USB.begin(115'200);
          |                       ^
  • src/main.cpp:135:16: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      135 |     vTaskDelay(5);  // 5 ticks update interval
          |                ^
  • src/main.cpp:142:71: warning: [cppcoreguidelines-avoid-magic-numbers]

    8192 is a magic number; consider replacing it with a named constant

      142 |   if (OpenShock::TaskUtils::TaskCreateExpensive(main_app, "main_app", 8192, nullptr, 1, nullptr) != pdPASS) {  // PROFILED: 6KB stack usage
          |                                                                       ^

Have any feedback or feature suggestions? Share it here.

@stage-review

stage-review Bot commented Jun 29, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 3 individual chapters for you:

Title
1 Add WiFi credential existence check to Config
2 Initialize ESP native TCP/IP stack in main
3 Implement native ESP WiFi Manager
Open in Stage

Chapters generated by Stage for commit eb72546 on Jun 29, 2026 10:23am UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant