Skip to content

Adhere to the CRSF spec for folders - #3123

Merged
pkendall64 merged 3 commits into
ExpressLRS:3.x.x-maintenancefrom
pkendall64:crsf-folder-fixes
Mar 31, 2025
Merged

pkendall64 merged 3 commits into
ExpressLRS:3.x.x-maintenancefrom
pkendall64:crsf-folder-fixes

Conversation

@pkendall64

@pkendall64 pkendall64 commented Jan 29, 2025 •

Copy link
Copy Markdown
Collaborator

As described in #3121, ELRS was not correctly forming the folder parameter response packets.
As a side benefit, this fix makes TBS Agent lite much more usable with ELRS!

AgentLite prior to this PR

screen-2025-03-28-102628

AgentLite after this PR

screen-2025-03-28-103025
screen-2025-03-28-103032
screen-2025-03-28-103042

@CapnBry

CapnBry commented Jan 30, 2025

Copy link
Copy Markdown
Member

I was aware of this but never bothered to fix it because we don't use it and I didn't want to send any extra data to parse in the Lua that we wouldn't use 😆.

Can you combine it with the existing code that does the same thing in registerLUAParameter() (nullptr case)? The 0'th item sent is always a folder as well with name "HooJ" which contains all the root level items.

@pkendall64

Copy link
Copy Markdown
Collaborator Author

I moved the special nullptr case to static initialisation and removed the redundant code. Makes it a bit simpler.

@wimalopaan

Copy link
Copy Markdown

The 0'th item sent is always a folder as well with name "HooJ" which contains all the root level items.

What is the reason to send this strange folder name? Just send an empty string.

@pkendall64

Copy link
Copy Markdown
Collaborator Author

The 0'th item sent is always a folder as well with name "HooJ" which contains all the root level items.

What is the reason to send this strange folder name? Just send an empty string.

Because when we had to reverse engineer this thing we thought it might be necessary to make it work with Agent Lite.

@wimalopaan

wimalopaan commented Jan 31, 2025 via email

Copy link
Copy Markdown

@JimB40

JimB40 commented Jan 31, 2025

Copy link
Copy Markdown

Actually you can send anything as root folder name because it is not displayed.
'root' as name should be default but if you code 'elrs_main_folder' it will work as long as name ends with 0x00

Btw any fancy polish coder entered current root folder name?
Phonetically sounds insulting :)

@CapnBry

CapnBry commented Jan 31, 2025

Copy link
Copy Markdown
Member

Mmh, TBS works well with an empty string as root folder name.

That's interesting because TBS used to be called HooJ, that's why ours says HooJ as well. Maybe they changed it because they wanted to not be like us being like them!

@CapnBry
CapnBry self-requested a review January 31, 2025 22:12

@MUSTARDTIGERFPV MUSTARDTIGERFPV left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

HooJ indeed

@deadbytefpv deadbytefpv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

HooJ it is!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ELRS response to CRSF-request of folder-type parameters

6 participants