-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
SPI ELRS: Add bind the receiver with power-cycle 3 times #13475
base: master
Are you sure you want to change the base?
SPI ELRS: Add bind the receiver with power-cycle 3 times #13475
Conversation
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will hammer the flash memory. Perhaps gate this behaviour using USE_PERSISTENT_STATS
?
Sorry, can you be more specific? |
Put |
Because there is no reserved bind button.
b379a9a
to
eaa05e2
Compare
Needs increasing PG version to 1:
|
@SteveCEvans
Currently not have access to my ELRS TX - so waiting for delivery. |
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
How? @SteveCEvans @haslinghuis Could you help me take a look? |
Finally got a new radio with ELRS TX to test binding using the 3 power cycles method - which failed. Using the bind RX button in configurator I was able to bind with the SPI ELRS receiver without the code in the PR. |
So I need to set the UID to 0, 0, 0, 0, 0, 0. That’s it, but occasionally the problem of losing all flash occurs. @haslinghuis |
As written, it will overwrite config every power-up, even when receiver is already bound. At least gate it by receiver not detected before increasing counter. Much more useful would be gesture-based actions - wait for IMU calibration/stabilization, than start recognizing user gestures. For example roll-90-left, flat, roll-90-left, flat, pitch-90-up, flat (for right-handed people) could trigger binding (probably set binding flag and reboot). Hard to bind by mistake, easy to trigger (and we can add more gestures eventually) |
So how to fix it? I want add this feature in it. |
@Linjieqiang: You should probably write user documentation how to use this feature first. Just a draft here as comment should do. It will be then easier to comment code.
Do not increment count immediately after boot, but after delay. This dlay should be long enough for bound receiver to provide data. If RC is receiving data at this time, do not modify counter (or reset it to zero it is not reset). |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week. |
Need to finish it... |
Because some flight controllers do not have a reserved binding button, convenient binding cannot be performed outdoors. This idea comes from the ELRS external receiver.