Closed wimalopaan closed 2 days ago
Judging by crossfire device.lua
or even elrsV3.lua
, maxlen is sent as first byte after editable string termination character.
Judging by crossfire
device.lua
or evenelrsV3.lua
, maxlen is sent as first byte after editable string termination character.
As the docu says this is optional and the docu named that "string units".
Current docs are not accurate, for example 0x0D - COMMAND
does not specify timeout byte but elrsV3 uses it:
local function fieldCommandLoad(field, data, offset)
field.status = data[offset]
field.timeout = data[offset+1]
Current docs are not accurate,
Absolutely, therefore we need to file these issues ...
Current docs are not accurate, for example
0x0D - COMMAND
does not specify timeout byte but elrsV3 uses it:
This is the sort of thing the Issue tracker should be used for so I fix it, not as an offhand comment in the middle of someone asking a question. Thanks for pointing this out though, I've updated the documentation.
The maximum length of strings (parameter names and / or their values) is not well defined
Because there is no limit apart from being able to fit things. What "fits" is up to the generator (developer) of the messages to be viewed by their users. If a developer is targeting all EdgeTX users with a lua script, then they must strike the balance of brevity vs descriptiveness to fit on the screen. That's not the CRSF protocol's job-- best practices are what is most practical for the application. The strings can go on and on across many parameter chunks if that is what the developer intends.
The maximum length of strings (parameter names and / or their values) is not well defined. Only implicitly according to the maximum length of CRSF packets. But I think there should be a fixed maximum length e.g. 10 chars + end-of-string.