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

smartport: added MSP/SPORT bridge #2504

Closed

Conversation

raphaelcoeffic
Copy link
Contributor

@raphaelcoeffic raphaelcoeffic commented Nov 18, 2016

This new feature allows for using the MSP interface over smart port, for example from a LUA script.
Please note that it has not been tested with cleanflight, only with betaflight. I need to shrink the naze target first, so that I can test it on my devel board.

This PR is related to issue #2474.

@raphaelcoeffic
Copy link
Contributor Author

Another thing: the build fails with NAZE only, because of that:

region `FLASH' overflowed by 584 bytes

Any suggestion how to solve it? Should it be made optional? I have no idea what should be done here.

@hydra
Copy link
Contributor

hydra commented Nov 18, 2016

yes, make it optional. Current there are SKIP_* and USE_* defines. We prefer USE_*. So please add USE_SMARTPORT_MSP_BRIDGE. Then edit the makefile and add a section to add USE_SMARTPORT_BRIDGE for all F3 targets. There's an example of this at around 224-234.

All the F1 targets are space limited.

Unless you prefer adding 'USE_SMARTPORT_MSP_BRIDGE' to each F3 target.h file?

Other suggestions welcomed. Pick one at your discretion, we can always change that bit later anyway, not critical.

Please perform some testing too.

@hydra hydra added this to the 2.0.0 milestone Nov 18, 2016
@raphaelcoeffic
Copy link
Contributor Author

@hydra the current head of master does not fit either into NAZE target:

ld: region `FLASH' overflowed by 194 bytes`).

However, with the current modifications to smartport (MSP bridge OFF), I get 20 bytes back.

@raphaelcoeffic raphaelcoeffic force-pushed the cf_sport_msp branch 2 times, most recently from 952667a to 13de792 Compare November 21, 2016 01:10
@raphaelcoeffic
Copy link
Contributor Author

raphaelcoeffic commented Nov 21, 2016

I've tested it on SPRACINGF3EVO + opentx 2.2 + LUA script, and it works just fine. Some modifications might still be needed to better adapt the LUA script to cleanflight's rate settings (had some troubles first understanding how they work).

Copy link

@TobysF TobysF left a comment

Choose a reason for hiding this comment

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

files changed

@hydra
Copy link
Contributor

hydra commented Feb 5, 2017

Hi @raphaelcoeffic

Is this code up to date? have there been any more changes in BF that need merging in with this PR?

@raphaelcoeffic
Copy link
Contributor Author

Hi @hydra!

Nope, the code in smartport.c has been pretty stable and working steadily. Did you try it out? I'm not 100% sure I've understood the configuration in cleanflight correctly. If you get the chance, it would be good if you could have a try at the LUA script and see if the values are used/interpreted correctly.

@hydra
Copy link
Contributor

hydra commented Feb 5, 2017

@raphaelcoeffic which part of the configuration are you struggling with?

@hydra hydra modified the milestones: 1.15.0, 2.0.0 Feb 5, 2017
@raphaelcoeffic
Copy link
Contributor Author

raphaelcoeffic commented Feb 5, 2017 via email

@hydra hydra closed this Feb 25, 2017
martinbudden added a commit to martinbudden/cleanflight that referenced this pull request Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants