Skip to content
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

Fn groups are different in the US and the UK #54

Open
FrightRisk opened this issue Feb 19, 2021 · 9 comments
Open

Fn groups are different in the US and the UK #54

FrightRisk opened this issue Feb 19, 2021 · 9 comments
Assignees
Labels
Bug Something isn't working as designed needs-investigation

Comments

@FrightRisk
Copy link
Member

In the US, Fn 0 is light, Fn1 is Bell and Fn 2 is horn. Usually light and horn are toggle, but Bell is latch. In the UK apparently, Fn 0 is still lights but Fn1 is a sound on/off toggle, Fn 2 is horn long and Fn 3 is horn short (or at least on this person's decoder).

He said he is having a problem with trying to work out the latching and non latching functions when trying to create his own button configuration. He thinks that as soon as he uses any function in that group, F1 (the disable sound function) toggles to off.

The user mentioned that he read the code and saw a comment about F2 that it will turn off after a set amount of time but nothing about the F1,

Another reason to maybe use the new command ;) Are we handling the math for turning on and off things in each function group correctly? Did we make any assumptions that F0-F2 would always be lights, bell, horn?

@FrightRisk FrightRisk added the Bug Something isn't working as designed label Feb 19, 2021
@FrightRisk
Copy link
Member Author

FrightRisk commented Feb 19, 2021

Is "aria" in btnState = clickedBtn.attr("aria-pressed"); a css type?

I see a timer set, but don't see what we are timing, what the value is, or what will happen when the timer value is reached. Is this where F1 could automatically get turned off somehow? Or does his decoder see a change and reset things perhaps? How are we repeating commands that toggle? In other words, what keeps the bell ringing and the headlight on?

@matt-vdv
Copy link
Member

I haven't really touched the functions code, but switching to the new system sounds like a good idea! I will have a little play around at some point and try and investigate...

@ManiAkasapu
Copy link
Member

He may need to have change the button Type to TOGGLE. That could be Problem
image

Just to understand the jargon:

Toggle == Press&hold == Momentary button
Is Latch === Switch ?

By default (Master Map), F1(Bell), F2(Horn) are Momentary (Press&Hold) button.

Users can change the button behavior in Mapping screen:
image

About the code:
The attribute "aria-pressed" will provide the information about whether the button is pressed or not.

About timer: There is no straightforward way to simulate press&hold in HTML. This timer simulate that. F1, F2 are Press&Hold type by default and they only send command when User HOLD the button.

@matt-vdv
Copy link
Member

By the sounds of things, this may be fixed by #51 and #53? Even if it isn't, it may give us a better idea of where things are going wrong...

@ManiAkasapu
Copy link
Member

ManiAkasapu commented Mar 13, 2021

I am still trying to understand the problem.. Any function in the map can be configured to be Press&hold type button or Toggle type button.. So, user can configure however he wants.. All he needs is to create new map and configure According to his needs.. It does not matter it's US or UK..

@FrightRisk
Copy link
Member Author

FrightRisk commented Mar 13, 2021 via email

@matt-vdv
Copy link
Member

@FrightRisk Ok that makes sense. I personally don't have sound decoders, so I can't verify this. I will have a look and see if I can find where it is going wrong...

@FrightRisk
Copy link
Member Author

FrightRisk commented Mar 14, 2021 via email

@matt-vdv
Copy link
Member

@FrightRisk ok. That could be annoying for people with non-sound decoders as these would have lights on F2 I think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as designed needs-investigation
Projects
None yet
Development

No branches or pull requests

3 participants