Skip to content

Releases

v4.3.0 Improvements and additions

Choose a tag to compare

@GabyGold67 GabyGold67 released this 08 Jan 14:39
  • Added default constructors to all the classes that hadn't. Addition required for some dinamically created objects.
  • Added the use of standard GPIO_NUM_NC to define an invalid pin number (non connected)
  • Added the use of standard GPIO_NUM_MAX to validate the pin number for verifications
  • All pin related constructor parameters types have been changed from uint8_t to int8_t, to make easy use of the GPIO_NUM_NC macro value (-1). All operations are bit equivalent from one to another, as 0xFF was used for own designated invalid pin value, and testing cases used showed no need to change code, but must be carefully tested in any particular case

v4.1.0 Refactoring, streamlining and more

Choose a tag to compare

@GabyGold67 GabyGold67 released this 31 Oct 14:52
  • _otptsSttsPkg() methodd moved up in hierarchy line to ensure the inclusion of the isOnScndry attibute flag state in the encoded packaging of all DblActnLtchMPBttn subclasses.
  • As a consequence of the _otptsSttsPkg change, now subclasses implementations of the method are based on DblActnLtchMPBttn::_otptsSttsPkg()
  • Several states execution unifications through switch cascading in the state machines. The discrete states still exist and are conceptually kept, but the execution is now faster by avoiding the waiting of extra loops.
  • Example files updated, enhaced and added for some classes.

v4.0.2 Refactoring update

Choose a tag to compare

@GabyGold67 GabyGold67 released this 15 Sep 15:29
  • All changes are transpartent to the user.
  • _outputschange attribute flag setting added in the refactoring of the isOn, isEnabled, pilotOn, wrnngOn, isVoided simple value assignement into full methods (functions)
  • _outputschange attribute flag setting by simple assignement after turn On/Off methods execution removed (as it now is uneeded code duplication)

v4.0.1 Minor update

Choose a tag to compare

@GabyGold67 GabyGold67 released this 03 Sep 06:08
  • Naming regression error corrected

v4.0.0 Initial refactored library release

Choose a tag to compare

@GabyGold67 GabyGold67 released this 02 Sep 11:40
  • General aspects:

    • Library refactoring complete, now includes multiplatform basic structured code.
    • Renamed to ButtonToSwitch to unify names given in different development platforms to wich it'll be ported.
    • Temporary logo included for ease of identification through some new GitHub tools and options.
  • Additions:

    • Added SnglSrvcVdblMPBttn class
    • Added methods:
      • HntdTmLtchd class
        • Required methods to execute a dedicated function when entering and exiting Pilot On states.
        • Required methods to execute a dedicated function when entering and exiting Warning On states.
      • TmVdblMPBttn and SnglSrvcVdblMPBttn classes:
        • Required methods to execute a dedicated function when entering and exiting isVoided states.
  • Several application examples were added and a basic explanation of what each one does and resources used was added to every one.

    • DbncdDlydMPBttn class use examples added
    • TgglLtchMPBttn class use examples added
    • TmLtchMPBttn class use examples added
    • XtrnUnltchMPBttn class use examples added
    • TmVdblMPBttn class use examples added
    • SnglSrvcVdblMPBttn class use examples added
  • Debugging:

    • _otptsSttsPkg(uint32_t) method corrected for dynamic polymorphic use (each DbncdMPBttn subclasses generates the uint32_t message based on subclass relevant attribute flags)
    • Refactoring failed cleanup made possible to keep the On State of a SnglSrvcVdblMPBttn if a disable signal was received before the object entered the Voided State.
    • HntdTmLtchMPBttn::_otptsSttsPkg(uint32_t prevVal) method corrected for the _wrnngOn attribute flag bit setting

v3.1.0 ButtonToSwitch for STM32 library release

Choose a tag to compare

@GabyGold67 GabyGold67 released this 18 Aug 11:30
71b72a5

v3.1.0 Upgrade release

  • General aspects:
    • Library name changed to ButtonToSwitch to unify different names given in different development platforms.
    • Temporary logo included for ease of identification through some new GitHub tools and options.
  • Additions:
    • Added SnglSrvcVdblMPBttn class
  • Several application examples were added and a basic explanation of what each one does and resources used was added to every one.
    • DbncdDlydMPBttn class use examples added
    • TgglLtchMPBttn class use examples added
    • TmLtchMPBttn class use examples added
    • XtrnUnltchMPBttn class use examples added
    • TmVdblMPBttn class use examples added
    • SnglSrvcVdblMPBttn class use examples added

v3.0.0 Upgrade release

Choose a tag to compare

@GabyGold67 GabyGold67 released this 04 Jul 07:25
9c73306
  • The task notification mechanism is modified replacing the xTaskNotifyGive() macro that was in use. The change is NOT backward compatible, so the version number had to be kicked to v3.x.x.

    • xTaskNotify() macro replaces the xTaskNotifyGive() due to it's capacity to pass an arbitrary notification value to the notified task.
    • A method to encode the object current attribute flags status into a 32-bit value to be passed as the notification value was added. The method has no public access as it's invoked automatically when needed.
    • A type was defined (MpbOtpts_t) to hold the decoded status of all the available significant output attribute flags for all classes implemented. The type is available for the developer using the library.
    • A decoding function was implemented to decode the 32-bit notification value into the type MpbOtpts_t, MpbOtpts_t otptsSttsUnpkg(uint32_t pkgOtpts) implemented for the developer using the library.
  • Several application examples were added and a basic explanation of what each uses and does was added to each one. More are expected to be added.

