LCOV - code coverage report
Current view: top level - src/MIDI_Outputs/ManyAddresses - CCPotentiometer.hpp (source / functions) Hit Total Coverage
Test: 19d2efc7037c2e176feca44750a12594c76f466f Lines: 4 4 100.0 %
Date: 2019-11-24 14:50:27 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <Banks/BankAddresses.hpp>
       4             : #include <MIDI_Outputs/Bankable/Abstract/MIDIFilteredAnalog.hpp>
       5             : #include <MIDI_Senders/ContinuousCCSender.hpp>
       6             : 
       7             : BEGIN_CS_NAMESPACE
       8             : namespace Bankable {
       9             : namespace ManyAddresses {
      10             : 
      11             : /**
      12             :  * @brief   A class of MIDIOutputElement%s that read the analog input from a
      13             :  *          **potentiometer or fader**, and send out 7-bit MIDI **Control
      14             :  *          Change** events.
      15             :  * 
      16             :  * The analog input is filtered and hysteresis is applied for maximum
      17             :  * stability.  
      18             :  * This version can be banked using an arbitrary list of alternative
      19             :  * addresses.
      20             :  *          
      21             :  * @tparam  N
      22             :  *          The number of variants/alternative addresses the element has.
      23             :  *
      24             :  * @ingroup ManyAddressesMIDIOutputElements
      25             :  */
      26             : template <setting_t N>
      27           1 : class CCPotentiometer
      28             :     : public Bankable::MIDIFilteredAnalogAddressable<ManyAddresses<N>,
      29             :                                                      ContinuousCCSender> {
      30             :   public:
      31             :     /** 
      32             :      * @brief   Create a new CCPotentiometer object with the given 
      33             :      *          analog pin, and address list.
      34             :      * 
      35             :      * @param   bank
      36             :      *          The bank that selects the address to use.
      37             :      * @param   analogPin
      38             :      *          The analog input pin to read from.
      39             :      * @param   addresses
      40             :      *          The list of MIDI addresses containing the controller number 
      41             :      *          [0, 119], channel [CHANNEL_1, CHANNEL_16], and optional cable 
      42             :      *          number [0, 15].
      43             :      * @param   sender
      44             :      *          The MIDI sender to use.
      45             :      * 
      46             :      * @ingroup MIDIOutputElementConstructors
      47             :      */
      48           1 :     CCPotentiometer(const Bank<N> &bank, pin_t analogPin,
      49             :                     const Array<MIDICNChannelAddress, N> &addresses,
      50             :                     const ContinuousCCSender &sender = {})
      51           1 :         : MIDIFilteredAnalogAddressable<ManyAddresses<N>, ContinuousCCSender>{
      52           2 :               {bank, addresses}, analogPin, sender} {}
      53             : };
      54             : 
      55             : } // namespace ManyAddresses
      56             : } // namespace Bankable
      57             : 
      58             : END_CS_NAMESPACE

Generated by: LCOV version 1.14-5-g4ff2ed6