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 your lib_deps in your platformio.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 and PLATFORMIO flags wasn't all I thought it was cracked up to be.
Instead, CRSF for Arduino defines a CFA_DEVELOPMENT_MODE flag in its platformio.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.
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.