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

RC Switch and Button support and refactor #19341

Open
junwoo091400 opened this issue Mar 16, 2022 · 9 comments
Open

RC Switch and Button support and refactor #19341

junwoo091400 opened this issue Mar 16, 2022 · 9 comments

Comments

@junwoo091400
Copy link
Contributor

Describe problem solved by the proposed feature
Currently, PX4 doesn't support the following setup :

  • Having one channel in RC configured for flight mode selection (e.g. Low : Position / High : Follow Me mode)
  • Having an RTL button for activating Return To Launch by just pressing on the button once.

As the PX4 only considers 'Switches' (where you need to keep the RC signal state fixed, opposed to buttons which only changes signal momentarily), it's impossible to have the Button setup. Meaning, I need to be keep on pressing the RTL button for the RTL to stay activated throughout the RTL maneuver.

Describe your preferred solution
A clear and concise description of what you want to happen.

Describe possible alternatives
A clear and concise description of alternative solutions or features you've considered.

Additional context
Testing on the Mantis drone RC controller. Which has RTL button on lower-left and Flight mode button on lower-right.

image

FYI @dagar @MaEtUgR

@benjinne
Copy link
Contributor

So buttons do work in some cases if you can configure your controller appropriately. For example with the radiomaster tx16 the buttons aren't momentary and instead latch and light up once the button is selected. That way it sort of acts like a switch. Since it seems like you can't configure your controller, I suggest looking at how the kill-switch works since it executes a permanent action on a momentary pulse.

@junwoo091400
Copy link
Contributor Author

Thanks for your input! Yes I will check how that works :)

@junwoo091400
Copy link
Contributor Author

Initial support and Unit tests being added here by @MaEtUgR : https://github.com/PX4/PX4-Autopilot/tree/rc-mode-switch-and-button

@junwoo091400
Copy link
Contributor Author

/bounty $0

@junwoo091400
Copy link
Contributor Author

/bounty $0.1

@junwoo091400
Copy link
Contributor Author

/bounty $1

Copy link

algora-pbc bot commented Nov 5, 2023

💎 $1 bounty created by junwoo091400
🙋 If you start working on this, comment /attempt #19341 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #19341 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to PX4/PX4-Autopilot!

Attempt Started (GMT+0) Solution
🟢 @junwoo091400 #19638

Copy link

algora-pbc bot commented Nov 5, 2023

💡 @junwoo091400 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

@DronecodeBot
Copy link

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-november-07-2023/35031/1

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

No branches or pull requests

3 participants