Skip to content

feat: migrate to Arduino 3.0 (pioarduino)#438

Open
hhvrc wants to merge 36 commits into
developfrom
feat/arduino-3.0
Open

feat: migrate to Arduino 3.0 (pioarduino)#438
hhvrc wants to merge 36 commits into
developfrom
feat/arduino-3.0

Conversation

@hhvrc

@hhvrc hhvrc commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

nullstalgia and others added 23 commits January 9, 2026 03:14
I'd prefer to be able to distinguish between the different types easily in support chat.
Merge develop into feat/arduino-3.0. Replace remaining tcb::span with
std::span, add missing WiFi.h include. Build not yet clean — remaining
issues: Serial namespace rename (SerialCmds), USBSerial API, and
CaptivePortalConfig struct changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 20, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the firmware project to Arduino 3.0 (via pioarduino’s espressif32 platform), updating APIs impacted by the new core/IDF and modernizing several internal interfaces.

Changes:

  • Switch project platform to pioarduino’s Arduino 3.0–based espressif32 and adjust related dependencies/tools.
  • Replace the bundled tcb::span with C++20 std::span across HTTP/WebSocket/serialization/captive portal APIs.
  • Update Serial command handler namespace usage and refactor RMT-based transmit code for Arduino 3.0.

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/wifi/WiFiManager.cpp Adjust WiFi init and IP formatting
src/util/Base64Utils.cpp Switch to std::span in encode
src/serial/command_handlers/version.cpp Serial command handler namespace update
src/serial/command_handlers/validgpios.cpp Serial command handler namespace update
src/serial/command_handlers/sysinfo.cpp Remove IPv6 reporting; namespace update
src/serial/command_handlers/rftxpin.cpp Serial command handler namespace update
src/serial/command_handlers/rftransmit.cpp Serial command handler namespace update
src/serial/command_handlers/restart.cpp Serial command handler namespace update
src/serial/command_handlers/rawconfig.cpp Serial command handler namespace update
src/serial/command_handlers/networks.cpp Update TAG + namespace update
src/serial/command_handlers/keepalive.cpp Serial command handler namespace update
src/serial/command_handlers/jsonconfig.cpp Serial command handler namespace update
src/serial/command_handlers/hostname.cpp Update TAG + namespace update
src/serial/command_handlers/factoryreset.cpp Serial command handler namespace update
src/serial/command_handlers/estop.cpp Serial command handler namespace update
src/serial/command_handlers/echo.cpp Serial command handler namespace update
src/serial/command_handlers/domain.cpp Update TAG + namespace update
src/serial/command_handlers/authtoken.cpp Serial command handler namespace update
src/serial/command_handlers/CommandEntry.cpp Update using namespace to SerialCmds
src/serial/SerialInputHandler.cpp Use SerialCmds command groups/registry
src/radio/RFTransmitter.cpp Update RMT init/write API usage
src/message_handlers/websocket/Local.cpp Switch handler payload to std::span
src/message_handlers/websocket/Gateway.cpp Switch handler payload to std::span
src/http/HTTPRequestManager.cpp Add WiFi include; switch to std::span
src/captiveportal/Manager.cpp Switch BIN send APIs to std::span
src/captiveportal/CaptivePortalInstance.cpp Switch WS payload to std::span
src/WebSocketDeFragger.cpp Switch callback payload to std::span
src/OtaUpdateManager.cpp Update task WDT configuration API
src/GatewayConnectionManager.cpp Switch BIN send APIs to std::span
src/GatewayClient.cpp Switch BIN send APIs to std::span
platformio.ini Use pioarduino platform + tool packages
include/wifi/WiFiManager.h Remove IPv6 address API
include/visual/RgbLedDriver.h Remove RMT handle member declaration
include/util/Base64Utils.h Switch to std::span, include <span>
include/span.h Remove bundled span implementation
include/serialization/CallbackFn.h Switch serialization callback to std::span
include/serial/command_handlers/CommandEntry.h Move types to OpenShock::SerialCmds
include/radio/RFTransmitter.h Remove RMT handle member; update ok()
include/message_handlers/WebSocket.h Switch handler payloads to std::span
include/http/HTTPRequestManager.h Add <span> + Response constructor
include/captiveportal/Manager.h Switch BIN send APIs to std::span
include/captiveportal/CaptivePortalInstance.h Switch BIN send/WS payload to std::span
include/WebSocketDeFragger.h Switch event callback to std::span
include/TinyVec.h Include <span>; add span conversions/iterators
include/Hashing.h Update mbedTLS hashing API calls
include/GatewayConnectionManager.h Include <span>; switch BIN send API
include/GatewayClient.h Include <span>; switch BIN send API
include/Common.h Enforce C++20 requirement messaging
include/Checksum.h Add C++20 concept-based overloads

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wifi/WiFiManager.cpp Outdated
Comment thread components/util/include/Checksum.h
Comment thread src/OtaUpdateManager.cpp Outdated
Comment thread src/serial/command_handlers/version.cpp
Comment thread src/serial/SerialInputHandler.cpp
Comment thread components/util/include/Checksum.h
Comment thread components/led_drivers/include/led_drivers/RgbLedDriver.h
Comment thread components/http/include/http/HTTPRequestManager.h
Comment thread src/wifi/WiFiManager.cpp
Comment thread src/wifi/WiFiManager.cpp Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Change file check

⚠️ Missing — this PR does not add a change file under .changes/.

If this change should show up in the release notes, add one with release-tool new "<title>" --kind <added|changed|deprecated|removed|fixed|security|safety|chore>.

@stage-review

stage-review Bot commented Jun 29, 2026

Copy link
Copy Markdown

hhvrc added 4 commits June 29, 2026 13:50
- Prefix shared-enum includes with enums/ instead of widening common's
  public include path, so consumers reference enums/<Name>.h explicitly.
- Register the protocols component (was an empty CMakeLists): move its
  public headers under include/radio/rmt/ and the private Shared.h under
  src/radio/rmt/internal/, wire SRCS/INCLUDE_DIRS/REQUIRES, and add
  protocols to the main component's REQUIRES.
- Convert the decoupled domain enums (OtaUpdateChannel/OtaUpdateStep/
  FirmwareBootType) to their flatbuffer counterparts at the serialization
  boundaries with static_cast (values are aligned).
- Stop committing generated sdkconfig.<env> files (DO NOT EDIT). They are
  derived by ESP-IDF from sdkconfig.defaults[.<target>]; track only the
  editable defaults. Untrack the 4 stray per-env files and dependencies.lock,
  and git-ignore them going forward.
- Per-chip overrides use ESP-IDF's native sdkconfig.defaults.<idf_target>
  auto-layering (kconfig.cmake), no custom scripting.
- Wemos-Lolin-S3-Mini: add -DARDUINO_USB_MODE=1 so Serial resolves to the
  built-in USB-Serial-JTAG (HWCDCSerial) instead of native USB CDC, which would
  require the TinyUSB component. Brings per-board builds to 12/13.
- Document remaining S2-Mini TinyUSB work in BEFORE_MERGE_WORK.md.
CI was red on every PR: scripts/embed_env_vars.py does `import git`
(GitPython), which the old espressif32 platform pulled in transitively
but the pioarduino platform does not, so every `pio run` died at SCons
config time with ModuleNotFoundError. Pin GitPython==3.1.46 explicitly.

Also add `restore-keys: pio-<os>-` to the three PlatformIO cache steps so
a platformio.ini edit reuses the latest prior cache (only fetching deltas)
instead of re-downloading the whole pioarduino platform + toolchains.

Document the root cause, caching change, remaining ccache opportunity, and
the outstanding functional regressions in BEFORE_MERGE_WORK.md.
The PlatformIO cache only stored platforms/packages/.cache, but pioarduino
installs toolchains, esp-idf, the Arduino core and its own Python venv under
~/.platformio/{tools,penv}. Those were never cached, so every board did a full
reinstall even on a confirmed cache hit. Cache the whole ~/.platformio tree
(excluding dist/ and .cache/, which are redundant download archives + transient
install junk) and bump the cache key to pio-v2- so the stale incomplete cache
under the old key is replaced.

embed_env_vars.py imported 'git' at module top, which runs at SCons config time
in the pioarduino build environment where GitPython isn't reliably importable,
killing every build with ModuleNotFoundError. GitPython is only a local-build
fallback; in CI the commit and version come from OPENSHOCK_FW_* env vars. Import
it lazily inside get_git_repo() and degrade gracefully on ImportError.
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v21.1.8) reports: 23 file(s) not formatted
  • components/common/src/ArduinoExistanceCheck.cpp
  • components/common/src/LanguageVersionCheck.cpp
  • components/http/src/HTTPRequestManager.cpp
  • components/protocols/include/radio/rmt/Sequence.h
  • components/util/include/TinyVec.h
  • include/GatewayClient.h
  • include/WebSocketDeFragger.h
  • include/captiveportal/CaptivePortalInstance.h
  • include/radio/RFTransmitter.h
  • include/serial/SerialInputHandler.h
  • src/CommandHandler.cpp
  • src/GatewayClient.cpp
  • src/OtaUpdateManager.cpp
  • src/captiveportal/CaptivePortalInstance.cpp
  • src/captiveportal/Manager.cpp
  • src/config/Config.cpp
  • src/config/EStopConfig.cpp
  • src/config/OtaUpdateConfig.cpp
  • src/config/RFConfig.cpp
  • src/http/JsonAPI.cpp
  • src/main.cpp
  • src/message_handlers/ShockerCommandList.cpp
  • src/visual/VisualStateManager.cpp
