Skip to content

Feature loconet turnout#18

Open
chatelao wants to merge 5 commits intomrrwa:masterfrom
chatelao:feature-loconet-turnout
Open

Feature loconet turnout#18
chatelao wants to merge 5 commits intomrrwa:masterfrom
chatelao:feature-loconet-turnout

Conversation

@chatelao
Copy link
Contributor

No description provided.

google-labs-jules bot and others added 5 commits November 11, 2025 20:13
Adds support for peer-to-peer LocoNet Configuration Variable (CV) programming.

This change introduces the `LocoNetCVAccess` class to handle `OPC_PEER_XFER` messages for CV read/write operations. The existing `LocoNetCV` class is refactored to use this new class, while preserving existing functionality for discovery and programming start/stop.

A new example sketch (`CV-Access-ESP32`) is included to demonstrate the new feature, along with unit tests for the CV read and write callbacks.

The `README.md` has been updated with documentation for the new functionality.
Removes the incorrect `build_src_filter` from the `[env:esp32dev]` section of the `platformio.ini` file. This was causing the CI build to fail because it could not find the source files.

The test environment configuration has also been reverted to use `test_build_src = yes` to ensure consistency with local testing.
Adds the missing private member function declaration for `processMessage` to the `LocoNetCV` class in `LocoNetSVCV.h`.

This resolves a compilation error that was causing the CI build to fail.
This commit introduces a new `LocoNetTurnout` class to provide a high-level interface for controlling model railroad turnouts (switches) via LocoNet.

The new class encapsulates the creation of `OPC_SW_REQ` messages, simplifying the process for users of the library.

Key changes:
- Added `LocoNetTurnout.h` and `LocoNetTurnout.cpp` with the new class implementation.
- Included a new example sketch, `examples/Turnout-ESP32/Turnout-ESP32.ino`, to demonstrate usage.
- Updated `keywords.txt` to include `LocoNetTurnout` for Arduino IDE syntax highlighting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant