Press Event missing

Support for KnobFS, share your experience and KnobFS modes.

Moderators: russ, Ralph

Post Reply
Message
Author
roland_lfor
Posts: 9
Joined: Thu Nov 10, 2022 6:55 pm

Press Event missing

#1 Post by roland_lfor »

Hi,
Beside the RELEASE event available, it would be useful to have also a PRESS event to trigger.
For example in the FENIX A320, most of buttons takes two commands to operate, 1 to press and 1 to release button.
Thanks
Last edited by roland_lfor on Thu Feb 23, 2023 6:10 pm, edited 3 times in total.

SimPassion
Posts: 5346
Joined: Thu Jul 27, 2017 12:22 am

Re: Push Event missing

#2 Post by SimPassion »

roland_lfor wrote: Tue Feb 21, 2023 8:02 am Hi,
Beside the RELEASE event available, it would be useful to have also a PUSH event to trigger.
For example in the FENIX A320, most of buttons takes two commands to operate, 1 to push and 1 to release button.
Thanks
Yes it has, this is the "PRESS_CALLBACK", so I don't see it missing in any case, we just have to create two separate related functions, one for PRESS and one for RELEASE, that's it ! ;-)

https://siminnovations.com/wiki/index.p ... Button_add

User avatar
Sling
Posts: 5244
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Push Event missing

#3 Post by Sling »

Hi,
Push is press in this case. In addition you can’t have a release without a press so if you have a release callback coded then you must also have the press coded.

roland_lfor
Posts: 9
Joined: Thu Nov 10, 2022 6:55 pm

Re: Push Event missing

#4 Post by roland_lfor »

Sorry I'm a bit lost, from the .json we have only access to the "button_released_code" event, correct?

Code: Select all

{
	"name":	"Attitude reference",
	"minor_cw_code":	"(>K:ATTITUDE_BARS_POSITION_UP)",
	"minor_ccw_code":	"(>K:ATTITUDE_BARS_POSITION_DOWN)",
    "minor_acceleration":	5,
	"major_cw_code":	"(>K:ATTITUDE_BARS_POSITION_UP)",
	"major_ccw_code":	"(>K:ATTITUDE_BARS_POSITION_DOWN)",
    "major_acceleration":	10,
	"button_released_code":	"(>K:ATTITUDE_CAGE_BUTTON)",
    "order": 103000
}

User avatar
Ralph
Posts: 7933
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Press Event missing

#5 Post by Ralph »

No there's also released. See the documentation:
https://siminnovations.com/wiki/index.p ... nced_usage

User avatar
Sling
Posts: 5244
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Press Event missing

#6 Post by Sling »

Oh I see now. I missed that this was in the KnobFS section. I don’t use KnobFS so can’t help.

User avatar
Corjan
Posts: 2941
Joined: Thu Nov 19, 2015 9:04 am

Re: Press Event missing

#7 Post by Corjan »

Hi,


We can't expose the pressed since that is used to determine if the edit menu should be enabled.
Otherwise when you are trying to enable the edit menu, you will trigger the mode event as well, which can be annoying.


Corjan

roland_lfor
Posts: 9
Joined: Thu Nov 10, 2022 6:55 pm

Re: Press Event missing

#8 Post by roland_lfor »

Would it be possible to use for example Ctrl key + push to switch to the selection menu mode, and keep a single push to fire Press event?
Or left mouse click + push?

Post Reply