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

feat(cpn): add support for surface radios inc Radiomaster MT12 #5381

Merged
merged 36 commits into from
Sep 26, 2024

Conversation

elecpower
Copy link
Collaborator

@elecpower elecpower commented Aug 4, 2024

Fixes #4969

Summary of changes:

  • add support for surface radios
  • add support for Radiomaster MT12
  • move lcd capabilities from firmware to boards
  • minor fixes found during testing
  • more post ADC refactor fixes
  • housekeeping

TODO

  • surface radio configuration
  • Companion yaml encode/decode own models and settings
  • surface radio decode Companion encoded yaml
  • Companion decode radio encoded yaml
  • surface radio simulator
  • MT12 default settings eg battery, screen
  • MT12 radio configuration
  • MT12 generic simulator operation i.e. no custom images and buttons

Screenshot from 2024-09-19 09-07-24

@elecpower elecpower added enhancement ✨ New feature or request companion Related to the companion software simulator labels Aug 4, 2024
@elecpower elecpower marked this pull request as draft August 4, 2024 22:13
@elecpower elecpower marked this pull request as ready for review September 17, 2024 22:24
@elecpower elecpower added the needs: rebase A git rebase on top of the latest destination branch version is required label Sep 17, 2024
@pfeerick pfeerick added this to the 2.11 milestone Sep 19, 2024
@3djc
Copy link
Collaborator

3djc commented Sep 20, 2024

Add a very brief look, on the simu, the left stick can only be moved horizontally and does steering, good, but the right one that does throttle, is also only horizontal, which makes it really difficult for user to understand which one is which. Could the right one made to only move vertically ?

@elecpower
Copy link
Collaborator Author

Add a very brief look, on the simu, the left stick can only be moved horizontally and does steering, good, but the right one that does throttle, is also only horizontal, which makes it really difficult for user to understand which one is which. Could the right one made to only move vertically ?

@philmoz also raised this. Yes it can be re-orientated.

@philmoz
Copy link
Collaborator

philmoz commented Sep 20, 2024

Looking good - will do more testing later.

One thing - button text is clipped slightly on MacOS.
Screenshot 2024-09-21 at 8 25 57 AM

@philmoz
Copy link
Collaborator

philmoz commented Sep 20, 2024

Reading from radio and writing back to radio seems to work ok. No obvious issues with conversion.

@philmoz
Copy link
Collaborator

philmoz commented Sep 20, 2024

I think the LCD and buttons could be bigger.

I had a look at the LCD code and it seems it could do scaling based on widget size (rather than just x2):
Screenshot 2024-09-21 at 9 43 29 AM

Patch for this (have not tested if it affects other simulators yet):
lcd scale patch.diff.txt

@elecpower
Copy link
Collaborator Author

If we enlarge the lcd then buttons could also be enlarged and widened to take into account each OS font.

@elecpower
Copy link
Collaborator Author

Need to test layout for the new screen size you have been working on for a while so we have the full range covered.

@3djc 3djc mentioned this pull request Sep 23, 2024
1 task
@elecpower
Copy link
Collaborator Author

elecpower commented Sep 24, 2024

@pfeerick can we get this one in asap to exposed to more testers and opinions plus reduce the complexity of any merge conflicts.

Another PR on a generic sim for all radios would follow including auto resizing to lcd and scale the smaller ones along the lines @philmoz has suggested.

@elecpower
Copy link
Collaborator Author

I'm also considering custom surface widgets for throttle/brake and steering to substitute for the air joysticks. Will need to determine how much effort and float mock up with surface users.

@pfeerick
Copy link
Member

If you are happy with this as it is, fine with me :) I'm not able to do much for the next few days on project so won't catch anything more than blindingly obvious issues. Just downloading the PR build now, will merge shortly if nothing immediate jumps out.

@pfeerick pfeerick removed the needs: rebase A git rebase on top of the latest destination branch version is required label Sep 26, 2024
@elecpower
Copy link
Collaborator Author

@3djc and @philmoz have performed some checks and nothing stood out. Some other testers this far out from 2.11 release is a good thing to enable time to fix.

@pfeerick pfeerick merged commit 149e1a2 into main Sep 26, 2024
51 checks passed
@pfeerick pfeerick deleted the elecpower/cpn-surface-radios branch September 26, 2024 10:39
@bd4
Copy link

bd4 commented Sep 26, 2024

Thanks for all the work on this! will test this weekend.

@HungryGhostLiving
Copy link

Kills Global Functions/Special Functions switch data when copying model in companion MT12

@elecpower
Copy link
Collaborator Author

Steps to reproduce please as this is too vague

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
companion Related to the companion software enhancement ✨ New feature or request simulator
Projects
None yet
6 participants