A Teensy -> Python Interface Manualmatic MPG/pendant

More
4 years 8 months ago #233838 by sagreen
Phil,

Check out  github.com/LennartHennigs/Button2/pull/29

Looks like a nice fix to allow callback functions to exist within a class. Was probably implemented in button2 after you started working on your library.

Scott...

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #233843 by sagreen
I created a pull request in your library with the fix for your approval. Works great!

Scott...

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #233867 by fletch

Phil,

Check out  github.com/LennartHennigs/Button2/pull/29

Looks like a nice fix to allow callback functions to exist within a class. Was probably implemented in button2 after you started working on your library.

Scott...
 
Thanks Scott - I wrote the EncoderButton a few years ago (I just tidied it up for release), so hadn't revisited Lennart's Button2 but this was how I implemented it for my thermostat project -  that was for ESP32 so I didn't/couldn't port it to Arduino.  Teensyduino however...image missing /media/kunena/emoticons/smile.png

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #233868 by fletch

I created a pull request in your library with the fix for your approval. Works great!

Scott...
 
Brilliant! Thank you very much. I'll pull that straight across and add a formal example. I'm assuming (dangerous) the commented out ' //#define ARDUINO_ARCH_ESP32 1' is superfluous.
Also curious about the 'using' vs 'typedef' - I originally had 'typedef' but at some point moved to 'using' but can't remember why...image missing /media/kunena/emoticons/wassat.png

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #233871 by fletch
BTW, I like what you're doing with the buttonMovePosZ->setLongPressHandler - continuous jog perhaps?

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #233915 by sagreen

BTW, I like what you're doing with the buttonMovePosZ->setLongPressHandler - continuous jog perhaps?
Thats exactly what I am doing. This is a dedicated set of buttons that Jogs the Z up and down...

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum