Replies: 7 comments 6 replies
-
Given the most... visible... impact will be to Lua scripts (as the rest is mostly internal cleanup), it would be good to get feedback from some of the Lua script devs on this proposal as summarised specifically for Lua at the bottom (these are some who come to mind offhand): @lshems @JimB40 @offer-shmuely @frankiearzu @yaapu @stronnag @CapnBry @klutvott123 |
Beta Was this translation helpful? Give feedback.
-
@JimB40 Understand what you are saying; but I'm not proposing to change any of that, other than suppressing the BREAK event after a LONG/REPT event. The main concern is if the changes to the PAGEDN / PAGE events will impact existing scripts. |
Beta Was this translation helpful? Give feedback.
-
That's all well and good; but this discussion is not about re-designing the Lua event API. I would appreciate if you could just focus on the proposed changes to the existing Lua EVT names. |
Beta Was this translation helpful? Give feedback.
-
Okay here you have focus:
Not sure about final conept so to confirm. Possible events queue now:
Events queue after change
Not sure what you mean here. Please give example of radio with single PAGE key where EVT_PAGE_REPT is not possible. |
Beta Was this translation helpful? Give feedback.
-
T16, T18 and X10 are all defined as using PAGEDN/PAGEUP - i.e. the Lua event names are EVT_PAGEDN_xxx and EVT_PAGEUP_xxx (regardless of what is printed on the radio button).
Ok, so the event names have to remain the same.
As I said - current firmware (as in main branch & 2.10). PR #4833 removes the BREAK(PAGE) after LONG(PAGE) for B&W radios with a single PAGE key (to match the issue fixed in PR #2668 for color radios). This also kills the subsequent REPT events. |
Beta Was this translation helpful? Give feedback.
-
I do not see any issue on the script I have. however I do thing that API behavior changes, should be on major version only. |
Beta Was this translation helpful? Give feedback.
-
Over time the code for handling KEY events (ENTER, EXIT, PAGE, etc) has become somewhat messy.
I'd like to propose some changes and get feedback.
Barring bugs these should not affect the functionality of the radio firmware; but may have some impact to Lua scripts (see below).
Some terminology first. There are four types of events generated when a key is pressed on the radio:
1. A short key press event (BREAK) is always generated after a long press of any key.
2. Change action triggering from using FIRST to using BREAK.
3. Change LONG(PAGEDN) to BREAK(PAGEUP) for color radios with only a PAGEDN key.
4. Change the PAGE key definition for B&W radios to PAGEDN in the code.
Impacts to Lua scripts.
Because the LONG press event is converted to a BREAK event it is not possible to have REPT events for radios with a single PAGE/PAGEDN key. This is also true in the current firmware.
For radios with both PAGEUP and PAGEDN keys there is no change - all four event types are available for both keys.
Beta Was this translation helpful? Give feedback.
All reactions