-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Added initial CMS framework (CRSF Only) #339
Conversation
Will this go into lua-scripts 1.5.0? |
Not likely. Can't have this without the other PR. Didn't make the cut for 4.2 due to timing on my behalf. |
Also need to work in screen definitions for hi-res radios. (Horus, t16, etc) |
Added support for 480x272 screens (Jumper, Horus, etc) |
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.
Looks good to me, only a couple of minor remarks.
src/SCRIPTS/BF/CMS/common.lua
Outdated
local dest = {} | ||
local rpt = false | ||
local c = nil | ||
for i=1, #buf do |
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.
Coding standard is to have spaces around operators.
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.
Will address
src/SCRIPTS/BF/CMS/common.lua
Outdated
@@ -0,0 +1,120 @@ | |||
local _ = { |
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.
What's the reason to name this _
? I thought convention in lua was to use _
for unused values
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 was just a convenient way of bucketing constants into a single reference object, while limiting keystrokes and improving readability. Open to suggestions.
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.
CONST
?
src/SCRIPTS/BF/radios.lua
Outdated
left = 156, | ||
}, | ||
exit = { | ||
event = EVT_VIRTUAL_EXIT |
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.
Seems to be the same everywhere - does this need to be configured per screen size, now that we have virtual events?
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.
It would be great if cmsConfig
could be loaded only for the CMS version since it's not needed for the MSP version.
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.
can they be called separate versions if they're based on the same framework?
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.
@mikeller this virtual event is kind of an assertion, as I don't have all of the hardware to confirm usability in this context. I'd like to have this tested on multiple platforms to see if it can truly be unified.
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.
@klutvott123 would the suggestion then be to have radiosMsp and radiosCms? I feel like having them in one object is a little more DRY in nature.
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.
would it be better to put the MSP related attributes in a nested msp
table and the cms related attributes into a nested cms
table (instead of cmsConfig
)? While cleaner, it would be quite disruptive to the rest of the codebase.
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.
@codecae I'm using the word "version" loosely 😁. I was thinking maybe pass a variable to radios.lua when executing it and put cms or msp stuff into the radio
table based on that.
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 added an update to separate the msp
vs cms
attributes in the radio config. I think this is a good compromise. Let me know what you think.
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.
@codecae Looks good to me! 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.
Looks good to me. Can I get you to rebase / squash please?
Will do 👍 |
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
Initial CMS framework and tool script. Currently for CRSF only.
Blocked by CMS over CRSF Compression PR found here