Click here to Skip to main content
15,887,596 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Oi Pkfox Pin
Craig Robbins7-Dec-22 0:48
Craig Robbins7-Dec-22 0:48 
GeneralRe: Oi Pkfox Pin
OriginalGriff7-Dec-22 2:05
mveOriginalGriff7-Dec-22 2:05 
GeneralRe: Oi Pkfox Pin
  Forogar  7-Dec-22 2:59
professional  Forogar  7-Dec-22 2:59 
QuestionOi! honey the codewitch Pin
megaadam6-Dec-22 21:19
professionalmegaadam6-Dec-22 21:19 
AnswerRe: Oi! honey the codewitch Pin
honey the codewitch6-Dec-22 21:35
mvahoney the codewitch6-Dec-22 21:35 
GeneralRe: Oi! honey the codewitch Pin
Single Step Debugger7-Dec-22 5:57
Single Step Debugger7-Dec-22 5:57 
GeneralRe: Oi! honey the codewitch Pin
honey the codewitch7-Dec-22 6:16
mvahoney the codewitch7-Dec-22 6:16 
RantIt was supposed to be easy. Pin
honey the codewitch6-Dec-22 20:47
mvahoney the codewitch6-Dec-22 20:47 
Disclaimer: You get to be my rubber ducks. This isn't a coding question. It's a vent.

I'm banging my head against a problem that seems simple until I try to do it.

Often times devices have little buttons on them - maybe one or two to accompany a screen so you have to make the buttons multifunction - click to do one thing, double click to do something else, or hold it down (long click) to do yet another thing.

To that end I'm writing a bit of software that can connect to a little button circuit and give you notifications when the button is clicked, double clicked, or "long" clicked.

It's brutal. Click is fine, but the other two are fighting with each other - I get double click working, and then long click stops working. Or I get long click working and double click starts firing along with click. It's nonsense.

The logic is complicated to the point where I'm half convinced I'm Doing It Wrong(TM).

Something so seemingly simple, and it's one of the more challenging coding prospects I've had in a minute.

I've gone through several iterations, but getting the bugs out is like pushing a bubble out of a waterbed.

I would just use existing code, but I have an ecosystem I'm trying to build on, and this is such a basic function I don't want a 3rd party dependency to creep into virtually all my projects and potentially complicate licensing for something so ... simple? Or I thought it was. The other thing is, the code I've seen out there is far too ATAP and gold plated. It's too much. Firmware space is important. It seemed a worthwhile endeavor but now I'm not so sure. Sigh | :sigh:
To err is human. Fortune favors the monsters.

GeneralRe: It was supposed to be easy. Pin
den2k886-Dec-22 21:22
professionalden2k886-Dec-22 21:22 
GeneralRe: It was supposed to be easy. Pin
honey the codewitch6-Dec-22 21:26
mvahoney the codewitch6-Dec-22 21:26 
GeneralRe: It was supposed to be easy. Pin
den2k886-Dec-22 21:33
professionalden2k886-Dec-22 21:33 
GeneralRe: It was supposed to be easy. Pin
honey the codewitch6-Dec-22 21:37
mvahoney the codewitch6-Dec-22 21:37 
GeneralRe: It was supposed to be easy. Pin
den2k886-Dec-22 21:46
professionalden2k886-Dec-22 21:46 
GeneralRe: It was supposed to be easy. Pin
honey the codewitch6-Dec-22 21:47
mvahoney the codewitch6-Dec-22 21:47 
GeneralRe: It was supposed to be easy. Pin
Sander Rossel6-Dec-22 21:31
professionalSander Rossel6-Dec-22 21:31 
GeneralRe: It was supposed to be easy. Pin
honey the codewitch6-Dec-22 21:32
mvahoney the codewitch6-Dec-22 21:32 
GeneralRe: It was supposed to be easy. Pin
den2k886-Dec-22 21:34
professionalden2k886-Dec-22 21:34 
QuestionRe: It was supposed to be easy. Pin
megaadam7-Dec-22 1:38
professionalmegaadam7-Dec-22 1:38 
JokeRe: It was supposed to be easy. Pin
CPallini6-Dec-22 23:00
mveCPallini6-Dec-22 23:00 
GeneralRe: It was supposed to be easy. Pin
PIEBALDconsult7-Dec-22 2:19
mvePIEBALDconsult7-Dec-22 2:19 
GeneralRe: It was supposed to be easy. Pin
Single Step Debugger7-Dec-22 6:53
Single Step Debugger7-Dec-22 6:53 
GeneralRe: It was supposed to be easy. Pin
honey the codewitch7-Dec-22 7:02
mvahoney the codewitch7-Dec-22 7:02 
GeneralRe: It was supposed to be easy. Pin
0x01AA7-Dec-22 7:18
mve0x01AA7-Dec-22 7:18 
GeneralRe: It was supposed to be easy. Pin
honey the codewitch7-Dec-22 7:24
mvahoney the codewitch7-Dec-22 7:24 
GeneralWordle 536 Pin
StarNamer@work6-Dec-22 13:12
professionalStarNamer@work6-Dec-22 13:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.