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
Conversation
Rather than relying on regulatory domain which should only be used for FHSS
7d3c886
to
33299e2
Compare
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 is great! Thanks!
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.
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!)
* 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
* 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
* 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>
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.