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

Rename and use define for radio chip #1425

Merged
merged 4 commits into from Feb 24, 2022

Conversation

pkendall64
Copy link
Collaborator

@pkendall64 pkendall64 commented Feb 12, 2022

In a lot of places we are using the regulatory domain as a surrogate for the radio chip. So rather than using the regulatory domain, I've renamed the RADIO_900/2400 defines in the .ini files to RADIO_SX127X/SX1280. In most places where there were checks for Regulatory_Domain_* they have been changed to check the appropriate radio chip define.

The only places left checking for specific regulatory domains are EU_CE_2400 for LBT specific code paths, some _868 ones for different power values in some targets, and the FHSS tables.

This PR is part of the larger goal to build a "single" for each target. Actually two for 2G4, FCC and LBT.

Rather than relying on regulatory domain which should only be used for FHSS
src/python/build_flags.py Outdated Show resolved Hide resolved
src/targets/common.ini Outdated Show resolved Hide resolved
src/targets/common.ini Outdated Show resolved Hide resolved
Copy link
Collaborator

@cruwaller cruwaller left a comment

Choose a reason for hiding this comment

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

This is great! Thanks!

Copy link
Member

@CapnBry CapnBry left a comment

Choose a reason for hiding this comment

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

I've been hoping this would have been refactored to do it this way instead of having all them Team900 defines. Looks perfect! (although someone could complain that the prebuild error message is too wide to fit under the banner, but not me!)

@AlessandroAU AlessandroAU merged commit 84f2226 into ExpressLRS:master Feb 24, 2022
@pkendall64 pkendall64 deleted the define-radio-chip branch February 24, 2022 19:18
StonedDawg pushed a commit to StonedDawg/ExpressLRS that referenced this pull request Feb 27, 2022
* Define radio chip in target

Rather than relying on regulatory domain which should only be used for FHSS

* Move radio define to ini files

* Add missing =1

* Change RADIO_SX1280 to RADIO_SX128X
StonedDawg pushed a commit to StonedDawg/ExpressLRS that referenced this pull request Feb 28, 2022
* Define radio chip in target

Rather than relying on regulatory domain which should only be used for FHSS

* Move radio define to ini files

* Add missing =1

* Change RADIO_SX1280 to RADIO_SX128X
pkendall64 added a commit that referenced this pull request Feb 28, 2022
* initial device ping work

* working on other data type

ugly code base but working

fix conflict

cleanup before it gets messy

* populate real RX params

* Add antenna Mode

* clean up useless luaitem

clean up

more cleanup

more cleanup

enlarge packet size

* crude work for rf power (only lua params)

fix lua power config

* need to measure output, also start on other rxes

add the other rxes

* change power work but config.commit crashes?

* add comments

* merge back lua.cpp

* use power array

add others ower array

* "Fixes" for crashing when commiting config

* Add Pause/Resume on SX127x

* cleanup and add other rxes

* resolve conversation

* just re-ordering defines and white space cleanup

* add back mis-deleted function

* Revert "Add Pause/Resume on SX127x" and fix commit properly

This reverts commit aef1efb.

* Rename and use define for radio chip (#1425)

* Define radio chip in target

Rather than relying on regulatory domain which should only be used for FHSS

* Move radio define to ini files

* Add missing =1

* Change RADIO_SX1280 to RADIO_SX128X

* we got stray #endif

* remove domain_reg_2400 defines

* Add deferred execution in LUA

* Add missing include

Co-authored-by: Paul Kendall <pkendall64@gmail.com>
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.

None yet

4 participants