BL0145 Debounce

For general Flowcode discussion that does not belong in the other sections.
Post Reply
chipfryer27
Valued Contributor
Posts: 2111
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 470 times
Been thanked: 700 times

BL0145 Debounce

Post by chipfryer27 »

Hi

Just wondering if the component macro for the BL0145 eBlock contains a debounce value? It probably has but I don't see any value and the source code isn't yet available in the WiKi.

Regards

medelec35
Valued Contributor
Posts: 2422
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 773 times
Been thanked: 833 times

Re: BL0145 Debounce

Post by medelec35 »

Hi Iain.
There is a way to add debounce, but that means using Component Debugger and exposing full component tree.
I could add the debounce to the Bl0145 and let Ben decide if it is to be added to components database or not.
Martin

chipfryer27
Valued Contributor
Posts: 2111
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 470 times
Been thanked: 700 times

Re: BL0145 Debounce

Post by chipfryer27 »

Hi Martin

I was just about to write some code to prototype using some eblocks, which will involve those switches. Knowing if they have debounce or not would help. The individual switch component does include a default debounce but not seeing anything for the BL0145. Being an eblock any debounce would be better in code.

I could just use individual switch components, but thought I'd ask first.

Regards

medelec35
Valued Contributor
Posts: 2422
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 773 times
Been thanked: 833 times

Re: BL0145 Debounce

Post by medelec35 »

I think debounce is a missing function I should have added at the very start.
Can you try the attached and see if it's a function worth including.
@Ben If you would like the source and component I will add it to the additional folder :D
Attachments
Switch_BL0145.fcpx
(6.02 KiB) Downloaded 3 times
Martin

chipfryer27
Valued Contributor
Posts: 2111
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 470 times
Been thanked: 700 times

Re: BL0145 Debounce

Post by chipfryer27 »

Hi Martin

Thanks for that. Appreciated.

Not able to try on hardware yet but it certainly looks like it will do exactly as needed.

Regards

PS
I think it worth including as being an eBlock, to include any hardware debounce is not really feasible and although I could create a debounce routine, having it as part of the component is far, far better.

medelec35
Valued Contributor
Posts: 2422
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 773 times
Been thanked: 833 times

Re: BL0145 Debounce

Post by medelec35 »

Your Welcome.
I had to make a minor cosmetic change.
Can you download the same file again, please.
Martin

chipfryer27
Valued Contributor
Posts: 2111
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 470 times
Been thanked: 700 times

Re: BL0145 Debounce

Post by chipfryer27 »

Hi

Still looks good. What was the change? as any difference must have been trivial :)

Regards

medelec35
Valued Contributor
Posts: 2422
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 773 times
Been thanked: 833 times

Re: BL0145 Debounce

Post by medelec35 »

It was the description.
It shows up as tool tips when the function is hovered over.
I had to add it for the latest version.
Martin

Post Reply