LCOV - code coverage report
Current view: top level - src/MIDI_Outputs - CCIncrementDecrementButtons.hpp (source / functions) Hit Total Coverage
Test: 169c36a3797bc662d84b5726f34a3f37d3c58247 Lines: 3 3 100.0 %
Date: 2024-11-09 15:32:27 Functions: 1 1 100.0 %
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 1.15