Repository navigation
Add domain info to Lua Version string - #3556
Conversation
|
How does this look on B&W radios? |
| } | ||
|
|
||
| bool isDomain868() | ||
| void setupDomainInfo(char *version_domain, uint8_t len) |
There was a problem hiding this comment.
- Include a comment about what the expected output of this function is for the various options it can setup
- len is actually maxlen
- Is your whitespace in this function 2 spaces, 4 spaces or 6 spaces? (it should be 4) :-D
| void FHSSrandomiseFHSSsequence(uint32_t seed); | ||
| void FHSSrandomiseFHSSsequenceBuild(uint32_t seed, uint32_t freqCount, uint_fast8_t sync_channel, uint8_t *sequence); | ||
|
|
||
| // setup domain info for Lua |
There was a problem hiding this comment.
This doesn't count as the comment "setup domain info" could mean so many things, but put it where the function body is
| #endif | ||
| static char modelString[] = "000"; | ||
| static char pwmModes[] = "50Hz;60Hz;100Hz;160Hz;333Hz;400Hz;10kHzDuty;On/Off;DShot;DShot 3D;Serial RX;Serial TX;I2C SCL;I2C SDA;Serial2 RX;Serial2 TX"; | ||
| static char version_domain[20+1+6+1]; |
There was a problem hiding this comment.
Include information as to what each of these numbers is there for instead of just being a pile of magic
There was a problem hiding this comment.
I have no idea where this came from. lib\tx-crsf\TXModuleParameters.cpp had this already defined without explanation. Maybe you know more. Anyhow, 26 characters is the max. that Lua can display without being overwritten by the commit info on color lcd radios.
I changed it to a plain 27 characters (26+'\0')
| return; | ||
| } | ||
|
|
||
| return; |
| strlcat(version_domain, FHSSconfigDualBand->domain, maxlen); // 2.4GHz | ||
| #else | ||
| strlcat(version_domain, FHSSconfig->domain, len); | ||
| strlcat(version_domain, FHSSconfig->domain, maxlen); |
There was a problem hiding this comment.
This is the same as the first case in the #ifdef, so I think you can just remove the #ifdef completely.
There was a problem hiding this comment.
That works too. The #ifdef would've save a few bytes flash in case of SX1280/SX127x.
done


This adds regulatory domain info to the Lua Version string for both RX and TX devices.
BetaFPV SuperP 14ch 2.4G, SX1280, CE_LBT:

BetaFPV SuperP 14ch 900M, SX127x, FCC915:

BayckRC 100mW Gemini , LR1121, Dual Band, FCC915M & ISM2.4G:

BayckRC 100mW Gemini, LR1121, Dual Band, EU868M & 2.4G CE_LBT:

RM XR2, LR1121, Single Band, ISM2.4G:
