LCOV - code coverage report
Current view: top level - src/MIDI_Outputs/Bankable - PBPotentiometer.hpp (source / functions) Hit Total Coverage
Test: e224b347cd670555e44f06608ac41bd1ace9d9d8 Lines: 3 3 100.0 %
Date: 2020-09-08 17:44:46 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <AH/Settings/Warnings.hpp>
       4             : AH_DIAGNOSTIC_WERROR()
       5             : 
       6             : #include <Banks/BankAddresses.hpp>
       7             : #include <MIDI_Outputs/Bankable/Abstract/MIDIFilteredAnalog.hpp>
       8             : #include <MIDI_Senders/PitchBendSender.hpp>
       9             : 
      10             : BEGIN_CS_NAMESPACE
      11             : 
      12             : namespace Bankable {
      13             : 
      14             : /**
      15             :  * @brief   A class of MIDIOutputElement%s that read the analog input from a
      16             :  *          **potentiometer or fader**, and send out 14-bit MIDI **Pitch Bend** 
      17             :  *          events.
      18             :  * 
      19             :  * The analog input is filtered and hysteresis is applied for maximum
      20             :  * stability.  
      21             :  * The actual precision is "only" 10 bits, because this is the resolution of the
      22             :  * built-in ADC, and this is the default resolution used by the Mackie Control
      23             :  * Universal protocol.  
      24             :  * This version can be banked.
      25             :  *
      26             :  * @ingroup BankableMIDIOutputElements
      27             :  */
      28           1 : class PBPotentiometer
      29             :     : public MIDIFilteredAnalog<SingleAddress, PitchBendSender<10>> {
      30             :   public:
      31             :     /** 
      32             :      * @brief   Create a new Bankable PBPotentiometer object with the given 
      33             :      *          analog pin and channel.
      34             :      * 
      35             :      * @param   config
      36             :      *          The bank configuration to use: the bank to add this element to,
      37             :      *          and whether to change the address, channel or cable number.
      38             :      * @param   analogPin
      39             :      *          The analog input pin to read from.
      40             :      * @param   address
      41             :      *          The MIDI channel [CHANNEL_1, CHANNEL_16] and optional Cable
      42             :      *          Number [CABLE_1, CABLE_16].
      43             :      */
      44           1 :     PBPotentiometer(OutputBankConfig<BankType::CHANGE_CHANNEL> config,
      45             :                     pin_t analogPin, MIDIChannelCN address)
      46           1 :         : MIDIFilteredAnalog{{config, address}, analogPin, {}} {}
      47             : };
      48             : 
      49             : } // namespace Bankable
      50             : 
      51             : END_CS_NAMESPACE
      52             : 
      53             : AH_DIAGNOSTIC_POP()

Generated by: LCOV version 1.14-6-g40580cd