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

Rationalise module size handling #3624

Merged
merged 11 commits into from
Jul 16, 2023
Merged

Rationalise module size handling #3624

merged 11 commits into from
Jul 16, 2023

Conversation

3djc
Copy link
Collaborator

@3djc 3djc commented May 25, 2023

This attempt to clean a currently 'unclean' situation regarding external module size : depending on radio and/or module type, the list of available external module varies greatly, sometime without apparent logic.

This is built on the following assumptions:

  • display only the module that will work on a radio without using adapters or modding the radio
  • leave the possibility through compilation option to choose what to display

The modules fall into 3 groups:
A) both : those are the module that exist both in JR or small size, and that are accssed by the radio in the exact same way. Those will appear by default in all radio. This includes:
CRSF/ELRS
MULTI
GHOST
PPM
SBUS

B) those existing only on JR size, and been showed by default only in radio with JR bay
XJT
R9M
R9M ACCESS
DSM2
Lemon DSMP

C) those existing only in small size, and been showed by default only in radio with small bay
XJT Lite
R9M Lite
R9M Pro

@mha1
Copy link
Contributor

mha1 commented May 25, 2023

Hi, good idea!

radio/src/targets/taranis/hal.h line 1780: think you accidentally removed a character at the end of the comment. PD.0 -> PD.08

@pfeerick
Copy link
Member

LemonRX DSMP is indeed only JR Micro only form factor AFAIK. And I only knew of DSM2 modules in same form factor, but I've not actively followed the Nano form factor.

A second part of the Nano assumption is that XJT Lite and R9M Lite (I don't know about the R9M Pro) will NOT work with any JR Micro adapter that I know of due to the use of the extra UART pins for ACCESS. I don't know of any Nano to JR Micro adapter that can work with that ;)

@3djc
Copy link
Collaborator Author

3djc commented May 25, 2023

I think all comment so far taken into account

@elecpower
Copy link
Collaborator

elecpower commented May 26, 2023

@3djc do you want me to knock up a Companion side PR?
My thought is a an External Module drop down list (None, Small, Standard) in Radio Profile Settings to cater for default and custom builds. When creating a new profile the initial value will be the radio compile default.
This value then used for Model Setup External Radio Module list of available Protocols.

@3djc
Copy link
Collaborator Author

3djc commented May 26, 2023

@3djc do you want me to knock up a Companion side PR?
My thought is a an External Module drop down list (None, Small, Standard) in Radio Profile Settings to cater for default and custom builds. When creating a new profile the initial value will be the radio compile default.
This value then used for Model Setup External Radio Module list of available Protocols.

That would be really cool, but I think it should really be two options (standard/JR and small) where you can tick none, one or both.

If that can help, I can do a complete list of radio with their default

@elecpower
Copy link
Collaborator

That would be really cool, but I think it should really be two options (standard/JR and small) where you can tick none, one or both.

I assumed the choices would be mutually exclusive and thus the list. Also tick boxes might be a bit confusing to newbies and prone to being changed without understanding consequences.

This choice is per radio profile so you can have multiple profiles for say a TX16S with different external modules. Why not a list of None, JR, Small, Custom? IMO Standard implies factory supplied thus why I propose JR without Standard otherwise some may change Small to JR/Standard assuming the default is wrong and then cannot understand why their protocol is missing when configuring a model.

If that can help, I can do a complete list of radio with their default

That would be very helpful, thanks.

@3djc
Copy link
Collaborator Author

3djc commented May 27, 2023

A list with none/std/small/both would work too. Yes, like many other choices, that break things when wrong :(. I think 99.9% of users will use default, hence that choice can (should ?) be a bit hidden ;)

  • none is for case you need more eeprom, or you have your radio in a tray and know you will not be using an external module (or your radio defualt is none)
  • both are for those who own adapters and use both module size
  • changing default (small to JR or JR to small): I have see users modding and printing alternate case to permanently change the type of module their radio uses (typical is Zorro modded for JR modules, but it tend to become less frequent with nice namo modules comming out).

Will do the list, and update my PR because this discussion reminds me that no module means HARDWARE_EXTERNALM_MODULE needs to be undefined :)

All colorlcd (but EL18 bellow): Standard
EL18 : both
X9E: Standard (but I wonder if none would not be a better choice)
X9D: Standard
X9D+: Standard
X9D 2019: Small
X7 : Standard
T12: Standard
TPRO: Small
TLITE: Small
TLITEF4: Small
LR3PRO: Small
TX12:Standard
TX12MK2:Standard
BOXER: Standard
ZORRO:Small
T8:None
COMMANDO8: None (unsure)
X7 ACCESS: Standard
X9LITE:Small
X9LITES:Small
XLITE:Small
XLITES:Small

@elecpower
Copy link
Collaborator

Thanks for the list

@pfeerick
Copy link
Member

pfeerick commented Jul 16, 2023

I just noticed in the list at #3624 (comment) that the x9d+2019 is listed as having a small module, when in fact it has a JR Micro / Standard module bay. Working on the assumption that this was a mistake, I've changed that - just change it back if it was done due to an edge case or something.

edit: As a site note, it would be nice to be able to filter the UI list even tighter... i.e. can the TX12MK2 even drive a R9M ACCESS module? Same applies for some other radios/form factors.

@pfeerick pfeerick merged commit a3ab20f into main Jul 16, 2023
36 checks passed
@pfeerick pfeerick deleted the 3djc/module-size branch July 16, 2023 01:06
@3djc
Copy link
Collaborator Author

3djc commented Jul 16, 2023

I just noticed in the list at #3624 (comment) that the x9d+2019 is listed as having a small module, when in fact it has a JR Micro / Standard module bay. Working on the assumption that this was a mistake, I've changed that - just change it back if it was done due to an edge case or something.

Sorry my bad

edit: As a site note, it would be nice to be able to filter the UI list even tighter... i.e. can the TX12MK2 even drive a R9M ACCESS module? Same applies for some other radios/form factors.

Yes it can, it needs a full uart, which it does have, but i'm gonna check how well (or not) it is actually handled

@3djc
Copy link
Collaborator Author

3djc commented Jul 16, 2023

Handling is right imho :

if (moduleType == MODULE_TYPE_XJT_LITE_PXX2 ||

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants