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

Merged
merged 18 commits into from
May 31, 2024
Merged

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 (LED pin has priority. Only 1 pin (first) gets to play 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.
  • Add special label info to MSP message (uint8_t/uint16_t?)
  • Flag Led pin in MSP message (use IO_TAG to check which pin is led)

@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

@mmosca mmosca merged commit 95ff86a into master May 31, 2024
14 checks passed
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.

4 participants