Skip to content

Releases: solamyl/Mini_Button

New long-press detection on buttons

Choose a tag to compare

@solamyl solamyl released this 31 Dec 00:18

new LongPressDetector class

  • new class added, it is not real button, it is observer to other buttons
  • added a variant of LongPress example that demonstrates easy use of new LongPressDetector class

fixed lastChange() behaviour

  • method was not implemented in derived classes, so it returned values from the base class and did not reflect different behaviour of derived ones

New auto-repeat button

Choose a tag to compare

@solamyl solamyl released this 28 Dec 23:37

new AutoRepeatButton class

  • new class for auto-repeat button
  • added a variant of UpDown example that shows the simplicity of using AutoRepeatButton

changed dbTime datatype

  • the dbTime datatype was changed from uint32_t to uint16_t in constructor declaration to make the datatypes of method params consistent

Saving per-object's memory

Choose a tag to compare

@solamyl solamyl released this 27 Dec 23:54
67cb951

per-object memory was reduced to 10 bytes from original amount of 24 bytes for JC_Button class.

changes to reduce memory consumption per object when the class is instantialized

  • debounce time limited to 16-bits and 60.000 msec
  • m_time member removed. it stored "actual" time, replaced with millis() where necessary
  • packed boolean class members to 1-bit values
  • polished param names and types

New robust debouncing algorithm

Choose a tag to compare

@solamyl solamyl released this 27 Dec 21:49
989c011

debouncing algorithm replaced with a robust one

  • the original algorithm was as simple as possible: after detecting a change, wait for a defined period of time, then read input again and that is a new stable state.
  • the new algoritm checks the input in each loop and monitors how long it has been stable. If the stable period is longer than the defined time, then a new stable state is reported. No other changes in functionality, just the debouncing algorithm.
  • object's memory reduced by 2 bytes

m_changed member removed

  • m_changed was replaced with an expression lastState!=currentState
  • new method changed() added

Initial release of forked lib

Choose a tag to compare

@solamyl solamyl released this 26 Dec 23:00

This is the initial release right after the lib fork with just minimal changes applied.

  • just renaming, changed links and modified descriptions