-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(platformio): CRSF for Arduino not recognised as a dependency #77
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The current file-and-folder structure has proven itself to be problematic when CRSF for Arduino is used as a PlatformIO dependency. This marks the beginning of a re-write of the entire file-and-folder structure to improve compatibility with PlatformIO whilst maintaining compatibility with the Arduino IDE. While efforts are underway to minimise the possibility of CRSF for Arduino's functionality being broken, there are no guarantees that this re-factor will not introduce any broken code.
So far, all of CRSF for Arduino's functionality is temporarily disabled while I rearrange all of its source files.
1 task
…ing `ARDUINO` and `PLATFORMIO` flags to decide how certain file paths should be included This seems to be what broke compatibility with PlatformIO and the Arduino IDE.
TIL: Dynamic memory doesn't return null pointers, even when `new(nothrow)` is used in place of `new`.
Functionality is _yet_ to be reinstated
Functionality is _yet_ to be reinstated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🚨 Blocks Release 🚨
No release is to be made, until this is resolved.
Bug Fix 👋💥🐞
Bug meet swatter!
Compiler 💻
This happens during compiling/building/verifying
PlatformIO 👽
This is specific to PlatformIO.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
#76 has sparked a much needed reshuffle of CRSF for Arduino's file directory to ensure it is fully compatible with PlatformIO, especially when CRSF for Arduino is used as a dependency.
Details
CRSF for Arduino's layout is standardised with the latest Arduino Library Specifications, making it fully compatible with both the Arduino IDE and PlatformIO.
In PlatformIO's case, CRSF for Arduino can be used as a dependency for your project.
To do this, simply add
https://github.com/ZZ-Cat/CRSFforArduino.git @^1.0.0
to yourlib_deps
in yourplatformio.ini
configuration file.Additional notes
I did a little local "end user" PlatformIO project on my end to see exactly what is going on when CRSF for Arduino is used as a dependency, and BOY WAS THIS AN EYE OPENER!!!
As it turns out, relying on both the
ARDUINO
andPLATFORMIO
flags wasn't all I thought it was cracked up to be.Instead, CRSF for Arduino defines a
CFA_DEVELOPMENT_MODE
flag in itsplatformio.ini
configuration file.This flag is automatically defined on my end (because I'm CRSF for Arduino's primary developer), and CRSF for Arduino compiles with impunity. This should work well for those that want to contribute to my project in the future.