v2.0.0 Upgrade release

Choose a tag to compare

@GabyGold67 GabyGold67 released this 11 Jun 11:56

Changes:

General:

_ Verifies the input pin port to be valid from GPIOC and on (previous version verified from GPIOE and on), due to the fact that at the moment the STM32 mcu with smaller ports quantity have two ports (usually defined as GPIOA and GPIOB).
_ Volatile type qualifier added to attributes that can be modified by setters and by software timer update service.
_ Return values for many attribute setters changed from boolean to void. The only ones that keep a boolean return value are those which need value validation, in wich case will return true if the value passed as parameter is valid, or false if the parameter was out of range of valid values.
_ isOn2 renamed to isOnScndry, and declaration moved up to DblActnLtchMPBttn class to make it available for all subclasses.
_ The isOn2 (now isOnScndry) attribute direct value asignation was refactored into turnOffScndry() and trnOnScndry() methods to set the bases for complete implementation of related actions to the attribute flag value change.
_ All the trnOn() and trnOff() facilities added to the turnOffScndry() and trnOnScndry(), including a taskHandle management to resume/suspend a task while isOnScndry = true, a function pointer to a function to be executed when isOnScndry changes values.
_ getFrcOtptLvldWhnVdd(), getStOnWhnOtpFrcd(), setFrcdOtptWhnVdd(), setStOnWhnOtpFrcd() methods added to VdblMPBttn to configure the isOn attribute flag behavior when the objects enter the voided state. These won't be used at this point as the only subclass developed -TmVdblMPBttn- requires a fixed setup for both frcOtptLvlWhnVdd and stOnWhnOtptFrcd attribute flags.

v1.1.0 Update release

Choose a tag to compare

@GabyGold67 GabyGold67 released this 27 May 15:53

Changes:

Attributes and methods:

_ strtDelay attribute moved up from the DbncdDlydMPBttn class to the DbncdMPBttn class
_ getStrtDelay() method moved up from the DbncdDlydMPBttn class to the DbncdMPBttn class
_ updValidPressesStatus() method from the DbncdMPBttn class modified to include strtDelay in the calculations
_ updValidPressesStatus() method from the DbncdDlydMPBttn class removed as becoming unneeded by the move of the strtDelay attribute
_ DbncdDlydMPBttn() constructor modified to accomodate strtDelay value initialization out of the initialization list (subclass initialization of non static parameter)

v1.0.0 Initial Release

Choose a tag to compare

@GabyGold67 GabyGold67 released this 24 May 09:02

This release includes:

Instantiable classes:

  • DbncdMPBttn: Base class, implements a Debounced Momentary Push Button (D-MPB)
  • DbncdDlydMPBttn: Implements a Debounced Delayed MPB (DD-MPB)
  • TgglLtchMPBttn: Implements a Toggle Latch DD-MPB, a.k.a. a Toggle Switch (ToLDD-MPB)
  • TmLtchMPBttn: Implements a Timer Latch DD-MPB, a.k.a. a Timer Switch (TiLDD-MPB)
  • XtrnUnltchMPBttn: Implements an External Unlatch LDD-MPB, a.k.a. Emergency Latched Switch (XULDD-MPB)
  • HntdTmLtchMPBttn: Implements a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB)
  • TmVdblMPBttn: Implements a Time Voidable DD-MPB, a.k.a. Anti-tampering switch (TVDD-MPB)
  • SldrDALtchMPBttn: Implements a Slider Double Action LDD-MPB combo switch, a.k.a. off/on/dimmer, a.k.a. off/on/volume radio switch)(S-DALDD-MPB)
  • DDlydDALtchMPBttn: Implements a Debounced Delayed DALDD-MPB combo switch, a.k.a. Dobule Debounced Delayed Latched MPB combo switch (DD-DALDD-MPB)

Embedded simulated behavior output retrieval mechanisms implemeted:

  • Flags value getters: Return the value of each significant output flag.
  • General flags value change getter: Returns a value indicating if any of the significant output flags' values has changed.
  • RTOS lightweight mailbox: Implementation of a xTaskNotifyGive() FreeRTOS macro to unblock a developer defined task, every time any of the output flags' values changes.
  • Task Resume/Suspend: A mechanism is provided to run a developer defined task while the object is in On State.
  • Functions execution: A developer defined function might be set to be executed every time the instantiated object enters the On State, and a function might be set to be executed every time the instantiated object enters the Off State. The functions are to be independently defined, so one, the other or both might be defined, and even the same function might be used for both events.

Example files:

  • At least two example files for each instantiable class, showing the working setting and the effecto of the disable()/enable() methods of each of them