LCOV - code coverage report
Current view: top level - src/MIDI_Outputs - CCIncrementDecrementButtons.hpp (source / functions) Coverage Total Hit
Test: 73449d9b107c772cf65493691543348214e5d5eb Lines: 100.0 % 3 3
Test Date: 2026-06-06 17:44:35 Functions: 100.0 % 1 1
Legend: Lines:     hit not hit

            Line data    Source code
       1              : #pragma once
       2              : 
       3              : #include <MIDI_Outputs/Abstract/MIDIIncrementDecrementButtons.hpp>
       4              : #include <MIDI_Senders/DigitalNoteSender.hpp>
       5              : #include <MIDI_Senders/RelativeCCSender.hpp>
       6              : 
       7              : BEGIN_CS_NAMESPACE
       8              : 
       9              : /**
      10              :  * @brief   A class of MIDIOutputElement%s that read the input of **two
      11              :  *          momentary push buttons** to increment or decrement a **relative 
      12              :  *          setting** using relative MIDI **Control Change** events.  
      13              :  *          An optional note number can be provided to reset the setting.
      14              :  * 
      15              :  * This version cannot be banked.
      16              :  *
      17              :  * @ingroup MIDIOutputElements
      18              :  */
      19              : class CCIncrementDecrementButtons
      20              :     : public MIDIIncrementDecrementButtons<RelativeCCSender,
      21              :                                            DigitalNoteSender> {
      22              :   public:
      23              :     /**
      24              :      * @brief   Construct a new CCIncrementDecrementButtons object.
      25              :      * 
      26              :      * @param   buttons
      27              :      *          The pins with the increment and decrement buttons connected.  
      28              :      *          The internal pull-up resistors will be enabled.
      29              :      * @param   address
      30              :      *          The address to use for the relative events, containing the 
      31              :      *          controller number [0, 119], channel [Channel_1, Channel_16], and
      32              :      *          optional cable number [Cable_1, Cable_16].
      33              :      * @param   multiplier
      34              :      *          The multiplier for the relative events. When setting it to 2,
      35              :      *          it will scroll twice as fast, for example.
      36              :      * @param   resetNote
      37              :      *          The MIDI address to use to reset the setting, containing the 
      38              :      *          note number [0, 119], channel [Channel_1, Channel_16], and 
      39              :      *          optional cable number [Cable_1, Cable_16]. 
      40              :      *          It will be triggered when the increment and decrement buttons
      41              :      *          are pressed simultaneously.
      42              :      * @param   relativeSender
      43              :      *          The MIDI sender to use for the relative events.
      44              :      * @param   resetSender
      45              :      *          The MIDI sender to use for reset events.
      46              :      */
      47            1 :     CCIncrementDecrementButtons(const AH::IncrementDecrementButtons &buttons,
      48              :                                 MIDIAddress address, uint8_t multiplier = 1,
      49              :                                 MIDIAddress resetNote = MIDIAddress::invalid(),
      50              :                                 const RelativeCCSender &relativeSender = {},
      51              :                                 const DigitalNoteSender &resetSender = {})
      52            1 :         : MIDIIncrementDecrementButtons(buttons, address, multiplier, resetNote,
      53            1 :                                         relativeSender, resetSender) {}
      54              : };
      55              : 
      56              : END_CS_NAMESPACE
        

Generated by: LCOV version 2.4-beta