ZZ-Cat / CRSFforArduino

An Arduino Library for communicating with ExpressLRS and TBS Crossfire receivers.
GNU General Public License v3.0
120 stars 17 forks source link

Raspberry Pi Pico W #109

Open britannio opened 2 months ago

britannio commented 2 months ago

Minimum requirements

What development board would you like me to add?

It seems like this is the only change to make: https://github.com/britannio/CRSFforArduino/commit/d699599c98fd81b6892564f6d36f5fbb35719b60

ZZ-Cat commented 2 months ago

Issue closed: Pico W not supported in PlatformIO

You have reminded me that I need to update my issue template here and clarify that a potential target MUST be supported in both the Arduino IDE and PlatformIO.

The Pico W, IIRC uses Earle Philhower's Arduino Pico package, of which is not supported by PlatformIO at this time.
This means that, for the time being, it is available exclusively in the Arduino IDE. Thus, PlatormIO users lose out.

I highly recommend you make some noise in this Issue over on PlatformIO's repository, because I simply cannot add more Pico-based development boards beyond what is simultaneously supported in the Arduino IDE and PlatformIO.

britannio commented 2 months ago

It's not officially supported by PlatformIO but it is quite trivial to make it work by changing two lines of platformio.ini and this is how I'm using the Pico W so PlatformIO users do not lose out.

ZZ-Cat commented 2 months ago

It's not officially supported by PlatformIO

The focus is to add boards that are officially supported in the Arduino IDE (either by Arduino themselves or through third party board packages via the Additional Boards URL field) and PlatformIO.

I simply will not add boards with unofficial support in both the Arduino IDE or PlatformIO to CRSF for Arduino's Compatibility Table. If the board-in-question is officially supported in both the Arduno IDE and PlatformIO, then I will add it to the Compatibility Table.

Adding boards with unofficial support, or adding boards that are supported in one IDE and not the other creates a level of uncertainty and inconsistency with CRSF for Arduino that I am not willing to take on. The juice is not worth the squeeze.


it is quite trivial to make it work

I understand that it's easy to implement your request. Be that as it may, simplicity versus complexity does not guarantee your request will be fulfilled, especially when there is a valid reason as to why it cannot be fulfilled.


this is how I'm using the Pico W so PlatformIO users do not lose out.

I sympathise greatly with folks that are using RP2040-based development boards and their inability to use them with PlatformIO beyond the two boards that are officially supported. I would add support for every RP2040-based target in a heartbeat if they were officially supported in PlatformIO. However, at this time (and for the forseeable future), they are not; and this is something that is beyond my control. Therefore it is not my call to make.

Rest assured, as soon as PlatformIO officially supports most RP2040-based targets, they will be added to the Compatibility Table here in CRSF for Arduino.

My decision is final, and this is not up for debate.
I am locking this discussion, because it is finished. I am calling it here, and moving on.

ZZ-Cat commented 2 months ago

Issue re-opened: Pico and Pico W support can be added after all

Hi @britannio Apologies for being too abrupt yesterday, and hastily shutting this Issue down.

I was reading through this section of Earle Philhower's Arduino-Pico package, and it turns out I was wrong. My information on why the vast majority of RP2040-based targets couldn't be added to CRSF for Arduino's Compatibility Table was outdated.
Based on the new information I was reading today, it actually can be done. Looks like you and a lot of other folks will get more RP2040 support after all.

So, I have re-opened this issue and removed the "I'm not doing this" label and replaced it with the "In progress" label.

As I am writing this comment, I am currently checking out the Arduino-Pico package, and I am conducting some internal tests in a private branch, to ensure everything is all a-okay. Once the build succeeds, I will publish the branch and attach a Pull Request to it, and go from there.


Update 1723 Hrs NZST

I successfully installed Max Gerhaldt's PlatformIO integration of Earle Philhower's Arduino-Pico package, and did a build test on my local branch. You're in luck, 'cause look... :point_down:
Screenshot from 2024-04-15 17-18-06

Also, this :point_down: was highlighted in my Compatibility Table...
Screenshot from 2024-04-15 17-27-59

Conclusion

Your request has been added to my development pipeline, and it will make it into the upcoming release of Version 1.1.0. I may require some assistance with testing on the target itself, granted I don't have any RP2040-based targets available on-hand to test on my end.

britannio commented 2 months ago

:)