Skip to content
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

Custom Boards - 2nd core can be used on rp2040 #320

Merged
merged 36 commits into from
May 27, 2024

Conversation

elral
Copy link
Collaborator

@elral elral commented Mar 22, 2024

Description of changes

On Picos the 2nd core is used to run the set() function of the community devices.
With this change setting a new value to a community device will not lead to missed input events even if the set() function needs much more time.

The FreeRTOS lib is used to initialize and run the 2nd core of a Pico. Data from the 1st core to the 2nd core is transferred by using the build in fifo. Once all data is received the 2nd core calls the set() function of the community device.
To activate this feature only one define within custom.platformio.ini is required. Once -DUSE_2ND_CORE is set, this feature is enabled. If it is not set or even not available, the 2nd core of the pico is not used and everything is like before. So it's fully backward compatible, the 2nd core will not be used as long as the above mentioned flag is not set.

Fixes #319

@elral elral requested a review from DocMoebiuz as a code owner March 22, 2024 09:18
Copy link

Firmware for this pull request:
Firmware.zip

Copy link

Firmware for this pull request:
Firmware.zip

Copy link

Firmware for this pull request:
Firmware.zip

Copy link

github-actions bot commented May 5, 2024

Firmware for this pull request:
Firmware.zip

Copy link

github-actions bot commented May 6, 2024

Firmware for this pull request:
Firmware.zip

uint8_t command, stepper;
int32_t param1, param2;

while (1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

while (true) would be prettier.

@DocMoebiuz
Copy link
Collaborator

i think the description of this PR requires a bit more documentation on the actual scope and how to use it.

  • Enable 2nd core support for Custom Devices
  • Enable 2nd core support for Steppers
  • Default settings used for firmware build

Copy link
Collaborator

@DocMoebiuz DocMoebiuz left a comment

Choose a reason for hiding this comment

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

see my comments.

Copy link

Board and firmware folder for this pull request:
Mobiflight-Connector.zip

Copy link

Board and firmware folder for this pull request:
Mobiflight-Connector.zip

Copy link

Board and firmware folder for this pull request:
Mobiflight-Connector.zip

@DocMoebiuz DocMoebiuz self-requested a review May 27, 2024 20:02
@DocMoebiuz DocMoebiuz changed the title Use 2nd core 2nd core can be used on rp2040 May 27, 2024
@DocMoebiuz DocMoebiuz changed the title 2nd core can be used on rp2040 CustomBoards - 2nd core can be used on rp2040 May 27, 2024
@DocMoebiuz DocMoebiuz merged commit 00b310e into MobiFlight:main May 27, 2024
1 check passed
@elral elral deleted the use_2nd_core branch May 28, 2024 04:17
@DocMoebiuz DocMoebiuz changed the title CustomBoards - 2nd core can be used on rp2040 Custom Boards - 2nd core can be used on rp2040 Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Community devices might need too much time for setting new value
2 participants