clang-tidy (v21.1.8) reports: 1569 concern(s)
  • components/chipset/include/Chipset.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/chipset/include/Chipset.h:141:9: warning: [cppcoreguidelines-macro-usage]

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

      141 | #define CHIP_UNSAFE_GPIO(pin)                                                                                                                                                                                                                   \
          |         ^
  • components/chipset/include/Chipset.h:214:9: warning: [cppcoreguidelines-macro-usage]

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

      214 | #define OPENSHOCK_BYPASSED_GPIO(pin) (false)
          |         ^
  • components/chipset/include/Chipset.h:220:18: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      220 |   constexpr bool IsValidGPIOPin(int8_t pin)
          |             ~~~~ ^                         
          |             auto                            -> bool
  • components/chipset/include/Chipset.h:244:18: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      244 |   constexpr bool IsValidInputPin(int8_t pin)
          |             ~~~~ ^                          
          |             auto                             -> bool
  • components/chipset/include/Chipset.h:248:18: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      248 |   constexpr bool IsValidOutputPin(int8_t pin)
          |             ~~~~ ^                           
          |             auto                              -> bool
  • components/chipset/include/Chipset.h:263:21: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      263 |   constexpr uint8_t GetValidInputPinsCount()
          |                     ^
  • components/chipset/include/Chipset.h:273:21: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      273 |   constexpr uint8_t GetValidOutputPinsCount()
          |                     ^
  • components/chipset/include/Chipset.h:284:21: warning: [bugprone-dynamic-static-initializers]

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

      284 |   constexpr uint8_t ValidInputPinsCount  = GetValidInputPinsCount();
          |                     ^
  • components/chipset/include/Chipset.h:285:21: warning: [bugprone-dynamic-static-initializers]

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

      285 |   constexpr uint8_t ValidOutputPinsCount = GetValidOutputPinsCount();
          |                     ^
  • components/chipset/include/Chipset.h:286:3: warning: [modernize-use-using]

    use 'using' instead of 'typedef'

      286 |   typedef std::bitset<GPIO_NUM_MAX> GPIOPinSet;
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |   using GPIOPinSet = 
  • components/chipset/include/Chipset.h:288:24: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      288 |   constexpr GPIOPinSet GetValidGPIOPins()
          |             ~~~~~~~~~~ ^                 
          |             auto                          -> GPIOPinSet
  • components/chipset/include/Chipset.h:290:16: warning: [cppcoreguidelines-init-variables]

    variable 'pins' is not initialized

      290 |     GPIOPinSet pins;
          |                ^   
          |                     = 0
  • components/chipset/include/Chipset.h:298:24: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      298 |   constexpr GPIOPinSet GetValidInputPins()
          |             ~~~~~~~~~~ ^                  
          |             auto                           -> GPIOPinSet
  • components/chipset/include/Chipset.h:300:16: warning: [cppcoreguidelines-init-variables]

    variable 'pins' is not initialized

      300 |     GPIOPinSet pins;
          |                ^   
          |                     = 0
  • components/chipset/include/Chipset.h:308:24: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      308 |   constexpr GPIOPinSet GetValidOutputPins()
          |             ~~~~~~~~~~ ^                   
          |             auto                            -> GPIOPinSet
  • components/chipset/include/Chipset.h:310:16: warning: [cppcoreguidelines-init-variables]

    variable 'pins' is not initialized

      310 |     GPIOPinSet pins;
          |                ^   
          |                     = 0
  • components/chipset/include/Chipset.h:318:30: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      318 |   inline std::vector<int8_t> GetValidInputPinsVector()
          |                              ^
  • components/chipset/include/Chipset.h:329:30: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      329 |   inline std::vector<int8_t> GetValidOutputPinsVector()
          |                              ^
  • components/common/include/FormatHelpers.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/FormatHelpers.h:3:9: warning: [cppcoreguidelines-macro-usage]

    macro 'BSSID_FMT' used to declare a constant; consider using a 'constexpr' constant

        3 | #define BSSID_FMT        "%02X:%02X:%02X:%02X:%02X:%02X"
          |         ^
  • components/common/include/FormatHelpers.h:4:9: warning: [cppcoreguidelines-macro-usage]

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

        4 | #define BSSID_ARG(bssid) bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]
          |         ^
  • components/common/include/FormatHelpers.h:4:36: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        4 | #define BSSID_ARG(bssid) bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]
          |                                    ^    
          |                                    (    )
  • components/common/include/FormatHelpers.h:4:46: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        4 | #define BSSID_ARG(bssid) bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]
          |                                              ^    
          |                                              (    )
  • components/common/include/FormatHelpers.h:4:56: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        4 | #define BSSID_ARG(bssid) bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]
          |                                                        ^    
          |                                                        (    )
  • components/common/include/FormatHelpers.h:4:66: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        4 | #define BSSID_ARG(bssid) bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]
          |                                                                  ^    
          |                                                                  (    )
  • components/common/include/FormatHelpers.h:4:76: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        4 | #define BSSID_ARG(bssid) bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]
          |                                                                            ^    
          |                                                                            (    )
  • components/common/include/FormatHelpers.h:5:1: warning: [cppcoreguidelines-macro-to-enum]

    replace macro with enum

        5 | #define BSSID_FMT_LEN    18
          | ^~~~~~~
          |                       =
        6 | 
  • components/common/include/FormatHelpers.h:5:9: warning: [cppcoreguidelines-macro-to-enum]

    macro 'BSSID_FMT_LEN' defines an integral constant; prefer an enum instead

        5 | #define BSSID_FMT_LEN    18
          |         ^
  • components/common/include/FormatHelpers.h:5:9: warning: [cppcoreguidelines-macro-usage]

    macro 'BSSID_FMT_LEN' used to declare a constant; consider using a 'constexpr' constant

  • components/common/include/FormatHelpers.h:7:9: warning: [cppcoreguidelines-macro-usage]

    macro 'IPV4ADDR_FMT' used to declare a constant; consider using a 'constexpr' constant

        7 | #define IPV4ADDR_FMT       "%hhu.%hhu.%hhu.%hhu"
          |         ^
  • components/common/include/FormatHelpers.h:8:9: warning: [cppcoreguidelines-macro-usage]

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

        8 | #define IPV4ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3]
          |         ^
  • components/common/include/FormatHelpers.h:8:37: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        8 | #define IPV4ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3]
          |                                     ^   
          |                                     (   )
  • components/common/include/FormatHelpers.h:8:46: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        8 | #define IPV4ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3]
          |                                              ^   
          |                                              (   )
  • components/common/include/FormatHelpers.h:8:55: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        8 | #define IPV4ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3]
          |                                                       ^   
          |                                                       (   )
  • components/common/include/FormatHelpers.h:9:1: warning: [cppcoreguidelines-macro-to-enum]

    replace macro with enum

        9 | #define IPV4ADDR_FMT_LEN   15
          | ^~~~~~~
          |                          =
       10 | 
  • components/common/include/FormatHelpers.h:9:9: warning: [cppcoreguidelines-macro-to-enum]

    macro 'IPV4ADDR_FMT_LEN' defines an integral constant; prefer an enum instead

        9 | #define IPV4ADDR_FMT_LEN   15
          |         ^
  • components/common/include/FormatHelpers.h:9:9: warning: [cppcoreguidelines-macro-usage]

    macro 'IPV4ADDR_FMT_LEN' used to declare a constant; consider using a 'constexpr' constant

  • components/common/include/FormatHelpers.h:11:9: warning: [cppcoreguidelines-macro-usage]

    macro 'IPV6ADDR_FMT' used to declare a constant; consider using a 'constexpr' constant

       11 | #define IPV6ADDR_FMT       "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x"
          |         ^
  • components/common/include/FormatHelpers.h:12:9: warning: [cppcoreguidelines-macro-usage]

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

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |         ^
  • components/common/include/FormatHelpers.h:12:37: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                     ^   
          |                                     (   )
  • components/common/include/FormatHelpers.h:12:46: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                              ^   
          |                                              (   )
  • components/common/include/FormatHelpers.h:12:55: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                       ^   
          |                                                       (   )
  • components/common/include/FormatHelpers.h:12:64: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                ^   
          |                                                                (   )
  • components/common/include/FormatHelpers.h:12:73: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                         ^   
          |                                                                         (   )
  • components/common/include/FormatHelpers.h:12:82: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                  ^   
          |                                                                                  (   )
  • components/common/include/FormatHelpers.h:12:91: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                           ^   
          |                                                                                           (   )
  • components/common/include/FormatHelpers.h:12:100: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                    ^   
          |                                                                                                    (   )
  • components/common/include/FormatHelpers.h:12:109: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                             ^   
          |                                                                                                             (   )
  • components/common/include/FormatHelpers.h:12:118: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                                      ^   
          |                                                                                                                      (   )
  • components/common/include/FormatHelpers.h:12:128: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                                                ^   
          |                                                                                                                                (   )
  • components/common/include/FormatHelpers.h:12:138: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                                                          ^   
          |                                                                                                                                          (   )
  • components/common/include/FormatHelpers.h:12:148: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                                                                    ^   
          |                                                                                                                                                    (   )
  • components/common/include/FormatHelpers.h:12:158: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                                                                              ^   
          |                                                                                                                                                              (   )
  • components/common/include/FormatHelpers.h:12:168: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

       12 | #define IPV6ADDR_ARG(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]
          |                                                                                                                                                                        ^   
          |                                                                                                                                                                        (   )
  • components/common/include/FormatHelpers.h:13:1: warning: [cppcoreguidelines-macro-to-enum]

    replace macro with enum

       13 | #define IPV6ADDR_FMT_LEN   39
          | ^~~~~~~
          |                          =
  • components/common/include/FormatHelpers.h:13:9: warning: [cppcoreguidelines-macro-to-enum]

    macro 'IPV6ADDR_FMT_LEN' defines an integral constant; prefer an enum instead

       13 | #define IPV6ADDR_FMT_LEN   39
          |         ^
  • components/common/include/FormatHelpers.h:13:9: warning: [cppcoreguidelines-macro-usage]

    macro 'IPV6ADDR_FMT_LEN' used to declare a constant; consider using a 'constexpr' constant

  • components/common/include/OpenShock.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/OpenShock.h:3:9: warning: [cppcoreguidelines-macro-usage]

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

        3 | #define DISABLE_DEFAULT(TypeName) TypeName() = delete
          |         ^
  • components/common/include/OpenShock.h:4:9: warning: [cppcoreguidelines-macro-usage]

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

        4 | #define DISABLE_COPY(TypeName)                   \
          |         ^
  • components/common/include/OpenShock.h:6:3: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        6 |   TypeName& operator=(const TypeName&) = delete
          |   ^       
          |   (       )
  • components/common/include/OpenShock.h:7:9: warning: [cppcoreguidelines-macro-usage]

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

        7 | #define DISABLE_MOVE(TypeName)              \
          |         ^
  • components/common/include/OpenShock.h:8:12: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        8 |   TypeName(TypeName&&)            = delete; \
          |            ^       
          |            (       )
  • components/common/include/OpenShock.h:9:3: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        9 |   TypeName& operator=(TypeName&&) = delete
          |   ^       
          |   (       )
  • components/common/include/OpenShock.h:9:23: warning: [bugprone-macro-parentheses]

    macro argument should be enclosed in parentheses

        9 |   TypeName& operator=(TypeName&&) = delete
          |                       ^       
          |                       (       )
  • components/common/include/OpenShock.h:21:9: warning: [cppcoreguidelines-macro-usage]

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

       21 | #define OPENSHOCK_FW_CDN_URL(path) "https://" OPENSHOCK_FW_CDN_DOMAIN path
          |         ^
  • components/common/include/OpenShock.h:23:1: warning: [cppcoreguidelines-macro-to-enum]

    replace macro with enum

       23 | #define OPENSHOCK_GPIO_INVALID -1
          | ^~~~~~~
          |                                =
       24 | 
  • components/common/include/OpenShock.h:23:9: warning: [cppcoreguidelines-macro-to-enum]

    macro 'OPENSHOCK_GPIO_INVALID' defines an integral constant; prefer an enum instead

       23 | #define OPENSHOCK_GPIO_INVALID -1
          |         ^
  • components/common/include/OpenShock.h:23:32: warning: [bugprone-macro-parentheses]

    macro replacement list should be enclosed in parentheses

       23 | #define OPENSHOCK_GPIO_INVALID -1
          |                                ^ 
          |                                ( )
  • components/common/include/enums/AccountLinkResultCode.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/AccountLinkResultCode.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/AccountLinkResultCode.h:6:14: warning: [performance-enum-size]

    enum 'AccountLinkResultCode' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        6 |   enum class AccountLinkResultCode : uint8_t {
          |              ^
  • components/common/include/enums/FirmwareBootType.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/FirmwareBootType.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/FirmwareBootType.h:7:14: warning: [performance-enum-size]

    enum 'FirmwareBootType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        7 |   enum class FirmwareBootType : uint8_t {
          |              ^
  • components/common/include/enums/FirmwareBootType.h:13:15: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       13 |   inline bool TryParseFirmwareBootType(FirmwareBootType& bootType, const char* str)
          |          ~~~~ ^                                                                    
          |          auto                                                                       -> bool
  • components/common/include/enums/GatewayClientState.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/GatewayClientState.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/GatewayClientState.h:6:14: warning: [performance-enum-size]

    enum 'GatewayClientState' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        6 |   enum class GatewayClientState : uint8_t {
          |              ^
  • components/common/include/enums/OtaUpdateChannel.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/OtaUpdateChannel.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/OtaUpdateChannel.h:7:14: warning: [performance-enum-size]

    enum 'OtaUpdateChannel' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        7 |   enum class OtaUpdateChannel : uint8_t {
          |              ^
  • components/common/include/enums/OtaUpdateChannel.h:13:15: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       13 |   inline bool TryParseOtaUpdateChannel(OtaUpdateChannel& channel, const char* str)
          |          ~~~~ ^                                                                   
          |          auto                                                                      -> bool
  • components/common/include/enums/OtaUpdateStep.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/OtaUpdateStep.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/OtaUpdateStep.h:7:14: warning: [performance-enum-size]

    enum 'OtaUpdateStep' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        7 |   enum class OtaUpdateStep : uint8_t {
          |              ^
  • components/common/include/enums/OtaUpdateStep.h:16:15: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       16 |   inline bool TryParseOtaUpdateStep(OtaUpdateStep& channel, const char* str)
          |          ~~~~ ^                                                             
          |          auto                                                                -> bool
  • components/common/include/enums/SetGPIOResultCode.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/SetGPIOResultCode.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/SetGPIOResultCode.h:6:14: warning: [performance-enum-size]

    enum 'SetGPIOResultCode' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        6 |   enum class SetGPIOResultCode : uint8_t {
          |              ^
  • components/common/include/enums/ShockerCommandType.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/ShockerCommandType.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/ShockerCommandType.h:7:14: warning: [performance-enum-size]

    enum 'ShockerCommandType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        7 |   enum class ShockerCommandType : uint8_t {
          |              ^
  • components/common/include/enums/ShockerCommandType.h:15:15: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       15 |   inline bool ShockerCommandTypeFromString(const char* str, ShockerCommandType& out)
          |          ~~~~ ^                                                                     
          |          auto                                                                        -> bool
  • components/common/include/enums/ShockerCommandType.h:20:7: warning: [readability-else-after-return]

    do not use 'else' after 'return'

       20 |     } else if (strcasecmp(str, "shock") == 0) {
          |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       21 |       out = ShockerCommandType::Shock;
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       22 |       return true;
          |       ~~~~~~~~~~~~
       23 |     } else if (strcasecmp(str, "vibrate") == 0) {
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       24 |       out = ShockerCommandType::Vibrate;
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       25 |       return true;
          |       ~~~~~~~~~~~~
       26 |     } else if (strcasecmp(str, "sound") == 0) {
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       27 |       out = ShockerCommandType::Sound;
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       28 |       return true;
          |       ~~~~~~~~~~~~
       29 |     } else if (strcasecmp(str, "light") == 0) {
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       30 |       out = ShockerCommandType::Light;
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       31 |       return true;
          |       ~~~~~~~~~~~~
       32 |     } else {
          |     ~~~~~~~~
       33 |       return false;
          |       ~~~~~~~~~~~~~
       34 |     }
          |     ~
  • components/common/include/enums/ShockerModelType.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/ShockerModelType.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/ShockerModelType.h:7:14: warning: [performance-enum-size]

    enum 'ShockerModelType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        7 |   enum class ShockerModelType : uint8_t {
          |              ^
  • components/common/include/enums/ShockerModelType.h:15:15: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       15 |   inline bool ShockerModelTypeFromString(const char* str, ShockerModelType& out, bool allowTypo = false)
          |          ~~~~ ^                                                                                         
          |          auto                                                                                            -> bool
  • components/common/include/enums/WebSocketMessageType.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/common/include/enums/WebSocketMessageType.h:3:10: error: [clang-diagnostic-error]

    'cstdint' file not found

        3 | #include <cstdint>
          |          ^~~~~~~~~
  • components/common/include/enums/WebSocketMessageType.h:6:14: warning: [performance-enum-size]

    enum 'WebSocketMessageType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

        6 |   enum class WebSocketMessageType : uint8_t {
          |              ^
  • components/common/src/ArduinoExistanceCheck.cpp:3:2: warning: [clang-diagnostic-]

    "Let it be known that Arduino hath finally been cast aside in favor of the noble ESP-IDF! I beseech thee, kind sir or madam, wouldst thou kindly partake in the honors of expunging 'arduino-esp32' from yonder useragent aloft, and in its stead, bestow the illustrious 'ESP-IDF'?"

        3 | #warning \
          |  ^
  • components/concurrency/include/ReadWriteMutex.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/concurrency/include/ReadWriteMutex.h:9:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

        9 |     DISABLE_COPY(ReadWriteMutex);
          |     ^
    components/common/include/OpenShock.h:6:13: note: expanded from macro 'DISABLE_COPY'
        6 |   TypeName& operator=(const TypeName&) = delete
          |             ^
  • components/concurrency/include/ReadWriteMutex.h:10:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       10 |     DISABLE_MOVE(ReadWriteMutex);
          |     ^
    components/common/include/OpenShock.h:9:13: note: expanded from macro 'DISABLE_MOVE'
        9 |   TypeName& operator=(TypeName&&) = delete
          |             ^
  • components/concurrency/include/ReadWriteMutex.h:16:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       16 |     bool lockRead(TickType_t xTicksToWait);
          |     ~~~~ ^                                
          |     auto                                   -> bool
  • components/concurrency/include/ReadWriteMutex.h:19:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       19 |     bool lockWrite(TickType_t xTicksToWait);
          |     ~~~~ ^                                 
          |     auto                                    -> bool
  • components/concurrency/include/ReadWriteMutex.h:29:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       29 |     DISABLE_COPY(ScopedReadLock);
          |     ^
    components/common/include/OpenShock.h:6:13: note: expanded from macro 'DISABLE_COPY'
        6 |   TypeName& operator=(const TypeName&) = delete
          |             ^
  • components/concurrency/include/ReadWriteMutex.h:30:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       30 |     DISABLE_MOVE(ScopedReadLock);
          |     ^
    components/common/include/OpenShock.h:9:13: note: expanded from macro 'DISABLE_MOVE'
        9 |   TypeName& operator=(TypeName&&) = delete
          |             ^
  • components/concurrency/include/ReadWriteMutex.h:53:5: warning: [modernize-use-nodiscard]

    function 'isLocked' should be marked [[nodiscard]]

       53 |     bool isLocked() const { return m_mutex != nullptr; }
          |     ^
          |     [[nodiscard]] 
  • components/concurrency/include/ReadWriteMutex.h:53:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       53 |     bool isLocked() const { return m_mutex != nullptr; }
          |     ~~~~ ^
          |     auto                  -> bool
  • components/concurrency/include/ReadWriteMutex.h:55:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       55 |     bool unlock()
          |     ~~~~ ^       
          |     auto          -> bool
  • components/concurrency/include/ReadWriteMutex.h:66:5: warning: [modernize-use-nodiscard]

    function 'getMutex' should be marked [[nodiscard]]

       66 |     ReadWriteMutex* getMutex() const { return m_mutex; }
          |     ^
          |     [[nodiscard]] 
  • components/concurrency/include/ReadWriteMutex.h:66:21: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       66 |     ReadWriteMutex* getMutex() const { return m_mutex; }
          |     ~~~~~~~~~~~~~~~ ^
          |     auto                             -> ReadWriteMutex*
  • components/concurrency/include/ReadWriteMutex.h:73:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       73 |     DISABLE_COPY(ScopedWriteLock);
          |     ^
    components/common/include/OpenShock.h:6:13: note: expanded from macro 'DISABLE_COPY'
        6 |   TypeName& operator=(const TypeName&) = delete
          |             ^
  • components/concurrency/include/ReadWriteMutex.h:74:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       74 |     DISABLE_MOVE(ScopedWriteLock);
          |     ^
    components/common/include/OpenShock.h:9:13: note: expanded from macro 'DISABLE_MOVE'
        9 |   TypeName& operator=(TypeName&&) = delete
          |             ^
  • components/concurrency/include/ReadWriteMutex.h:97:5: warning: [modernize-use-nodiscard]

    function 'isLocked' should be marked [[nodiscard]]

       97 |     bool isLocked() const { return m_mutex != nullptr; }
          |     ^
          |     [[nodiscard]] 
  • components/concurrency/include/ReadWriteMutex.h:97:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       97 |     bool isLocked() const { return m_mutex != nullptr; }
          |     ~~~~ ^
          |     auto                  -> bool
  • components/concurrency/include/ReadWriteMutex.h:99:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       99 |     bool unlock()
          |     ~~~~ ^       
          |     auto          -> bool
  • components/concurrency/include/ReadWriteMutex.h:110:5: warning: [modernize-use-nodiscard]

    function 'getMutex' should be marked [[nodiscard]]

      110 |     ReadWriteMutex* getMutex() const { return m_mutex; }
          |     ^
          |     [[nodiscard]] 
  • components/concurrency/include/ReadWriteMutex.h:110:21: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

      110 |     ReadWriteMutex* getMutex() const { return m_mutex; }
          |     ~~~~~~~~~~~~~~~ ^
          |     auto                             -> ReadWriteMutex*
  • components/concurrency/include/SimpleMutex.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/concurrency/include/SimpleMutex.h:9:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

        9 |     DISABLE_COPY(SimpleMutex);
          |     ^
    components/common/include/OpenShock.h:6:13: note: expanded from macro 'DISABLE_COPY'
        6 |   TypeName& operator=(const TypeName&) = delete
          |             ^
  • components/concurrency/include/SimpleMutex.h:10:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       10 |     DISABLE_MOVE(SimpleMutex);
          |     ^
    components/common/include/OpenShock.h:9:13: note: expanded from macro 'DISABLE_MOVE'
        9 |   TypeName& operator=(TypeName&&) = delete
          |             ^
  • components/concurrency/include/SimpleMutex.h:16:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       16 |     bool lock(TickType_t xTicksToWait);
          |     ~~~~ ^                            
          |     auto                               -> bool
  • components/concurrency/include/SimpleMutex.h:24:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       24 |     DISABLE_COPY(ScopedLock);
          |     ^
    components/common/include/OpenShock.h:6:13: note: expanded from macro 'DISABLE_COPY'
        6 |   TypeName& operator=(const TypeName&) = delete
          |             ^
  • components/concurrency/include/SimpleMutex.h:25:5: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       25 |     DISABLE_MOVE(ScopedLock);
          |     ^
    components/common/include/OpenShock.h:9:13: note: expanded from macro 'DISABLE_MOVE'
        9 |   TypeName& operator=(TypeName&&) = delete
          |             ^
  • components/concurrency/include/SimpleMutex.h:48:5: warning: [modernize-use-nodiscard]

    function 'isLocked' should be marked [[nodiscard]]

       48 |     bool isLocked() const { return m_mutex != nullptr; }
          |     ^
          |     [[nodiscard]] 
  • components/concurrency/include/SimpleMutex.h:48:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       48 |     bool isLocked() const { return m_mutex != nullptr; }
          |     ~~~~ ^
          |     auto                  -> bool
  • components/concurrency/include/SimpleMutex.h:50:10: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       50 |     bool unlock()
          |     ~~~~ ^       
          |     auto          -> bool
  • components/concurrency/include/SimpleMutex.h:61:5: warning: [modernize-use-nodiscard]

    function 'getMutex' should be marked [[nodiscard]]

       61 |     SimpleMutex* getMutex() const { return m_mutex; }
          |     ^
          |     [[nodiscard]] 
  • components/concurrency/include/SimpleMutex.h:61:18: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       61 |     SimpleMutex* getMutex() const { return m_mutex; }
          |     ~~~~~~~~~~~~ ^
          |     auto                          -> SimpleMutex*
  • components/concurrency/src/ReadWriteMutex.cpp:9:1: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: m_mutex, m_readSem

        9 | OpenShock::ReadWriteMutex::ReadWriteMutex()
          | ^
  • components/concurrency/src/ReadWriteMutex.cpp:23:33: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       23 | bool OpenShock::ReadWriteMutex::lockRead(TickType_t xTicksToWait)
          | ~~~~                            ^                                
          | auto                                                              -> bool
  • components/concurrency/src/ReadWriteMutex.cpp:57:33: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       57 | bool OpenShock::ReadWriteMutex::lockWrite(TickType_t xTicksToWait)
          | ~~~~                            ^                                 
          | auto                                                               -> bool
  • components/concurrency/src/SimpleMutex.cpp:7:1: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: m_mutex

        7 | OpenShock::SimpleMutex::SimpleMutex()
          | ^
  • components/concurrency/src/SimpleMutex.cpp:7:25: warning: [modernize-use-equals-default]

    use '= default' to define a trivial default constructor

        7 | OpenShock::SimpleMutex::SimpleMutex()
          |                         ^
        8 |   : m_mutex(xSemaphoreCreateMutex())
        9 | {
          | ~
          | = default;
       10 | }
          | ~
  • components/concurrency/src/SimpleMutex.cpp:17:30: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       17 | bool OpenShock::SimpleMutex::lock(TickType_t xTicksToWait)
          | ~~~~                         ^                            
          | auto                                                       -> bool
  • components/http/include/http/ContentTypes.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/http/include/http/HTTPRequestManager.h:1:1: warning: [portability-avoid-pragma-once]

    avoid 'pragma once' directive; use include guards instead

        1 | #pragma once
          | ^
  • components/http/include/http/HTTPRequestManager.h:15:14: warning: [performance-enum-size]

    enum 'RequestResult' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

       15 |   enum class RequestResult : uint8_t {
          |              ^
  • components/http/include/http/HTTPRequestManager.h:33:28: warning: [readability-identifier-length]

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

       33 |     Response(RequestResult r, int c, T d)
          |                            ^
  • components/http/include/http/HTTPRequestManager.h:33:35: warning: [readability-identifier-length]

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

       33 |     Response(RequestResult r, int c, T d)
          |                                   ^
  • components/http/include/http/HTTPRequestManager.h:33:40: warning: [readability-identifier-length]

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

       33 |     Response(RequestResult r, int c, T d)
          |                                        ^
  • components/http/include/http/HTTPRequestManager.h:40:5: warning: [modernize-use-nodiscard]

    function 'ResultToString' should be marked [[nodiscard]]

       40 |     inline const char* ResultToString() const
          |     ^
          |     [[nodiscard]] 
  • components/http/include/http/HTTPRequestManager.h:40:5: warning: [readability-redundant-inline-specifier]

    function 'ResultToString' has inline specifier but is implicitly inlined

       40 |     inline const char* ResultToString() const
          |     ^~~~~~
  • components/http/include/http/HTTPRequestManager.h:40:24: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       40 |     inline const char* ResultToString() const
          |            ~~~~~~~~~~~ ^                     
          |            auto                               -> const char*
  • components/http/include/http/HTTPRequestManager.h:72:25: warning: [modernize-use-trailing-return-type]

    use a trailing return type for this function

       72 |   Response<std::size_t> Download(std::string_view url, const std::map<String, String>& headers, GotContentLengthCallback contentLengthCallback, DownloadCallback downloadCallback, std::span<const uint16_t> acceptedCodes, uint32_t timeoutMs = 10'000);
          |                         ^
  • components/http/include/http/HTTPRequestManager.h:72:242: warning: [cppcoreguidelines-avoid-magic-numbers]

    10'000 is a magic number; consider replacing it with a named constant

       72 |   Response<std::size_t> Download(std::string_view url, const std::map<String, String>& headers, GotContentLengthCallback contentLengthCallback, DownloadCallback downloadCallback, std::span<const uint16_t> acceptedCodes, uint32_t timeoutMs = 10'000);
          |                                                                                                                                                                                                                                                  ^

Have any feedback or feature suggestions? Share it here.

- Checksum.h: include <type_traits>; shift on unsigned representation in
  Sum8(integral) to avoid implementation-defined behavior for negatives
- HTTPRequestManager.h: include <utility> for std::move
- OtaUpdateManager: use esp_task_wdt_reconfigure() to apply OTA WDT timeout
  (esp_task_wdt_init returns ESP_ERR_INVALID_STATE when already initialized),
  falling back to init when not yet initialized
- WiFiManager::GetIPAddress: pass ip.toString().c_str() and size the buffer
  with IP4ADDR_STRLEN_MAX instead of the IPv6 length constant; remove
  dead commented-out setAutoConnect/DNS blocks
@hhvrc hhvrc force-pushed the feat/arduino-3.0 branch from ad42ed3 to 9f602e8 Compare June 29, 2026 15:01
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.

3 participants