LCOV - code coverage report
Current view: top level - src/MIDI_Outputs/Bankable - PBPotentiometer.hpp (source / functions) Hit Total Coverage
Test: 19d2efc7037c2e176feca44750a12594c76f466f Lines: 3 3 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/PitchBendSender.hpp>
       6             : 
       7             : BEGIN_CS_NAMESPACE
       8             : 
       9             : namespace Bankable {
      10             : 
      11             : /**
      12             :  * @brief   A class of MIDIOutputElement%s that read the analog input from a
      13             :  *          **potentiometer or fader**, and send out 14-bit MIDI **Pitch Bend** 
      14             :  *          events.
      15             :  * 
      16             :  * The analog input is filtered and hysteresis is applied for maximum
      17             :  * stability.  
      18             :  * The actual precision is "only" 10 bits, because this is the resolution of the
      19             :  * built-in ADC, and this is the default resolution used by the Mackie Control
      20             :  * Universal protocol.  
      21             :  * This version can be banked.
      22             :  *
      23             :  * @ingroup BankableMIDIOutputElements
      24             :  */
      25           1 : class PBPotentiometer
      26             :     : public MIDIFilteredAnalog<SingleAddress, PitchBendSender<10>> {
      27             :   public:
      28             :     /** 
      29             :      * @brief   Create a new Bankable PBPotentiometer object with the given 
      30             :      *          analog pin and channel.
      31             :      * 
      32             :      * @param   config
      33             :      *          The bank configuration to use: the bank to add this element to,
      34             :      *          and whether to change the address, channel or cable number.
      35             :      * @param   analogPin
      36             :      *          The analog input pin to read from.
      37             :      * @param   address
      38             :      *          The MIDI channel [CHANNEL_1, CHANNEL_16] and optional Cable
      39             :      *          Number [0, 15].
      40             :      * @param   sender
      41             :      *          The MIDI sender to use.
      42             :      */
      43           1 :     PBPotentiometer(const OutputBankConfig &config, pin_t analogPin,
      44             :                     const MIDICNChannel &address,
      45             :                     const PitchBendSender<10> &sender = {})
      46           1 :         : MIDIFilteredAnalog{{config, address}, analogPin, sender} {}
      47             : };
      48             : 
      49             : } // namespace Bankable
      50             : 
      51             : END_CS_NAMESPACE

Generated by: LCOV version 1.14-5-g4ff2ed6