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

Allow LED pin to be reassigned as MOTOR or SERVO #10022

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

mmosca
Copy link
Collaborator

@mmosca mmosca commented May 11, 2024

This is a continuation of timer output mapping, adding led pins to the pool.

  • Add led option to timer_output_mode
  • Show led option in diff
  • Correctly set outputs as led
  • Update MSP messages to send full 32bit timer usageFlags
  • Verify LED behavior when assigning random output as LED
  • Verify Servo assigned to LED works. Needs changing light_ws2811strip.c to pick: IO_TAG(WS8211_PIN) if not remmaped, or first available pin tagged as TIM_USE_LED
  • Check all targets to make sure LED declaration in target.c comes after PWM outputs.

@mmosca mmosca added this to the 8.0 milestone May 11, 2024
@rmaia3d
Copy link
Contributor

rmaia3d commented May 12, 2024

This will be a GREAT feature! 👍

@mmosca
Copy link
Collaborator Author

mmosca commented May 12, 2024

Looks like led initialization happens beffore servo/motor outputs, causing later, when overriding the led output with led enabled.

Previously it used IO_TAG to check for the LED pin directly
This changes led hardware setup to prefer original led pin, but fall
back to reassigned LED pin if that was changed to something else.
@MrD-RC
Copy link
Collaborator

MrD-RC commented May 24, 2024

It would be great if the LED pad could be assigned to PINIO too.

@sensei-hacker
Copy link
Collaborator

sensei-hacker commented May 24, 2024

It would be great if the LED pad could be assigned to PINIO too.

There's a another recent PR which allows the LED pin to be user-controlled PWM from 0% to 100%. Which includes 0 and 100, so functionally a PINIO*, but only controllable from Programming.

I wasn't able to confirm that other PR, which was merged, actually works - but maybe I don't know how to use my new oscilloscope.

  • Where "PINIO" actually means "PIN_O" - I wish we had "I" (input).

@mmosca
Copy link
Collaborator Author

mmosca commented May 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants